Manager events from the "moremanager" branch
authorOlle Johansson <oej@edvina.net>
Tue, 27 Nov 2007 19:50:12 +0000 (19:50 +0000)
committerOlle Johansson <oej@edvina.net>
Tue, 27 Nov 2007 19:50:12 +0000 (19:50 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89706 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_gtalk.c

index 1514dc9..0d04068 100644 (file)
@@ -492,6 +492,8 @@ static int gtalk_answer(struct ast_channel *ast)
        ast_debug(1, "Answer!\n");
        ast_mutex_lock(&p->lock);
        gtalk_invite(p, p->them, p->us,p->sid, 0);
+       manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate", "Channel: %s\r\nChanneltype: %s\r\nGtalk-SID: %s\r\n",
+               ast->name, "GTALK", p->sid);
        ast_mutex_unlock(&p->lock);
        return res;
 }
@@ -1003,8 +1005,11 @@ static struct ast_channel *gtalk_new(struct gtalk *client, struct gtalk_pvt *i,
                tmp->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
                ast_hangup(tmp);
                tmp = NULL;
+       } else {
+               manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate",
+                       "Channel: %s\r\nChanneltype: %s\r\nGtalk-SID: %s\r\n",
+                       i->owner ? i->owner->name : "", "Gtalk", i->sid);
        }
-
        return tmp;
 }