[Asterisk-code-review] manager.c: Update AMI Status event documentation (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Wed Dec 27 20:53:31 CST 2017
Richard Mudgett has uploaded this change for review. ( https://gerrit.asterisk.org/7747
Change subject: manager.c: Update AMI Status event documentation
......................................................................
manager.c: Update AMI Status event documentation
The AMI Status event had linkedid listed twice and was missing the
effective connected line name and number headers.
* Cached the effective connected line party id so it doesn't get
calculated four times.
Change-Id: I004c4c4f9e7b40ef55035c831702721bec82496c
---
M main/manager.c
1 file changed, 14 insertions(+), 6 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/47/7747/1
diff --git a/main/manager.c b/main/manager.c
index 890a975..61ff75b 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -247,13 +247,15 @@
<parameter name="DNID">
<para>Dialed number identifier</para>
</parameter>
+ <parameter name="EffectiveConnectedLineNum">
+ </parameter>
+ <parameter name="EffectiveConnectedLineName">
+ </parameter>
<parameter name="TimeToHangup">
<para>Absolute lifetime of the channel</para>
</parameter>
<parameter name="BridgeID">
<para>Identifier of the bridge the channel is in, may be empty if not in one</para>
- </parameter>
- <parameter name="Linkedid">
</parameter>
<parameter name="Application">
<para>Application currently executing on the channel</para>
@@ -4583,6 +4585,7 @@
struct timeval now;
long elapsed_seconds;
struct ast_bridge *bridge;
+ struct ast_party_id effective_connected;
ast_channel_lock(chan);
@@ -4610,11 +4613,13 @@
channels++;
+ effective_connected = ast_channel_connected_effective_id(chan);
bridge = ast_channel_get_bridge(chan);
astman_append(s,
"Event: Status\r\n"
"Privilege: Call\r\n"
+ /* v-- Start channel snapshot headers */
"Channel: %s\r\n"
"ChannelState: %u\r\n"
"ChannelStateDesc: %s\r\n"
@@ -4627,13 +4632,14 @@
"Exten: %s\r\n"
"Priority: %d\r\n"
"Uniqueid: %s\r\n"
+ "Linkedid: %s\r\n"
+ /* ^-- End channel snapshot headers */
"Type: %s\r\n"
"DNID: %s\r\n"
"EffectiveConnectedLineNum: %s\r\n"
"EffectiveConnectedLineName: %s\r\n"
"TimeToHangup: %ld\r\n"
"BridgeID: %s\r\n"
- "Linkedid: %s\r\n"
"Application: %s\r\n"
"Data: %s\r\n"
"Nativeformats: %s\r\n"
@@ -4647,6 +4653,7 @@
"%s"
"%s"
"\r\n",
+ /* v-- Start channel snapshot headers */
ast_channel_name(chan),
ast_channel_state(chan),
ast_state2str(ast_channel_state(chan)),
@@ -4659,13 +4666,14 @@
ast_channel_exten(chan),
ast_channel_priority(chan),
ast_channel_uniqueid(chan),
+ ast_channel_linkedid(chan),
+ /* ^-- End channel snapshot headers */
ast_channel_tech(chan)->type,
S_OR(ast_channel_dialed(chan)->number.str, ""),
- S_COR(ast_channel_connected_effective_id(chan).number.valid, ast_channel_connected_effective_id(chan).number.str, "<unknown>"),
- S_COR(ast_channel_connected_effective_id(chan).name.valid, ast_channel_connected_effective_id(chan).name.str, "<unknown>"),
+ S_COR(effective_connected.number.valid, effective_connected.number.str, "<unknown>"),
+ S_COR(effective_connected.name.valid, effective_connected.name.str, "<unknown>"),
(long)ast_channel_whentohangup(chan)->tv_sec,
bridge ? bridge->uniqueid : "",
- ast_channel_linkedid(chan),
ast_channel_appl(chan),
ast_channel_data(chan),
ast_format_cap_get_names(ast_channel_nativeformats(chan), &codec_buf),
--
To view, visit https://gerrit.asterisk.org/7747
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I004c4c4f9e7b40ef55035c831702721bec82496c
Gerrit-Change-Number: 7747
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171227/c532c824/attachment.html>
More information about the asterisk-code-review
mailing list