[asterisk-dev] [Code Review] Help mitigate reinvite glares in the SIP channel driver

Mark Michelson reviewboard at asterisk.org
Wed May 23 17:46:27 CDT 2012


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

Review request for Asterisk Developers.


Summary
-------

There are times where multiple Asterisk servers are peered together over SIP. In such situations, it is possible for both Asterisk servers to attempt to send direct media reinvites to each other simultaneously. This results in a glare situation in which each of the Asterisk servers sends a 491 to the other. After a waiting period, the reinvites are re-attempted. This waiting period can potentially be distracting since it can cause the media to take multiple seconds to finalize, especially if more than 2 Asterisk servers are involved.

This patch introduces a new SIP peer option called "directmedia_outgoing". If enabled, then when communicating with the peer, Asterisk will only attempt to send reinvites if the call direction is outgoing. The assumption is that the peer Asterisk server will also have this setting enabled. This way, when the two Asterisk servers communicate, they will never attempt to send direct media reinvites to each other. Instead, it will always be the peer that placed the call that will send the direct media reinvite.


Diffs
-----

  /trunk/channels/chan_sip.c 367417 
  /trunk/channels/sip/include/sip.h 367417 
  /trunk/configs/sip.conf.sample 367417 

Diff: https://reviewboard.asterisk.org/r/1946/diff


Testing
-------

I have tested this by running two Asterisk servers and ensuring that the option was honored and that the media streams were still set up properly.


Thanks,

Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120523/f537def3/attachment.htm>


More information about the asterisk-dev mailing list