[asterisk-commits] bmd: branch group/newcdr r127211 - in /team/group/newcdr: apps/ include/aster...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 1 17:02:31 CDT 2008
Author: bmd
Date: Tue Jul 1 17:02:30 2008
New Revision: 127211
URL: http://svn.digium.com/view/asterisk?view=rev&rev=127211
Log:
Some new events:
CEL_PICKUP - report a directed pickup event so you know what happens
when extension 200 is called but extension 300 arrives at the bridge.
CEL_FORWARD - signal a 302 redirect or other protocol-level forwarding
so that you can tell why a call runs off in a different direction due
to a phone being set to forward calls.
CEL_BRIDGE_UPDATE - report when a participant is masqueraded into a
bridge. My primary use for this is to figure out what's going on when
a bridge occurs with a chan_local channel which is then masqueraded
out when the remote party answers.
Modified:
team/group/newcdr/apps/app_dial.c
team/group/newcdr/apps/app_directed_pickup.c
team/group/newcdr/apps/app_queue.c
team/group/newcdr/include/asterisk/cel.h
team/group/newcdr/main/cel.c
team/group/newcdr/main/channel.c
Modified: team/group/newcdr/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_dial.c?view=diff&rev=127211&r1=127210&r2=127211
==============================================================================
--- team/group/newcdr/apps/app_dial.c (original)
+++ team/group/newcdr/apps/app_dial.c Tue Jul 1 17:02:30 2008
@@ -490,6 +490,9 @@
stuff = tmpchan;
tech = "Local";
}
+
+ ast_cel_report_event(in, CEL_FORWARD, NULL, c->call_forward, NULL);
+
/* Before processing channel, go ahead and check for forwarding */
ast_verb(3, "Now forwarding %s to '%s/%s' (thanks to %s)\n", in->name, tech, stuff, c->name);
/* If we have been told to ignore forwards, just set this channel to null and continue processing extensions normally */
Modified: team/group/newcdr/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_directed_pickup.c?view=diff&rev=127211&r1=127210&r2=127211
==============================================================================
--- team/group/newcdr/apps/app_directed_pickup.c (original)
+++ team/group/newcdr/apps/app_directed_pickup.c Tue Jul 1 17:02:30 2008
@@ -68,6 +68,7 @@
int res = 0;
ast_debug(1, "Call pickup on '%s' by '%s'\n", target->name, chan->name);
+ ast_cel_report_event(target, CEL_PICKUP, NULL, NULL, chan);
if ((res = ast_answer(chan))) {
ast_log(LOG_WARNING, "Unable to answer '%s'\n", chan->name);
Modified: team/group/newcdr/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_queue.c?view=diff&rev=127211&r1=127210&r2=127211
==============================================================================
--- team/group/newcdr/apps/app_queue.c (original)
+++ team/group/newcdr/apps/app_queue.c Tue Jul 1 17:02:30 2008
@@ -2564,6 +2564,9 @@
stuff = tmpchan;
tech = "Local";
}
+
+ ast_cel_report_event(in, CEL_FORWARD, NULL, o->chan->call_forward, NULL);
+
/* Before processing channel, go ahead and check for forwarding */
ast_verb(3, "Now forwarding %s to '%s/%s' (thanks to %s)\n", in->name, tech, stuff, o->chan->name);
/* Setup parameters */
Modified: team/group/newcdr/include/asterisk/cel.h
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/include/asterisk/cel.h?view=diff&rev=127211&r1=127210&r2=127211
==============================================================================
--- team/group/newcdr/include/asterisk/cel.h (original)
+++ team/group/newcdr/include/asterisk/cel.h Tue Jul 1 17:02:30 2008
@@ -84,6 +84,12 @@
CEL_USER_DEFINED = 21,
/*! the last channel with the given linkedid is retired */
CEL_LINKEDID_END = 22,
+ /*! a masquerade happened to alter the participants on a bridge */
+ CEL_BRIDGE_UPDATE = 23,
+ /*! a directed pickup was performed on this channel */
+ CEL_PICKUP = 24,
+ /*! this call was forwarded somewhere else */
+ CEL_FORWARD = 25,
};
/* there was in the early stages of design, a concept of struct ast_cel,
Modified: team/group/newcdr/main/cel.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/main/cel.c?view=diff&rev=127211&r1=127210&r2=127211
==============================================================================
--- team/group/newcdr/main/cel.c (original)
+++ team/group/newcdr/main/cel.c Tue Jul 1 17:02:30 2008
@@ -113,6 +113,8 @@
return CEL_BRIDGE_START;
else if (strcasecmp(eventname,"BRIDGE_END")==0)
return CEL_BRIDGE_END;
+ else if (strcasecmp(eventname,"BRIDGE_UPDATE")==0)
+ return CEL_BRIDGE_UPDATE;
else if (strcasecmp(eventname,"CONF_START")==0)
return CEL_CONF_START;
else if (strcasecmp(eventname,"CONF_END")==0)
@@ -133,6 +135,10 @@
return CEL_BLINDTRANSFER;
else if (strcasecmp(eventname,"ATTENDEDTRANSFER")==0)
return CEL_ATTENDEDTRANSFER;
+ else if (strcasecmp(eventname,"PICKUP")==0)
+ return CEL_PICKUP;
+ else if (strcasecmp(eventname,"FORWARD")==0)
+ return CEL_FORWARD;
else if (strcasecmp(eventname,"3WAY_START")==0)
return CEL_3WAY_START;
else if (strcasecmp(eventname,"3WAY_END")==0)
@@ -342,6 +348,8 @@
return "CEL_APP_END";
case CEL_BRIDGE_START:
return "CEL_BRIDGE_START";
+ case CEL_BRIDGE_UPDATE:
+ return "CEL_BRIDGE_UPDATE";
case CEL_BRIDGE_END:
return "CEL_BRIDGE_END";
case CEL_CONF_START:
@@ -364,6 +372,10 @@
return "CEL_BLINDTRANSFER";
case CEL_ATTENDEDTRANSFER:
return "CEL_ATTENDEDTRANSFER";
+ case CEL_PICKUP:
+ return "CEL_PICKUP";
+ case CEL_FORWARD:
+ return "CEL_FORWARD";
case CEL_3WAY_START:
return "CEL_3WAY_START";
case CEL_3WAY_END:
Modified: team/group/newcdr/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/main/channel.c?view=diff&rev=127211&r1=127210&r2=127211
==============================================================================
--- team/group/newcdr/main/channel.c (original)
+++ team/group/newcdr/main/channel.c Tue Jul 1 17:02:30 2008
@@ -4246,6 +4246,7 @@
if (original->_bridge) {
/* XXX - should we try to lock original->_bridge here? */
ast_string_field_set(original->_bridge, peeraccount, S_OR(clone->accountcode, ""));
+ ast_cel_report_event(original, CEL_BRIDGE_UPDATE, NULL, NULL, NULL);
}
ast_debug(1, "Putting channel %s in %d/%d formats\n", original->name, wformat, rformat);
More information about the asterisk-commits
mailing list