summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/src/pjsua2/endpoint.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/pjsip/src/pjsua2/endpoint.cpp b/pjsip/src/pjsua2/endpoint.cpp
index 8163e997..66e26595 100644
--- a/pjsip/src/pjsua2/endpoint.cpp
+++ b/pjsip/src/pjsua2/endpoint.cpp
@@ -797,7 +797,13 @@ void Endpoint::on_mwi_info(pjsua_acc_id acc_id,
pjsua_mwi_info *mwi_info)
{
OnMwiInfoParam prm;
- prm.state = pjsip_evsub_get_state(mwi_info->evsub);
+
+ if (mwi_info->evsub) {
+ prm.state = pjsip_evsub_get_state(mwi_info->evsub);
+ } else {
+ /* Unsolicited MWI */
+ prm.state = PJSIP_EVSUB_STATE_NULL;
+ }
prm.rdata.fromPj(*mwi_info->rdata);
Account *acc = lookupAcc(acc_id, "on_mwi_info()");