[asterisk-dev] [Code Review] 2490: stasis: Swap out network_change events for network_change stasis messages sent to a new 'system' topic.
opticron
reviewboard at asterisk.org
Thu May 2 11:30:21 CDT 2013
> On May 1, 2013, 5: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.
>
> jrose wrote:
> 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.
These should be left in place for now since res_corosync (once converted) will rely on the binary format of the events in the legacy event system to talk to other systems and the numbers associated with each event type identifier must match for events to be recognized correctly. Once res_corosync is refactored, this will probably be prunable to what is absolutely necessary for the binary format of the event system to remain intact.
- opticron
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2490/#review8416
-----------------------------------------------------------
On May 2, 2013, 10:55 a.m., jrose wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2490/
> -----------------------------------------------------------
>
> (Updated May 2, 2013, 10:55 a.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/res/res_stun_monitor.c 387038
> /trunk/main/event.c 387038
> /trunk/main/asterisk.c 387038
> /trunk/include/asterisk.h 387038
> /trunk/include/asterisk/event_defs.h 387038
> /trunk/channels/chan_sip.c 387038
> /trunk/channels/chan_iax2.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/b4d71fb8/attachment.htm>
More information about the asterisk-dev
mailing list