[asterisk-commits] file: branch 12 r406489 - /branches/12/res/res_pjsip_session.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jan 25 20:10:24 CST 2014


Author: file
Date: Sat Jan 25 20:10:22 2014
New Revision: 406489

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=406489
Log:
res_pjsip_session: Be less strict with core requested outgoing capabilities.

The core may (depending on circumstances) request a single codec on outgoing
calls. Many channel drivers ignore or treat this as a suggestion while still
including configured codecs. The res_pjsip_session logic treated this as
an explicit request, leaving out other configured codecs.

This change makes res_pjsip_session behave like other channel driver and simply
adds the requested codec to the list.

(closes issue ASTERISK-23082)
Reported by: xrobau

Review: https://reviewboard.asterisk.org/r/3140/

Modified:
    branches/12/res/res_pjsip_session.c

Modified: branches/12/res/res_pjsip_session.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip_session.c?view=diff&rev=406489&r1=406488&r2=406489
==============================================================================
--- branches/12/res/res_pjsip_session.c (original)
+++ branches/12/res/res_pjsip_session.c Sat Jan 25 20:10:22 2014
@@ -1250,7 +1250,11 @@
 		return NULL;
 	}
 
-	ast_format_cap_copy(session->req_caps, req_caps);
+	if (!ast_format_cap_is_empty(req_caps)) {
+		ast_format_cap_copy(session->req_caps, session->endpoint->media.codecs);
+		ast_format_cap_append(session->req_caps, req_caps);
+	}
+
 	if ((pjsip_dlg_add_usage(dlg, &session_module, NULL) != PJ_SUCCESS)) {
 		pjsip_inv_terminate(inv_session, 500, PJ_FALSE);
 		/* Since we are not notifying ourselves that the INVITE session is being terminated




More information about the asterisk-commits mailing list