Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion due to deleted account during incoming call in PJSUA2 #4024

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -2141,7 +2141,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 @@ -2167,7 +2167,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) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it impact somehow on pjsua interface callbacks?

Copy link
Member Author

@nanangizz nanangizz Jul 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should not. The call->incoming_data is only released & set to NULL after invoking incoming call callback.

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 @@ -2178,6 +2183,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
Loading