Answer with multiple codecs if the underlying pjproject supports it.
authorJoshua Colp <jcolp@digium.com>
Thu, 1 Aug 2013 11:21:28 +0000 (11:21 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 1 Aug 2013 11:21:28 +0000 (11:21 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395938 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_pjsip_session.c

index fd13608..13c1e1d 100644 (file)
@@ -947,6 +947,9 @@ int ast_sip_session_create_invite(struct ast_sip_session *session, pjsip_tx_data
 
        pjsip_inv_set_local_sdp(session->inv_session, offer);
        pjmedia_sdp_neg_set_prefer_remote_codec_order(session->inv_session->neg, PJ_FALSE);
+#ifdef PJMEDIA_SDP_NEG_ANSWER_MULTIPLE_CODECS
+       pjmedia_sdp_neg_set_answer_multiple_codecs(session->inv_session->neg, PJ_TRUE);
+#endif
        if (pjsip_inv_invite(session->inv_session, tdata) != PJ_SUCCESS) {
                return -1;
        }
@@ -1459,6 +1462,9 @@ static int new_invite(void *data)
        } else {
                pjsip_inv_set_local_sdp(invite->session->inv_session, local);
                pjmedia_sdp_neg_set_prefer_remote_codec_order(invite->session->inv_session->neg, PJ_FALSE);
+#ifdef PJMEDIA_SDP_NEG_ANSWER_MULTIPLE_CODECS
+               pjmedia_sdp_neg_set_answer_multiple_codecs(invite->session->inv_session->neg, PJ_TRUE);
+#endif
        }
 
        pjsip_timer_setting_default(&timer);