aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-15 21:04:34 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-15 21:04:34 +0000
commit602a8e74b2442cb371e7fdc235572745953338ac (patch)
treef39f3de7c5f67ba6dea50afeea26c65d73e1d654 /apps
parent36ba567f703701abe0381d8032b6112a499d992e (diff)
Add pickup event to AMI. Also, fix AMI documentation.
(closes issue #16431) Reported by: syspert Patches: 20100112__issue16431.diff.txt uploaded by tilghman (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@240421 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_directed_pickup.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c
index bc25defe2..92e2938f4 100644
--- a/apps/app_directed_pickup.c
+++ b/apps/app_directed_pickup.c
@@ -40,6 +40,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/app.h"
#include "asterisk/features.h"
+#include "asterisk/manager.h"
#include "asterisk/callerid.h"
#include "asterisk/cel.h"
@@ -94,6 +95,7 @@ static int pickup_do(struct ast_channel *chan, struct ast_channel *target)
{
int res = 0;
struct ast_party_connected_line connected_caller;
+ struct ast_channel *chans[2] = { chan, target };
ast_debug(1, "Call pickup on '%s' by '%s'\n", target->name, chan->name);
ast_cel_report_event(target, AST_CEL_PICKUP, NULL, NULL, chan);
@@ -128,6 +130,10 @@ static int pickup_do(struct ast_channel *chan, struct ast_channel *target)
return -1;
}
+ /* If you want UniqueIDs, set channelvars in manager.conf to CHANNEL(uniqueid) */
+ ast_manager_event_multichan(EVENT_FLAG_CALL, "Pickup", 2, chans,
+ "Channel: %s\r\nTargetChannel: %s\r\n", chan->name, target->name);
+
return res;
}