diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-03-05 11:54:56 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-03-05 11:54:56 +0000 |
commit | 07bfbcb2b4bb13ee62a02c1312c5f9bdb530e806 (patch) | |
tree | 54c0752a6c874f6cfedbef93e7787f83c2f32048 | |
parent | 2d9e4a7f8ccb4578495a067f82cb6e281047c169 (diff) |
Show call disconnect reason
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@286 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip-apps/src/pjsua/main.c | 16 |
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; |