[asterisk-dev] [Code Review] Patch to add a SIP peer configuration feature to allow the peer's configured codecs to take precedence on an outgoing call.
Brent Eagles
reviewboard at asterisk.org
Fri Dec 7 10:12:10 CST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2236/
-----------------------------------------------------------
(Updated Dec. 7, 2012, 10:12 a.m.)
Review request for Asterisk Developers, Joshua Colp and Mark Michelson.
Changes
-------
If prefcaps isn't already included in prefs, then it shouldn't be in there anyways. Removing the ordering loop and simply bypassing the prefcaps if the override option is set.
Summary
-------
This patch adds a peer configuration property 'override_codecs' (better name suggestions welcome of course) that allows the peer's configured 'allowed' codecs to be listed first on an outgoing call. If the codec for the initiating request is not already listed in the peer's configuration, it is listed after the peer's listed codecs. The consequence is that Asterisk's usual efforts to prefer avoiding transcoding can be overridden on a peer-by-peer basis where appropriate. Undoubtedly a "use-with-caution" feature.
Diffs (updated)
-----
/trunk/channels/chan_sip.c 377376
/trunk/channels/sip/include/sip.h 377376
/trunk/configs/sip.conf.sample 377376
Diff: https://reviewboard.asterisk.org/r/2236/diff
Testing
-------
Manual testing performed.
Peer A -> Asterisk Host A -> Asterisk Host B (with patch applied) -> Peer B
Peer A is configured to use ulaw in Host A's sip.conf, Peer B is configured with:
disallow=all
allow=alaw
allow=ulaw
override_codecs=yes
Media from Peer A to Host A and Host A to Host B is in ulaw where the invite from Host B to Peer B specifies alaw. Media from Host B to Peer B proceeds with alaw.
Thanks,
Brent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121207/a7d700fd/attachment-0001.htm>
More information about the asterisk-dev
mailing list