-
- Downloads
Add vtable and methods for to_json and to_ami for Stasis messages
When a Stasis message type is defined in a loadable module, handling those messages for AMI and res_stasis events can be cumbersome. This patch adds a vtable to stasis_message_type, with to_ami and to_json virtual functions. These allow messages to be handled abstractly without putting module-specific code in core. As an example, the VarSet AMI event was refactored to use the to_ami virtual function. (closes issue ASTERISK-21817) Review: https://reviewboard.asterisk.org/r/2579/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Showing
- include/asterisk/stasis.h 101 additions, 20 deletionsinclude/asterisk/stasis.h
- main/manager.c 30 additions, 5 deletionsmain/manager.c
- main/manager_channels.c 0 additions, 48 deletionsmain/manager_channels.c
- main/parking.c 3 additions, 9 deletionsmain/parking.c
- main/stasis_channels.c 72 additions, 22 deletionsmain/stasis_channels.c
- main/stasis_message.c 33 additions, 1 deletionmain/stasis_message.c
- tests/test_stasis.c 191 additions, 14 deletionstests/test_stasis.c
- tests/test_stasis_channels.c 2 additions, 2 deletionstests/test_stasis_channels.c
Loading
Please register or sign in to comment