[asterisk-commits] rmudgett: trunk r320825 - in /trunk: ./ apps/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 25 12:14:22 CDT 2011
Author: rmudgett
Date: Wed May 25 12:14:11 2011
New Revision: 320825
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=320825
Log:
Merged revisions 320823 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r320823 | rmudgett | 2011-05-25 12:06:38 -0500 (Wed, 25 May 2011) | 18 lines
The AMI Newstate event contains different information between v1.4 and v1.8.
The addition of connected line support in v1.8 changes the behavior of the
channel caller ID somewhat. The channel caller ID value no longer time
shares with the connected line ID on outgoing call legs. The timing of
some AMI events/responses output the connected line ID as caller ID.
These party ID's are now separate.
* The ConnectedLineNum and ConnectedLineName headers were added to many
AMI events/responses if the CallerIDNum/CallerIDName headers were also
present.
(closes issue #18252)
Reported by: gje
Tested by: rmudgett
Review: https://reviewboard.asterisk.org/r/1227/
........
Modified:
trunk/ (props changed)
trunk/CHANGES
trunk/UPGRADE-1.8.txt
trunk/apps/app_dial.c
trunk/apps/app_fax.c
trunk/apps/app_meetme.c
trunk/apps/app_queue.c
trunk/main/channel.c
trunk/main/features.c
trunk/main/manager.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=320825&r1=320824&r2=320825
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Wed May 25 12:14:11 2011
@@ -567,8 +567,8 @@
* 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.
+ * Added ConnectedLineNum and ConnectedLineName headers to AMI events/responses
+ if CallerIDNum and CallerIDName headers are also present.
Channel Event Logging
---------------------
Modified: trunk/UPGRADE-1.8.txt
URL: http://svnview.digium.com/svn/asterisk/trunk/UPGRADE-1.8.txt?view=diff&rev=320825&r1=320824&r2=320825
==============================================================================
--- trunk/UPGRADE-1.8.txt (original)
+++ trunk/UPGRADE-1.8.txt Wed May 25 12:14:11 2011
@@ -132,6 +132,14 @@
* The default value for the pedantic option in sip.conf has been changed
from "no" to "yes".
+
+* The ConnectedLineNum and ConnectedLineName headers were added to many AMI
+ events/responses if the CallerIDNum/CallerIDName headers were also present.
+ The addition of connected line support changes the behavior of the channel
+ caller ID somewhat. The channel caller ID value no longer time shares with
+ the connected line ID on outgoing call legs. The timing of some AMI
+ events/responses output the connected line ID as caller ID. These party ID's
+ are now separate.
From 1.6.1 to 1.6.2:
Modified: trunk/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_dial.c?view=diff&rev=320825&r1=320824&r2=320825
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Wed May 25 12:14:11 2011
@@ -768,12 +768,16 @@
"Destination: %s\r\n"
"CallerIDNum: %s\r\n"
"CallerIDName: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n"
"UniqueID: %s\r\n"
"DestUniqueID: %s\r\n"
"Dialstring: %s\r\n",
src->name, dst->name,
S_COR(src->caller.id.number.valid, src->caller.id.number.str, "<unknown>"),
S_COR(src->caller.id.name.valid, src->caller.id.name.str, "<unknown>"),
+ S_COR(src->connected.id.number.valid, src->connected.id.number.str, "<unknown>"),
+ S_COR(src->connected.id.name.valid, src->connected.id.name.str, "<unknown>"),
src->uniqueid, dst->uniqueid,
dialstring ? dialstring : "");
}
Modified: trunk/apps/app_fax.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_fax.c?view=diff&rev=320825&r1=320824&r2=320825
==============================================================================
--- trunk/apps/app_fax.c (original)
+++ trunk/apps/app_fax.c Wed May 25 12:14:11 2011
@@ -255,6 +255,9 @@
"Channel: %s\r\n"
"Exten: %s\r\n"
"CallerID: %s\r\n"
+ "CallerIDName: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n"
"RemoteStationID: %s\r\n"
"LocalStationID: %s\r\n"
"PagesTransferred: %d\r\n"
@@ -264,6 +267,9 @@
s->chan->name,
s->chan->exten,
S_COR(s->chan->caller.id.number.valid, s->chan->caller.id.number.str, ""),
+ S_COR(s->chan->caller.id.name.valid, s->chan->caller.id.name.str, ""),
+ S_COR(s->chan->connected.id.number.valid, s->chan->connected.id.number.str, ""),
+ S_COR(s->chan->connected.id.name.valid, s->chan->connected.id.name.str, ""),
far_ident,
local_ident,
pages_transferred,
Modified: trunk/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_meetme.c?view=diff&rev=320825&r1=320824&r2=320825
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Wed May 25 12:14:11 2011
@@ -2756,11 +2756,15 @@
"Meetme: %s\r\n"
"Usernum: %d\r\n"
"CallerIDnum: %s\r\n"
- "CallerIDname: %s\r\n",
+ "CallerIDname: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n",
chan->name, chan->uniqueid, conf->confno,
user->user_no,
S_COR(user->chan->caller.id.number.valid, user->chan->caller.id.number.str, "<unknown>"),
- S_COR(user->chan->caller.id.name.valid, user->chan->caller.id.name.str, "<unknown>")
+ S_COR(user->chan->caller.id.name.valid, user->chan->caller.id.name.str, "<unknown>"),
+ S_COR(user->chan->connected.id.number.valid, user->chan->connected.id.number.str, "<unknown>"),
+ S_COR(user->chan->connected.id.name.valid, user->chan->connected.id.name.str, "<unknown>")
);
sent_event = 1;
}
@@ -3817,11 +3821,15 @@
"Usernum: %d\r\n"
"CallerIDNum: %s\r\n"
"CallerIDName: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n"
"Duration: %ld\r\n",
chan->name, chan->uniqueid, conf->confno,
user->user_no,
S_COR(user->chan->caller.id.number.valid, user->chan->caller.id.number.str, "<unknown>"),
S_COR(user->chan->caller.id.name.valid, user->chan->caller.id.name.str, "<unknown>"),
+ S_COR(user->chan->connected.id.number.valid, user->chan->connected.id.number.str, "<unknown>"),
+ S_COR(user->chan->connected.id.name.valid, user->chan->connected.id.name.str, "<unknown>"),
(long)(now.tv_sec - user->jointime));
}
@@ -4883,6 +4891,8 @@
"UserNumber: %d\r\n"
"CallerIDNum: %s\r\n"
"CallerIDName: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n"
"Channel: %s\r\n"
"Admin: %s\r\n"
"Role: %s\r\n"
@@ -4895,6 +4905,8 @@
user->user_no,
S_COR(user->chan->caller.id.number.valid, user->chan->caller.id.number.str, "<unknown>"),
S_COR(user->chan->caller.id.name.valid, user->chan->caller.id.name.str, "<no name>"),
+ S_COR(user->chan->connected.id.number.valid, user->chan->connected.id.number.str, "<unknown>"),
+ S_COR(user->chan->connected.id.name.valid, user->chan->connected.id.name.str, "<no name>"),
user->chan->name,
ast_test_flag64(&user->userflags, CONFFLAG_ADMIN) ? "Yes" : "No",
ast_test_flag64(&user->userflags, CONFFLAG_MONITOR) ? "Listen only" : ast_test_flag64(&user->userflags, CONFFLAG_TALKER) ? "Talk only" : "Talk and listen",
Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=320825&r1=320824&r2=320825
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Wed May 25 12:14:11 2011
@@ -2515,10 +2515,20 @@
q->count++;
res = 0;
ast_manager_event(qe->chan, EVENT_FLAG_CALL, "Join",
- "Channel: %s\r\nCallerIDNum: %s\r\nCallerIDName: %s\r\nQueue: %s\r\nPosition: %d\r\nCount: %d\r\nUniqueid: %s\r\n",
+ "Channel: %s\r\n"
+ "CallerIDNum: %s\r\n"
+ "CallerIDName: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n"
+ "Queue: %s\r\n"
+ "Position: %d\r\n"
+ "Count: %d\r\n"
+ "Uniqueid: %s\r\n",
qe->chan->name,
S_COR(qe->chan->caller.id.number.valid, qe->chan->caller.id.number.str, "unknown"),/* XXX somewhere else it is <unknown> */
S_COR(qe->chan->caller.id.name.valid, qe->chan->caller.id.name.str, "unknown"),
+ S_COR(qe->chan->connected.id.number.valid, qe->chan->connected.id.number.str, "unknown"),/* XXX somewhere else it is <unknown> */
+ S_COR(qe->chan->connected.id.name.valid, qe->chan->connected.id.name.str, "unknown"),
q->name, qe->pos, q->count, qe->chan->uniqueid );
ast_debug(1, "Queue '%s' Join, Channel '%s', Position '%d'\n", q->name, qe->chan->name, qe->pos );
}
@@ -3152,6 +3162,8 @@
"DestinationChannel: %s\r\n"
"CallerIDNum: %s\r\n"
"CallerIDName: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n"
"Context: %s\r\n"
"Extension: %s\r\n"
"Priority: %d\r\n"
@@ -3160,6 +3172,8 @@
qe->parent->name, tmp->interface, tmp->member->membername, qe->chan->name, tmp->chan->name,
S_COR(tmp->chan->caller.id.number.valid, tmp->chan->caller.id.number.str, "unknown"),
S_COR(tmp->chan->caller.id.name.valid, tmp->chan->caller.id.name.str, "unknown"),
+ S_COR(tmp->chan->connected.id.number.valid, tmp->chan->connected.id.number.str, "unknown"),
+ S_COR(tmp->chan->connected.id.name.valid, tmp->chan->connected.id.name.str, "unknown"),
qe->chan->context, qe->chan->exten, qe->chan->priority, qe->chan->uniqueid,
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
ast_verb(3, "Called %s\n", tmp->interface);
@@ -7247,12 +7261,16 @@
"Uniqueid: %s\r\n"
"CallerIDNum: %s\r\n"
"CallerIDName: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n"
"Wait: %ld\r\n"
"%s"
"\r\n",
q->name, pos++, qe->chan->name, qe->chan->uniqueid,
S_COR(qe->chan->caller.id.number.valid, qe->chan->caller.id.number.str, "unknown"),
S_COR(qe->chan->caller.id.name.valid, qe->chan->caller.id.name.str, "unknown"),
+ S_COR(qe->chan->connected.id.number.valid, qe->chan->connected.id.number.str, "unknown"),
+ S_COR(qe->chan->connected.id.name.valid, qe->chan->connected.id.name.str, "unknown"),
(long) (now - qe->start), idText);
}
}
Modified: trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/channel.c?view=diff&rev=320825&r1=320824&r2=320825
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Wed May 25 12:14:11 2011
@@ -2860,12 +2860,16 @@
"Uniqueid: %s\r\n"
"CallerIDNum: %s\r\n"
"CallerIDName: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n"
"Cause: %d\r\n"
"Cause-txt: %s\r\n",
chan->name,
chan->uniqueid,
S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, "<unknown>"),
S_COR(chan->caller.id.name.valid, chan->caller.id.name.str, "<unknown>"),
+ S_COR(chan->connected.id.number.valid, chan->connected.id.number.str, "<unknown>"),
+ S_COR(chan->connected.id.name.valid, chan->connected.id.name.str, "<unknown>"),
chan->hangupcause,
ast_cause2str(chan->hangupcause)
);
@@ -6952,10 +6956,14 @@
"ChannelStateDesc: %s\r\n"
"CallerIDNum: %s\r\n"
"CallerIDName: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n"
"Uniqueid: %s\r\n",
chan->name, chan->_state, ast_state2str(chan->_state),
S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, ""),
S_COR(chan->caller.id.name.valid, chan->caller.id.name.str, ""),
+ S_COR(chan->connected.id.number.valid, chan->connected.id.number.str, ""),
+ S_COR(chan->connected.id.name.valid, chan->connected.id.name.str, ""),
chan->uniqueid);
return 0;
Modified: trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/features.c?view=diff&rev=320825&r1=320824&r2=320825
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Wed May 25 12:14:11 2011
@@ -1177,11 +1177,15 @@
"Timeout: %ld\r\n"
"CallerIDNum: %s\r\n"
"CallerIDName: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n"
"Uniqueid: %s\r\n",
pu->parkingexten, pu->chan->name, pu->parkinglot->name, event_from ? event_from : "",
(long)pu->start.tv_sec + (long)(pu->parkingtime/1000) - (long)time(NULL),
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>"),
pu->chan->uniqueid
);
@@ -4056,12 +4060,16 @@
"Parkinglot: %s\r\n"
"CallerIDNum: %s\r\n"
"CallerIDName: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n"
"UniqueID: %s\r\n",
pu->parkingexten,
pu->chan->name,
pu->parkinglot->name,
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>"),
pu->chan->uniqueid
);
}
@@ -4554,10 +4562,14 @@
"Channel: %s\r\n"
"From: %s\r\n"
"CallerIDNum: %s\r\n"
- "CallerIDName: %s\r\n",
+ "CallerIDName: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n",
pu->parkingexten, pu->chan->name, chan->name,
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->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>")
);
ast_free(pu);
@@ -5635,12 +5647,16 @@
"Timeout: %ld\r\n"
"CallerIDNum: %s\r\n"
"CallerIDName: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n"
"%s"
"\r\n",
cur->parkingnum, cur->chan->name, cur->peername,
(long) cur->start.tv_sec + (long) (cur->parkingtime / 1000) - (long) time(NULL),
S_COR(cur->chan->caller.id.number.valid, cur->chan->caller.id.number.str, ""), /* XXX in other places it is <unknown> */
S_COR(cur->chan->caller.id.name.valid, cur->chan->caller.id.name.str, ""),
+ S_COR(cur->chan->connected.id.number.valid, cur->chan->connected.id.number.str, ""), /* XXX in other places it is <unknown> */
+ S_COR(cur->chan->connected.id.name.valid, cur->chan->connected.id.name.str, ""),
idText);
}
AST_LIST_UNLOCK(&curlot->parkings);
Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=320825&r1=320824&r2=320825
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Wed May 25 12:14:11 2011
@@ -4337,6 +4337,9 @@
"Application: %s\r\n"
"ApplicationData: %s\r\n"
"CallerIDnum: %s\r\n"
+ "CallerIDname: %s\r\n"
+ "ConnectedLineNum: %s\r\n"
+ "ConnectedLineName: %s\r\n"
"Duration: %s\r\n"
"AccountCode: %s\r\n"
"BridgedChannel: %s\r\n"
@@ -4344,6 +4347,9 @@
"\r\n", idText, c->name, c->uniqueid, c->context, c->exten, c->priority, c->_state,
ast_state2str(c->_state), c->appl ? c->appl : "", c->data ? S_OR(c->data, "") : "",
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->connected.id.number.valid, c->connected.id.number.str, ""),
+ S_COR(c->connected.id.name.valid, c->connected.id.name.str, ""),
durbuf, S_OR(c->accountcode, ""), bc ? bc->name : "", bc ? bc->uniqueid : "");
ast_channel_unlock(c);
More information about the asterisk-commits
mailing list