[asterisk-dev] [Code Review] Use 'remotesecret' when it is set instead of 'secret' when authenticating to a remote party

David Vossel reviewboard at asterisk.org
Thu Feb 17 11:48:13 CST 2011


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

Ship it!


This all looks functionally correct to me.  It would be nice if the sample config could be updated to better reflect the behavior of the 'secret' and 'remotesecret' options.  Something like "The 'remotesecret' option is only necessary if the password required to authenticate with the remote endpoint on an outgoing request is different than the one they use to authenticate with us, otherwise if left empty 'secret' will be used for both."  At least I think that makes sense.



/branches/1.6.2/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/1107/#comment6594>

    Do we even have to check SIP_OUTGOING here?  Isn't this function always used for building the outbound authentication?


- David


On 2011-02-14 11:58:28, Terry Wilson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1107/
> -----------------------------------------------------------
> 
> (Updated 2011-02-14 11:58:28)
> 
> 
> Review request for Asterisk Developers, Olle E Johansson and David Vossel.
> 
> 
> Summary
> -------
> 
> Asterisk 1.6.2+ has the 'remotesecret' config option which is documented to be the password we use when connecting out to a peer. The 'secret' option is supposed to be used for when we are authenticating an inbound request. 'remotesecret' currently works for registration, but for sending an INVITE the 'secret' is used instead. This patch tests if we are making an outgoing request and uses the peer remotesecret if it is set. Otherwise it still uses the secret as it always has.
> 
> 
> Diffs
> -----
> 
>   /branches/1.6.2/channels/chan_sip.c 307791 
> 
> Diff: https://reviewboard.asterisk.org/r/1107/diff
> 
> 
> Testing
> -------
> 
> Tested that a peer with a 'remotesecret' used that on an outbound call. Tested that if remotesecret is not set, secret is used.
> 
> 
> Thanks,
> 
> Terry
> 
>

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


More information about the asterisk-dev mailing list