[asterisk-dev] [Code Review] 2584: New SIP Channel Driver - SIP Qualify Support

Joshua Colp reviewboard at asterisk.org
Wed Jun 5 14:56:23 CDT 2013


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



/team/group/pimp_my_sip/res/res_sip/sip_options.c
<https://reviewboard.asterisk.org/r/2584/#comment17324>

    In prep for making this available for use elsewhere I'd say make this a first class structure in res_sip.h



/team/group/pimp_my_sip/res/res_sip/sip_options.c
<https://reviewboard.asterisk.org/r/2584/#comment17325>

    Your comment is good but the function name doesn't reflect what it does imo. find_or_create_contact_status I think would be bettre.



/team/group/pimp_my_sip/res/res_sip/sip_options.c
<https://reviewboard.asterisk.org/r/2584/#comment17327>

    Copying this is overkill, you can allocate a new one with the same id and update that way.



/team/group/pimp_my_sip/res/res_sip/sip_options.c
<https://reviewboard.asterisk.org/r/2584/#comment17331>

    You are using this function for multiple purposes which confuses me. Make two separate functions.



/team/group/pimp_my_sip/res/res_sip/sip_options.c
<https://reviewboard.asterisk.org/r/2584/#comment17329>

    I really want this to be configurable either way.



/team/group/pimp_my_sip/res/res_sip/sip_options.c
<https://reviewboard.asterisk.org/r/2584/#comment17330>

    This is incorrect. Assume the status is unchanged until proven otherwise, this way consumers of this information don't flip flop and wrongfully assume they are unavailable when they are.



/team/group/pimp_my_sip/res/res_sip/sip_options.c
<https://reviewboard.asterisk.org/r/2584/#comment17332>

    Still a race condition here with cancelling and execution where data becomes invalid. You need to bump up the ref before going in, and cancel outside ideally (ie: not in the destructor).
    
    You might try drawing some inspiration from my contact expiration review.



/team/group/pimp_my_sip/res/res_sip/sip_options.c
<https://reviewboard.asterisk.org/r/2584/#comment17333>

    Persist the reachability out as well.


- Joshua Colp


On June 4, 2013, 9:16 p.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2584/
> -----------------------------------------------------------
> 
> (Updated June 4, 2013, 9:16 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-21499
>     https://issues.asterisk.org/jira/browse/ASTERISK-21499
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Completed the work that had been started for SIP qualify support in the new channel driver.  Qualify requests are now sent for every contact associated with an endpoint.  When a contact is registered a check is done to make sure it is available and the round trip time is stored for reference.  The contact continues to be checked at a specified interval (qualify_frequency - now set on the AOR) until it is removed.
> 
> A CLI command ("sip qualify <endpoint>") is also available that when issued will send qualifies for all contacts on the given endpoint.  Also added CLI command "sip show endpoint <endpoint>" that will show all the contacts and their status for the given endpoint.
> 
> 
> Diffs
> -----
> 
>   /team/group/pimp_my_sip/include/asterisk/res_sip.h 390435 
>   /team/group/pimp_my_sip/res/res_sip.c 390435 
>   /team/group/pimp_my_sip/res/res_sip/location.c 390435 
>   /team/group/pimp_my_sip/res/res_sip/sip_configuration.c 390435 
>   /team/group/pimp_my_sip/res/res_sip/sip_options.c 390435 
>   /team/group/pimp_my_sip/res/res_sip_registrar.c 390435 
> 
> Diff: https://reviewboard.asterisk.org/r/2584/diff/
> 
> 
> Testing
> -------
> 
> Manually tested by registering contacts and making sure the qualify requests were sent out and scheduled.
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

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


More information about the asterisk-dev mailing list