notify user about registration failure
This commit is contained in:
@@ -99,9 +99,11 @@ static void ua_event_handler(struct ua *ua, enum ua_event ev,
|
|||||||
case UA_EVENT_REGISTERING:
|
case UA_EVENT_REGISTERING:
|
||||||
case UA_EVENT_UNREGISTERING:
|
case UA_EVENT_UNREGISTERING:
|
||||||
case UA_EVENT_REGISTER_OK:
|
case UA_EVENT_REGISTER_OK:
|
||||||
case UA_EVENT_REGISTER_FAIL:
|
|
||||||
re_snprintf(event_buf, sizeof event_buf, "%s", ua_event_reg_str(ev));
|
re_snprintf(event_buf, sizeof event_buf, "%s", ua_event_reg_str(ev));
|
||||||
break;
|
break;
|
||||||
|
case UA_EVENT_REGISTER_FAIL:
|
||||||
|
re_snprintf(event_buf, sizeof event_buf, "registering failed,%s", prm);
|
||||||
|
break;
|
||||||
case UA_EVENT_CALL_INCOMING:
|
case UA_EVENT_CALL_INCOMING:
|
||||||
if (list_count(ua_calls(ua)) > 1) {
|
if (list_count(ua_calls(ua)) > 1) {
|
||||||
play = mem_deref(play);
|
play = mem_deref(play);
|
||||||
|
|||||||
@@ -440,9 +440,15 @@ class MainActivity : AppCompatActivity() {
|
|||||||
uaAdapter.notifyDataSetChanged()
|
uaAdapter.notifyDataSetChanged()
|
||||||
if (aorSpinner.selectedItemPosition == -1) aorSpinner.setSelection(0)
|
if (aorSpinner.selectedItemPosition == -1) aorSpinner.setSelection(0)
|
||||||
}
|
}
|
||||||
"registered", "registering failed", "unregistering" -> {
|
"registered", "unregistering" -> {
|
||||||
uaAdapter.notifyDataSetChanged()
|
uaAdapter.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
"registering failed" -> {
|
||||||
|
uaAdapter.notifyDataSetChanged()
|
||||||
|
Toast.makeText(applicationContext,
|
||||||
|
"Registering of $aor failed: ${ev[1]}",
|
||||||
|
Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
"call ringing" -> {
|
"call ringing" -> {
|
||||||
}
|
}
|
||||||
"call rejected" -> {
|
"call rejected" -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user