[asterisk-dev] [Code Review] 3131: PJSIP: support 'allow=all'
Scott Griepentrog
reviewboard at asterisk.org
Fri Jan 17 15:53:31 CST 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3131/
-----------------------------------------------------------
(Updated Jan. 17, 2014, 3:53 p.m.)
Status
------
This change has been marked as submitted.
Review request for Asterisk Developers.
Bugs: ASTERISK-23018
https://issues.asterisk.org/jira/browse/ASTERISK-23018
Repository: Asterisk
Description
-------
Changes to support allow=all in PJSIP.conf:
* added ast_codec_pref_append_all() that intelligently adds all yet unspecified codecs to the preference list
* Sorcery function ast_parse_allow_disallow() now uses codec_pref_append_all on pref list when all is supplied
* in create_outgoing_sdp_stream(), the loop checking codecs to add will now skip a codec that doesn't have a payload code instead of bailing (fixes issue with deferred sdp bombing on testlaw)
* switched display of codecs (reverse codec_handler_fn in sorcery.c) from caps to prefs, so that cli 'pjsip show endpoint x' shows allowed codec list in preference order matching the configuration
Note that it is now possible to put all at the end of an allow list, such as allow=ulaw,all which will set ulaw as preferred (first in list) but still have every other available codec listed. Also possible is to remove specific codecs after all, such as allow=ulaw,all,!g729 which puts ulaw first, then every other codec, but removes g729.
The codec order otherwise is currently set by the internal codec table list order, which is arbitrary but functional.
Diffs
-----
/branches/12/res/res_pjsip_sdp_rtp.c 405637
/branches/12/main/sorcery.c 405637
/branches/12/main/frame.c 405637
/branches/12/main/format_pref.c 405637
/branches/12/include/asterisk/format_pref.h 405637
Diff: https://reviewboard.asterisk.org/r/3131/diff/
Testing
-------
Tested with new test allow_all_sdp (https://reviewboard.asterisk.org/r/3132/) with success. Also ran pjsip basic_calls.
Thanks,
Scott Griepentrog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140117/ce502446/attachment.html>
More information about the asterisk-dev
mailing list