Add missing headers to AMI UnParkedCall event to uniquely identify the call.
authorRichard Mudgett <rmudgett@digium.com>
Mon, 6 Feb 2012 17:33:41 +0000 (17:33 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 6 Feb 2012 17:33:41 +0000 (17:33 +0000)
The AMI UnParkedCall event was missing the Parkinglot and Uniqueid headers
that the AMI ParkedCall event contains.

(closes issue ASTERISK-19240)
Reported by: Michael Yara
........

Merged revisions 354116 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 354119 from http://svn.asterisk.org/svn/asterisk/branches/10

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

main/features.c

index 28c2c57..b95b33d 100644 (file)
@@ -5103,16 +5103,20 @@ static int parked_call_exec(struct ast_channel *chan, const char *data)
                ast_manager_event(pu->chan, EVENT_FLAG_CALL, "UnParkedCall",
                        "Exten: %s\r\n"
                        "Channel: %s\r\n"
+                       "Parkinglot: %s\r\n"
                        "From: %s\r\n"
                        "CallerIDNum: %s\r\n"
                        "CallerIDName: %s\r\n"
                        "ConnectedLineNum: %s\r\n"
-                       "ConnectedLineName: %s\r\n",
-                       pu->parkingexten, ast_channel_name(pu->chan), ast_channel_name(chan),
+                       "ConnectedLineName: %s\r\n"
+                       "Uniqueid: %s\r\n",
+                       pu->parkingexten, ast_channel_name(pu->chan), pu->parkinglot->name,
+                       ast_channel_name(chan),
                        S_COR(pu->chan->caller.id.number.valid, pu->chan->caller.id.number.str, "<unknown>"),
                        S_COR(pu->chan->caller.id.name.valid, pu->chan->caller.id.name.str, "<unknown>"),
                        S_COR(pu->chan->connected.id.number.valid, pu->chan->connected.id.number.str, "<unknown>"),
-                       S_COR(pu->chan->connected.id.name.valid, pu->chan->connected.id.name.str, "<unknown>")
+                       S_COR(pu->chan->connected.id.name.valid, pu->chan->connected.id.name.str, "<unknown>"),
+                       ast_channel_uniqueid(pu->chan)
                        );
 
                /* Stop entertaining the caller. */