From cf21644d6a4b757999be136ab1b90ba5cf6ac3bc Mon Sep 17 00:00:00 2001 From: Scott Griepentrog Date: Thu, 22 May 2014 16:09:51 +0000 Subject: ARI: Add ability to raise arbitrary User Events User events can now be generated from ARI. Events can be signalled with arbitrary json variables, and include one or more of channel, bridge, or endpoint snapshots. An application must be specified which will receive the event message (other applications can subscribe to it). The message will also be delivered via AMI provided a channel is attached. Dialplan generated user event messages are still transmitted via the channel, and will only be received by a stasis application they are attached to or if the channel is subscribed to. This change also introduces the multi object blob mechanism used to send multiple snapshot types in a single message. The dialplan app UserEvent was also changed to use multi object blob, and a new stasis message type created to handle them. ASTERISK-22697 #close Review: https://reviewboard.asterisk.org/r/3494/ ........ Merged revisions 414405 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414406 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/stasis_endpoints.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'main/stasis_endpoints.c') diff --git a/main/stasis_endpoints.c b/main/stasis_endpoints.c index 3f8d32419..e3f5a3f15 100644 --- a/main/stasis_endpoints.c +++ b/main/stasis_endpoints.c @@ -193,7 +193,11 @@ struct ast_endpoint_snapshot *ast_endpoint_latest_snapshot(const char *tech, RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup); struct ast_endpoint_snapshot *snapshot; - ast_asprintf(&id, "%s/%s", tech, name); + if (ast_strlen_zero(name)) { + ast_asprintf(&id, "%s", tech); + } else { + ast_asprintf(&id, "%s/%s", tech, name); + } if (!id) { return NULL; } -- cgit v1.2.3