summaryrefslogtreecommitdiff
path: root/pjsip-apps
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip-apps')
-rw-r--r--pjsip-apps/src/pjsua/main.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/pjsip-apps/src/pjsua/main.c b/pjsip-apps/src/pjsua/main.c
index 1b0074b4..d9bd3509 100644
--- a/pjsip-apps/src/pjsua/main.c
+++ b/pjsip-apps/src/pjsua/main.c
@@ -89,11 +89,13 @@ void pjsua_ui_on_call_state(int call_index, pjsip_event *e)
PJ_UNUSED_ARG(e);
- PJ_LOG(3,(THIS_FILE, "Call %d state changed to %s",
- call_index,
- pjsua_inv_state_names[call->inv->state]));
-
if (call->inv->state == PJSIP_INV_STATE_DISCONNECTED) {
+
+ PJ_LOG(3,(THIS_FILE, "Call %d is DISCONNECTED [reason=%d (%s)]",
+ call_index,
+ call->inv->cause,
+ pjsip_get_status_text(call->inv->cause)->ptr));
+
call->inv = NULL;
if ((int)call->index == current_call) {
find_next_call();
@@ -101,6 +103,10 @@ void pjsua_ui_on_call_state(int call_index, pjsip_event *e)
} else {
+ PJ_LOG(3,(THIS_FILE, "Call %d state changed to %s",
+ call_index,
+ pjsua_inv_state_names[call->inv->state]));
+
if (call && current_call==-1)
current_call = call->index;
@@ -588,7 +594,7 @@ static void ui_console_main(void)
} else {
/* Hangup current calls */
- pjsua_call_hangup(current_call, PJSIP_SC_DECLINE);
+ pjsua_call_hangup(current_call);
}
break;