[asterisk-dev] [Code Review] WebSocket SIP Support

Kevin Fleming reviewboard at asterisk.org
Thu Jul 5 15:31:01 CDT 2012


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



/trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/2008/#comment12553>

    I suspect this is going to be pretty common, so it might be worth putting some mechanism into the WebSocket API itself for making the socket non-blocking.



/trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/2008/#comment12554>

    Will this leak req.data?



/trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/2008/#comment12555>

    Is this necessary? The entire 'req' structure was memset() to zeroes above, unless I'm misreading the code.



/trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/2008/#comment12556>

    Ugh... 32 possible combinations, and not all are covered here. This begs for a better solution, like maybe an array of 32 static strings and then treating 'transports' as an index into it.



/trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/2008/#comment12557>

    It would be better to explicitly check for AVPF and SAVPF, rather than accepting AVP42 or other bogus profiles.



/trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/2008/#comment12558>

    Might as well use strlen(";transport=") here, as the compiler will compute it at compile time anyway.



/trunk/channels/sip/include/sip.h
<https://reviewboard.asterisk.org/r/2008/#comment12559>

    'Support a minimal AVPF-compatible profile'... since we don't fully implement AVPF.



/trunk/configs/sip.conf.sample
<https://reviewboard.asterisk.org/r/2008/#comment12560>

    'with media streams using the AVPF RTP profile'


- Kevin


On July 2, 2012, 9:36 a.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2008/
> -----------------------------------------------------------
> 
> (Updated July 2, 2012, 9:36 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> These changes add WebSocket transport support to chan_sip and fix some minor issues uncovered in the stack when used with WebSocket as a transport.
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_sip.c 369517 
>   /trunk/channels/sip/include/sip.h 369516 
>   /trunk/channels/sip/sdp_crypto.c 369516 
>   /trunk/channels/sip/security_events.c 369516 
>   /trunk/configs/sip.conf.sample 369516 
> 
> Diff: https://reviewboard.asterisk.org/r/2008/diff
> 
> 
> Testing
> -------
> 
> Tested using sipml5 javascript SIP stack. Confirmed protocol traffic is correct, that connections are shutdown properly when they should be, that registration works, and that calling works.
> 
> 
> Thanks,
> 
> Joshua
> 
>

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


More information about the asterisk-dev mailing list