[asterisk-commits] kmoore: branch kmoore/stasis-channel_events r383968 - /team/kmoore/stasis-cha...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 27 08:27:11 CDT 2013


Author: kmoore
Date: Wed Mar 27 08:27:07 2013
New Revision: 383968

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=383968
Log:
Allow app_stasis to send out channel events

Modified:
    team/kmoore/stasis-channel_events/apps/app_stasis.c

Modified: team/kmoore/stasis-channel_events/apps/app_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-channel_events/apps/app_stasis.c?view=diff&rev=383968&r1=383967&r2=383968
==============================================================================
--- team/kmoore/stasis-channel_events/apps/app_stasis.c (original)
+++ team/kmoore/stasis-channel_events/apps/app_stasis.c Wed Mar 27 08:27:07 2013
@@ -333,6 +333,16 @@
 		}
 		app_send(app, msg);
 	}
+	if (ast_channel_blob() == stasis_message_type(message)) {
+		RAII_VAR(struct ast_json *, msg, NULL, ast_json_unref);
+		struct ast_channel_blob *obj = stasis_message_data(message);
+
+		msg = stasis_app_event_create("channel-event", obj->snapshot, obj->blob);
+		if (!msg) {
+			return;
+		}
+		app_send(app, msg);
+	}
 	if (stasis_subscription_final_message(sub, message)) {
 		ao2_cleanup(data);
 	}




More information about the asterisk-commits mailing list