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

Joshua Colp reviewboard at asterisk.org
Wed Jun 19 08:05:57 CDT 2013



> On June 18, 2013, 3:55 p.m., Mark Michelson wrote:
> > /team/group/pimp_my_sip/res/res_sip_pubsub.c, line 420
> > <https://reviewboard.asterisk.org/r/2630/diff/1/?file=39788#file39788line420>
> >
> >     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.

I shamelessly stole this from you. :P


- Joshua


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


On June 19, 2013, 1:05 p.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2630/
> -----------------------------------------------------------
> 
> (Updated June 19, 2013, 1:05 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/20130619/44aad071/attachment.htm>


More information about the asterisk-dev mailing list