summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2012-05-22 04:09:53 +0000
committerBenny Prijono <bennylp@teluu.com>2012-05-22 04:09:53 +0000
commite602c2737ef11db6f1af18b8977338dde7605606 (patch)
tree41cf22fbdd371b3fd223cf69d517e075d033b7fc
parent88704a49c5ea1bf82109be5a839e7f3eb6939d1c (diff)
Re #1514: fixed the incoming call scenario, and changed disconnection code from Precondition Failure to Temporarily Unavailable
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4136 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c2
-rw-r--r--pjsip/src/pjsua-lib/pjsua_media.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index 5a123c84..948c54f7 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -375,7 +375,7 @@ on_make_call_med_tp_complete(pjsua_call_id call_id,
pj_str_t err_str;
int title_len;
- call->last_code = PJSIP_SC_PRECONDITION_FAILURE;
+ call->last_code = PJSIP_SC_TEMPORARILY_UNAVAILABLE;
pj_strcpy2(&call->last_text, "Media init error: ");
title_len = call->last_text.slen;
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c
index 14538336..1e98bca7 100644
--- a/pjsip/src/pjsua-lib/pjsua_media.c
+++ b/pjsip/src/pjsua-lib/pjsua_media.c
@@ -1313,8 +1313,10 @@ static pj_status_t media_channel_init_cb(pjsua_call_id call_id,
}
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 @@ static pj_status_t media_channel_init_cb(pjsua_call_id call_id,
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 @@ static pj_status_t media_channel_init_cb(pjsua_call_id call_id,
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;
}