Skip to content

Commit

Permalink
Assertion due to deleted account during incoming call in PJSUA2 (pjsi…
Browse files Browse the repository at this point in the history
…p#4024)

(cherry picked from commit 0e0573d)
  • Loading branch information
nanangizz authored and vkolesnikov-intermedia committed Jul 29, 2024
1 parent d305cb6 commit 6f93fc4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pjsip/src/pjsua-lib/pjsua_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -2153,7 +2153,7 @@ pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata)
*/
if (dlg->mod_data[pjsua_var.mod.id] == NULL) {
/* In PJSUA2, on_incoming_call() may be called from
* on_media_transport_created() hence this might already set
* on_create_media_transport() hence this might already set
* to allow notification about fail events via on_call_state() and
* on_call_tsx_state().
*/
Expand All @@ -2179,7 +2179,12 @@ pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata)
* otherwise hangup the call with 480
*/
if (pjsua_var.ua_cfg.cb.on_incoming_call) {
pjsua_var.ua_cfg.cb.on_incoming_call(acc_id, call_id, rdata);
/* For PJSUA2, avoid invoking this callback again when it has been
* invoked from on_create_media_transport().
*/
if (call->incoming_data) {
pjsua_var.ua_cfg.cb.on_incoming_call(acc_id, call_id, rdata);
}

/* Notes:
* - the call might be reset when it's rejected or hangup
Expand All @@ -2190,6 +2195,7 @@ pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata)
* answer/hangup should have been delayed (see #1923),
* so let's process the answer/hangup now.
*/

if (call->async_call.call_var.inc_call.hangup) {
process_pending_call_hangup(call);
} else if (call->med_ch_cb == NULL && call->inv) {
Expand Down

0 comments on commit 6f93fc4

Please sign in to comment.