[asterisk-dev] [Code Review] 2630: res_sip_pubsub: Implement documented PUBLISH API.

Mark Michelson reviewboard at asterisk.org
Tue Jun 18 10:55:48 CDT 2013


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



/team/group/pimp_my_sip/res/res_sip_pubsub.c
<https://reviewboard.asterisk.org/r/2630/#comment17482>

    I'm not sure if you tried it, but you should be able to get away with the less awkward 
    
    ast_assert(!ast_strlen_zero(datastore->uid));
    
    here. ast_assert() expects an int argument, and the ! operator returns an int.



/team/group/pimp_my_sip/res/res_sip_pubsub.c
<https://reviewboard.asterisk.org/r/2630/#comment17517>

    This function is called from a scheduler thread. If the handler's publish_expire() callback attempts to use any PJLIB functions, then an assertion will be triggered.


- Mark Michelson


On June 17, 2013, 12:38 p.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2630/
> -----------------------------------------------------------
> 
> (Updated June 17, 2013, 12:38 p.m.)
> 
> 
> Review request for Asterisk Developers and Mark Michelson.
> 
> 
> Bugs: ASTERISK-21452
>     https://issues.asterisk.org/jira/browse/ASTERISK-21452
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> The attached change implements the PUBLISH API for being an ESC as documented on the Asterisk wiki. The only changes involved were to add missing arguments to functions and to add a function for sending a response (from an API perspective).
> 
> What does this mean?
> 
> You can register publish handlers with res_sip_pubsub and they get invoked when certain things happen (new publish, terminated, expired, etc). Publish handlers specify the event they want and res_sip_pubsub dispatches accordingly. Note that res_sip_pubsub does *not* filter the content type. This is up to the handler.
> 
> 
> Diffs
> -----
> 
>   /team/group/pimp_my_sip/include/asterisk/res_sip_pubsub.h 391979 
>   /team/group/pimp_my_sip/res/res_sip_pubsub.c 391979 
>   /team/group/pimp_my_sip/res/res_sip_pubsub.exports.in 391979 
> 
> Diff: https://reviewboard.asterisk.org/r/2630/diff/
> 
> 
> Testing
> -------
> 
> I wrote a quick hack module (which I'm not attaching, cause it's really silly and useless) which accepts "presence" PUBLISH messages and spits out log messages when things happen. Confirmed that stuff works as expected using that.
> 
> 
> Thanks,
> 
> Joshua Colp
> 
>

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


More information about the asterisk-dev mailing list