[asterisk-dev] [Code Review] Parsing of reg->username containing @domain

David Vossel dvossel at digium.com
Mon May 10 11:28:50 CDT 2010


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


I was about to commit this, but I found this during testing.


trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/628/#comment4220>

    This patch changes the behavior of how the p->fromdomain is used, which is the original reason the first patch had to be reverted.
    
    Here is an example of the config that would break.
    
    -------------------------------
    register => user at peer_1
    
    [peer_1]
    fromdomain=10.10.10.10
    -------------------------------
    
    The expected behavior for that register line is that peer_1 will be found, and the fromdomain will take its place as the address.  This is no longer the behavior because the check for p->fromdomain is no longer done in transmit register the same way as it used to be done.
    
    The parsing code still looks great though, sorry I missed this during my last pass.


- David


On 2010-05-06 04:21:36, Nick Lewis wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/628/
> -----------------------------------------------------------
> 
> (Updated 2010-05-06 04:21:36)
> 
> 
> Review request for Asterisk Developers and David Vossel.
> 
> 
> Summary
> -------
> 
> reg->username is parsed for each registration refresh rather than once on sip reload. A previously committed change that addressed this was reverted because it did not cater for registration strings that contained a peer name in the host field. This change does. 
> 
> 
> This addresses bug 14331.
>     https://issues.asterisk.org/view.php?id=14331
> 
> 
> Diffs
> -----
> 
>   trunk/channels/sip/config_parser.c 258227 
>   trunk/channels/chan_sip.c 258227 
>   trunk/channels/sip/include/sip.h 258228 
>   trunk/main/app.c 258227 
> 
> Diff: https://reviewboard.asterisk.org/r/628/diff
> 
> 
> Testing
> -------
> 
> Passes a new unit test for parsing usernames containing domains. Passes existing unit tests. Passes peername functional test with sip.conf snippet
> 
> [general]
> register=nick at quirk
> [quirk]
> fromdomain=10.10.235.48
> 
> 
> Thanks,
> 
> Nick
> 
>




More information about the asterisk-dev mailing list