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

Mark Michelson reviewboard at asterisk.org
Tue May 29 10:04:36 CDT 2012


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



/trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/1946/#comment11826>

    I decided to do another round of testing before committing and noticed that despite having directmedia=outgoing set, I would see reinvite glares occasionally. I then noticed this block of code. I had meant to be returning here instead of continuing with an unlocked sip_pvt and channel. Adding the return results in one-way audio in my tests, so I need to figure out why that is happening and how to fix it.


- Mark


On May 25, 2012, 2:12 p.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1946/
> -----------------------------------------------------------
> 
> (Updated May 25, 2012, 2:12 p.m.)
> 
> 
> 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 367639 
>   /trunk/channels/sip/include/sip.h 367639 
>   /trunk/configs/sip.conf.sample 367639 
> 
> 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/20120529/e9ac028a/attachment.htm>


More information about the asterisk-dev mailing list