mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
This change adds a framework in res_stasis for handling events from channel topics. JSON event generation and validation code is created from event documentation in rest-api/api-docs/events.json to assist in JSON event generation, ensure consistency, and ensure that accurate documentation is available for ALL events that are received by res_stasis applications. The userevent application has been refactored along with the code that handles userevent channel blob events to pass the headers as key/value pairs in the JSON blob. As a side-effect, app_userevent now handles duplicate keys by overwriting the previous value. Review: https://reviewboard.asterisk.org/r/2428/ (closes issue ASTERISK-21180) Patch-By: Kinsey Moore <kmoore@digium.com> git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
11 lines
384 B
Plaintext
11 lines
384 B
Plaintext
struct ast_json *stasis_json_event_{{c_id}}_create(
|
|
{{#bridge}}
|
|
struct ast_bridge_snapshot *bridge_snapshot{{#channel}},{{/channel}}{{^channel}}{{#has_properties}},{{/has_properties}}{{/channel}}
|
|
{{/bridge}}
|
|
{{#channel}}
|
|
struct ast_channel_snapshot *channel_snapshot{{#has_properties}},{{/has_properties}}
|
|
{{/channel}}
|
|
{{#has_properties}}
|
|
struct ast_json *blob
|
|
{{/has_properties}}
|