[asterisk-dev] [Code Review] 4367: chan_sip: stale nonce causes failure

Mark Michelson reviewboard at asterisk.org
Fri Jan 23 17:55:49 CST 2015


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


I had an offline conversation with Kevin about this. We're going to change the approach here so that the reregistration that uses the same call-id will match the registration we have on hand.

- Mark Michelson


On Jan. 23, 2015, 8:52 p.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4367/
> -----------------------------------------------------------
> 
> (Updated Jan. 23, 2015, 8:52 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24715
>     https://issues.asterisk.org/jira/browse/ASTERISK-24715
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> When refreshing (with a small expiration) a registration that was sent to chan_sip the nonce would be considered stale and reject the registration. What was happening was that the initial registration's "dialog" still existed in the dialogs container and upon refresh the dialog match algorithm would choose that as the "dialog" instead of the newly created one. This occurred because the algorithm did not check to see if the from tag matched if authentication info was available after the 401. So, it ended up assuming the original "dialog" was a match and stopped the search. The old "dialog" of course had an old nonce, thus the stale nonce message.
> 
> This fix attempts to leave the original functionality alone except in the case of a REGISTER. If a REGISTER is received then the from tag is always checked thus allowing the correct "dialog" to be selected.
> 
> 
> Diffs
> -----
> 
>   branches/11/channels/chan_sip.c 431070 
> 
> Diff: https://reviewboard.asterisk.org/r/4367/diff/
> 
> 
> Testing
> -------
> 
> Setup two asterisk systems, one to register and one to accept registers. Specified a small expiration in the configuration file and then watched as the primary system registered successfully to the secondary system.  Then upon refresh saw the notice message and received a registration rejection message. Applied the fix and the problem no longer occurred.
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150123/6e478912/attachment.html>


More information about the asterisk-dev mailing list