[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 09:44:25 CST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2236/
-----------------------------------------------------------

Review request for Asterisk Developers, Joshua Colp and Mark Michelson.


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
-----

  /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/fa99475f/attachment.htm>


More information about the asterisk-dev mailing list