summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
authorRiza Sulistyo <riza@teluu.com>2013-02-27 15:05:29 +0000
committerRiza Sulistyo <riza@teluu.com>2013-02-27 15:05:29 +0000
commit26bdd9238b26027a55067fb961272d4af038baca (patch)
treeb31e01ca217c07abfc13251c84c9b6f19af4ff18 /pjsip
parent328eaad9d79e2f20eb3dbe90ea781ad1352a9b9f (diff)
Re #1627: backported to 1.x
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@4408 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index d67ab209..9faf8385 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -3478,6 +3478,15 @@ static void pjsua_call_on_state_changed(pjsip_inv_session *inv,
}
}
+ /* Ticket #1627: Invoke on_call_tsx_state() when call is disconnected. */
+ if (inv->state == PJSIP_INV_STATE_DISCONNECTED &&
+ e->type == PJSIP_EVENT_TSX_STATE &&
+ call->inv &&
+ pjsua_var.ua_cfg.cb.on_call_tsx_state)
+ {
+ (*pjsua_var.ua_cfg.cb.on_call_tsx_state)(call->index,
+ e->body.tsx_state.tsx, e);
+ }
if (pjsua_var.ua_cfg.cb.on_call_state)
(*pjsua_var.ua_cfg.cb.on_call_state)(call->index, e);
@@ -4304,11 +4313,7 @@ static void pjsua_call_on_tsx_state_changed(pjsip_inv_session *inv,
}
if (call->inv == NULL) {
- /* Shouldn't happen. It happens only when we don't terminate the
- * server subscription caused by REFER after the call has been
- * transfered (and this call has been disconnected), and we
- * receive another REFER for this call.
- */
+ /* Call has been disconnected. */
return;
}