From 5c91d041b38be061c31f0f679baffe949b8a7466 Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Fri, 30 Mar 2012 06:18:50 +0000 Subject: Re #1446 (misc fix): Fix call info to display correct invite state git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3996 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsua-lib/pjsua_call.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pjsip/src/pjsua-lib/pjsua_call.c') diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index 4a6f1173..6a4e4dc7 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -1541,7 +1541,13 @@ PJ_DEF(pj_status_t) pjsua_call_get_info( pjsua_call_id call_id, pj_memcpy(&info->setting, &call->opt, sizeof(call->opt)); /* state, state_text */ - info->state = (call->inv? call->inv->state: PJSIP_INV_STATE_DISCONNECTED); + if (call->inv) { + info->state = call->inv->state; + } else if (call->async_call.dlg) { + info->state = PJSIP_INV_STATE_NULL; + } else { + info->state = PJSIP_INV_STATE_DISCONNECTED; + } info->state_text = pj_str((char*)pjsip_inv_state_name(info->state)); /* If call is disconnected, set the last_status from the cause code */ -- cgit v1.2.3