]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Add ConnectedLineNum/Name headers to output of AMI action Status.
authorRichard Mudgett <rmudgett@digium.com>
Mon, 23 May 2011 17:53:44 +0000 (17:53 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 23 May 2011 17:53:44 +0000 (17:53 +0000)
* Add ConnectedLineNum and ConnectedLineName headers to the output of the
AMI action Status.  This makes it easier to find out who the channel is
connected to without having to lookup BridgedChannel or when they are
connected to an application (e.g.: VoiceMail) which has no bridged
channel.

* Bridged channels with no CallerID had "" instead of "<unknown>" output,
that might be a bug as "<unknown>" was what older versions used.

(closes issue #18158)
Reported by: gareth
Patches:
      svn-292308.diff uploaded by gareth (license 208)

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

CHANGES
main/manager.c

diff --git a/CHANGES b/CHANGES
index c52f015b10ba02bb8be7f16c01b38c8a28b12264..1305123a023ee35c4879f861db328935e5d62ba2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -436,6 +436,8 @@ Asterisk Manager Interface
  * Added a new eventfilter option per user to allow whitelisting and blacklisting
    of events.
  * Added optional parkinglot variable for park command.
+ * Added ConnectedLineNum and ConnectedLineName headers to the output of Status
+   manager action.
 
 Channel Event Logging
 ---------------------
index 315d0e6755a23bcc3acdb2457c7783719851badb..8ff07a489b0b586b66b2244e29d760b09fe5a621 100644 (file)
@@ -3192,6 +3192,8 @@ static int action_status(struct mansession *s, const struct message *m)
                        "Channel: %s\r\n"
                        "CallerIDNum: %s\r\n"
                        "CallerIDName: %s\r\n"
+                       "ConnectedLineNum: %s\r\n"
+                       "ConnectedLineName: %s\r\n"
                        "Accountcode: %s\r\n"
                        "ChannelState: %d\r\n"
                        "ChannelStateDesc: %s\r\n"
@@ -3205,8 +3207,10 @@ static int action_status(struct mansession *s, const struct message *m)
                        "%s"
                        "\r\n",
                        c->name,
-                       S_COR(c->caller.id.number.valid, c->caller.id.number.str, ""),
-                       S_COR(c->caller.id.name.valid, c->caller.id.name.str, ""),
+                       S_COR(c->caller.id.number.valid, c->caller.id.number.str, "<unknown>"),
+                       S_COR(c->caller.id.name.valid, c->caller.id.name.str, "<unknown>"),
+                       S_COR(c->connected.id.number.valid, c->connected.id.number.str, "<unknown>"),
+                       S_COR(c->connected.id.name.valid, c->connected.id.name.str, "<unknown>"),
                        c->accountcode,
                        c->_state,
                        ast_state2str(c->_state), c->context,
@@ -3218,6 +3222,8 @@ static int action_status(struct mansession *s, const struct message *m)
                                "Channel: %s\r\n"
                                "CallerIDNum: %s\r\n"
                                "CallerIDName: %s\r\n"
+                               "ConnectedLineNum: %s\r\n"
+                               "ConnectedLineName: %s\r\n"
                                "Account: %s\r\n"
                                "State: %s\r\n"
                                "%s"
@@ -3228,6 +3234,8 @@ static int action_status(struct mansession *s, const struct message *m)
                                c->name,
                                S_COR(c->caller.id.number.valid, c->caller.id.number.str, "<unknown>"),
                                S_COR(c->caller.id.name.valid, c->caller.id.name.str, "<unknown>"),
+                               S_COR(c->connected.id.number.valid, c->connected.id.number.str, "<unknown>"),
+                               S_COR(c->connected.id.name.valid, c->connected.id.name.str, "<unknown>"),
                                c->accountcode,
                                ast_state2str(c->_state), bridge, c->uniqueid,
                                ast_str_buffer(str), idText);