[asterisk-dev] [Code Review] 2532: Migrate a slew of AMI events over to Stasis-Core

Matt Jordan reviewboard at asterisk.org
Mon May 13 12:23:53 CDT 2013


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

Review request for Asterisk Developers.


Bugs: ASTERISK-21462
    https://issues.asterisk.org/jira/browse/ASTERISK-21462


Repository: Asterisk


Description
-------

This patch refactors a number of AMI events over to Stasis-Core. This includes:
* ChanSpyStart/Stop
* MonitorStart/Stop
* MusicOnHoldStart/Stop
* FullyBooted/Reload
* All VoiceMail/MWI related events

Some infrastructure changes were also made in order to support the new events. This included:
* A new generic AMI topic and message type. Generic AMI messages have a JSON blob that conforms to the following:
 { "type": s, "class_type": s, "event": o}
 where type is the AMI event type; class_type is the AMI class authorization; event is a sequence of key/value pairs that will be directly outputted to AMI.
* MWI stasis information was renamed to better reflect the naming conventions used
* MWI objects can now reference a channel snapshot. Often, an MWI chance occurs because a channel modified the state of a mailbox, and having direct access to a snapshot of the channel at that moment in time is important.

In general, this patch makes a number of trade-offs between what AMI has historically output and what makes the most sense for Stasis-Core to provide. A good example of this are the number of message types defined for the various media/channel related events, as well as what is published to the generic manager topic versus the already defined system topic. The approach taken here was to push information that only AMI consumes to AMI, and if future consumers want that information, to refactor those messages to another topic at that time.


Diffs
-----

  /team/mjordan/ami-refactoring/main/manager_mwi.c 388381 
  /trunk/CHANGES 388522 
  /trunk/apps/app_chanspy.c 388522 
  /trunk/apps/app_fax.c 388522 
  /trunk/apps/app_minivm.c 388522 
  /trunk/apps/app_voicemail.c 388522 
  /trunk/channels/chan_dahdi.c 388522 
  /trunk/channels/chan_iax2.c 388522 
  /trunk/channels/chan_mgcp.c 388522 
  /trunk/channels/chan_sip.c 388522 
  /trunk/channels/chan_skinny.c 388522 
  /trunk/channels/chan_unistim.c 388522 
  /trunk/channels/sig_pri.c 388522 
  /trunk/include/asterisk/_private.h 388522 
  /trunk/include/asterisk/app.h 388522 
  /trunk/include/asterisk/json.h 388522 
  /trunk/include/asterisk/manager.h 388522 
  /trunk/include/asterisk/stasis_channels.h 388522 
  /trunk/main/app.c 388522 
  /trunk/main/asterisk.c 388522 
  /trunk/main/cdr.c 388522 
  /trunk/main/cli.c 388522 
  /trunk/main/dnsmgr.c 388522 
  /trunk/main/enum.c 388522 
  /trunk/main/json.c 388522 
  /trunk/main/loader.c 388522 
  /trunk/main/manager.c 388522 
  /trunk/main/manager_channels.c 388522 
  /trunk/main/pbx.c 388522 
  /trunk/main/stasis_channels.c 388522 
  /trunk/pbx/pbx_dundi.c 388522 
  /trunk/res/res_config_odbc.c 388522 
  /trunk/res/res_fax.c 388522 
  /trunk/res/res_jabber.c 388522 
  /trunk/res/res_monitor.c 388522 
  /trunk/res/res_musiconhold.c 388522 
  /trunk/res/res_sip_mwi.c 388522 
  /trunk/res/res_xmpp.c 388522 

Diff: https://reviewboard.asterisk.org/r/2532/diff/


Testing
-------


Thanks,

Matt Jordan

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


More information about the asterisk-dev mailing list