[asterisk-dev] [Code Review] 2490: stasis: Swap out network_change events for network_change stasis messages sent to a new 'system' topic.

jrose reviewboard at asterisk.org
Thu May 2 10:54:54 CDT 2013



> On May 1, 2013, 10:38 p.m., Matt Jordan wrote:
> > /trunk/include/asterisk.h, lines 129-132
> > <https://reviewboard.asterisk.org/r/2490/diff/1/?file=37044#file37044line129>
> >
> >     These are public. Definitely give them some doxygen.
> >     
> >     (And yes, the functions above them don't have doxygen comments, but if those functions went and jumped off a bridge would you jump too?)

I really meant to climb back up on the bridge prior to posting this review, but forgot to and fell down.


> On May 1, 2013, 10:38 p.m., Matt Jordan wrote:
> > /trunk/channels/chan_iax2.c, line 1377
> > <https://reviewboard.asterisk.org/r/2490/diff/1/?file=37042#file37042line1377>
> >
> >     I know this was a debug message before, but it feels like if we decide to initiate a Flurry (tm) of registration renewals, this should at least be a Verbose message.

Fixed here and in chan_sip.


> On May 1, 2013, 10:38 p.m., Matt Jordan wrote:
> > /trunk/include/asterisk/event_defs.h, lines 50-62
> > <https://reviewboard.asterisk.org/r/2490/diff/1/?file=37045#file37045line50>
> >
> >     It looks like we forgot to remove DEVICE_STATE and PRESENCE when Kinsey's patches went in. Double check, but I think you can delete those two as well.

AST_EVENT_DEVICE_STATE_CHANGE is still consumed by res_corosync (nothing generates them, so it's a bit of a moot point, but it probably needs to be updated to use the stasis-based replacement and the removal of these event types/names should take place with that effort. It's also an extended support module, so ehhhhh). It was probably missed because the actual subscription of the event is done in a for loop through an array of event types.

AST_EVENT_PRESENCE_STATE can be tossed safely though.


- jrose


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


On May 1, 2013, 5:27 p.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2490/
> -----------------------------------------------------------
> 
> (Updated May 1, 2013, 5:27 p.m.)
> 
> 
> Review request for Asterisk Developers, David Lee, kmoore, and Matt Jordan.
> 
> 
> Bugs: ASTERISK-21103
>     https://issues.asterisk.org/jira/browse/ASTERISK-21103
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> A continuation of the effort started with https://reviewboard.asterisk.org/r/2481
> 
> This one replaces the NETWORK_CHANGE events. I added the system topic and it is stored in/is registed by asterisk.c at startup.
> It's worth noting that NETWORK_CHANGE events had no data associated with them before. Since generating stasis messages ao2_refs the
> data going in, some ao2_object has to be included, so I went ahead and gave it a blank JSON object wrapped in a json_payload similar
> to how I handled the ACL change messages.
> 
> Part 2/3
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_iax2.c 387038 
>   /trunk/channels/chan_sip.c 387038 
>   /trunk/include/asterisk.h 387038 
>   /trunk/include/asterisk/event_defs.h 387038 
>   /trunk/main/asterisk.c 387038 
>   /trunk/main/event.c 387038 
>   /trunk/res/res_stun_monitor.c 387038 
> 
> Diff: https://reviewboard.asterisk.org/r/2490/diff/
> 
> 
> Testing
> -------
> 
> Since the only thing that generates these messages under normal conditions is res_stun_monitor and I don't really know how to or particularly want to set up a stun server, I simply used a test function that would generate the messages in the same way as they are when the STUN monitor would issue them. I made sure that each of the consumers (which are just chan_sip and chan_iax2) reacted to the messages as anticipated and they did.
> 
> 
> Thanks,
> 
> jrose
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130502/2e0d9ba4/attachment.htm>


More information about the asterisk-dev mailing list