PJSIP: Add unhold on reinvite without SDP behavior
authorJonathan Rose <jrose@digium.com>
Thu, 9 Jan 2014 23:52:09 +0000 (23:52 +0000)
committerJonathan Rose <jrose@digium.com>
Thu, 9 Jan 2014 23:52:09 +0000 (23:52 +0000)
Review: https://reviewboard.asterisk.org/r/3106/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405270 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_pjsip_session.c

index d548d29..a00299e 100644 (file)
@@ -895,9 +895,16 @@ static pj_bool_t session_reinvite_on_rx_request(pjsip_rx_data *rdata)
        }
 
        if (!(sdp_info = pjsip_rdata_get_sdp_info(rdata)) ||
-               (sdp_info->sdp_err != PJ_SUCCESS) ||
-               !sdp_info->sdp ||
-               !sdp_requires_deferral(session, sdp_info->sdp)) {
+               (sdp_info->sdp_err != PJ_SUCCESS)) {
+               return PJ_FALSE;
+       }
+
+       if (!sdp_info->sdp) {
+               ast_queue_unhold(session->channel);
+               return PJ_FALSE;
+       }
+
+       if (!sdp_requires_deferral(session, sdp_info->sdp)) {
                return PJ_FALSE;
        }