Add manager event for local channel semi-bridge
authorOlle Johansson <oej@edvina.net>
Wed, 24 Aug 2011 09:09:53 +0000 (09:09 +0000)
committerOlle Johansson <oej@edvina.net>
Wed, 24 Aug 2011 09:09:53 +0000 (09:09 +0000)
(issue AST-17623)

Review: https://reviewboard.asterisk.org/r/1154

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333070 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_local.c

index f2de8e1..becba86 100644 (file)
@@ -905,6 +905,19 @@ static int local_call(struct ast_channel *ast, char *dest, int timeout)
                goto return_cleanup;
        }
 
+       manager_event(EVENT_FLAG_CALL, "LocalBridge",
+                     "Channel1: %s\r\n"
+                     "Channel2: %s\r\n"
+                     "Uniqueid1: %s\r\n"
+                     "Uniqueid2: %s\r\n"
+                     "Context: %s\r\n"
+                     "Exten: %s\r\n"
+                     "LocalOptimization: %s\n",
+                       p->owner->name, p->chan->name, p->owner->uniqueid, p->chan->uniqueid,
+                       p->context, p->exten,
+                       ast_test_flag(p, LOCAL_NO_OPTIMIZATION) ? "Yes" : "No");
+
+
        /* Start switch on sub channel */
        if (!(res = ast_pbx_start(chan))) {
                ao2_lock(p);