Re #1514: fixed the incoming call scenario, and changed disconnection code from Precondition Failure to Temporarily Unavailable
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@4136 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c
index 1453833..1e98bca 100644
--- a/pjsip/src/pjsua-lib/pjsua_media.c
+++ b/pjsip/src/pjsua-lib/pjsua_media.c
@@ -1313,8 +1313,10 @@
}
if (status != PJ_SUCCESS) {
- if (call->med_ch_info.status == PJ_SUCCESS)
+ if (call->med_ch_info.status == PJ_SUCCESS) {
call->med_ch_info.status = status;
+ call->med_ch_info.sip_err_code = PJSIP_SC_TEMPORARILY_UNAVAILABLE;
+ }
pjsua_media_prov_clean_up(call_id);
goto on_return;
}
@@ -1342,7 +1344,7 @@
custom_med_tp_flags);
if (!call_med->tp) {
status =
- PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_NOT_ACCEPTABLE);
+ PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_TEMPORARILY_UNAVAILABLE);
}
}
@@ -1355,7 +1357,7 @@
call->med_ch_info.status = status;
call->med_ch_info.med_idx = mi;
call->med_ch_info.state = call_med->tp_st;
- call->med_ch_info.sip_err_code = PJSIP_SC_NOT_ACCEPTABLE;
+ call->med_ch_info.sip_err_code = PJSIP_SC_TEMPORARILY_UNAVAILABLE;
pjsua_media_prov_clean_up(call_id);
goto on_return;
}