[asterisk-commits] rmudgett: branch 1.8 r320823 - in /branches/1.8: ./ apps/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 25 12:06:49 CDT 2011


Author: rmudgett
Date: Wed May 25 12:06:38 2011
New Revision: 320823

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=320823
Log:
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:
    branches/1.8/CHANGES
    branches/1.8/UPGRADE.txt
    branches/1.8/apps/app_dial.c
    branches/1.8/apps/app_fax.c
    branches/1.8/apps/app_meetme.c
    branches/1.8/apps/app_queue.c
    branches/1.8/main/channel.c
    branches/1.8/main/features.c
    branches/1.8/main/manager.c

Modified: branches/1.8/CHANGES
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/CHANGES?view=diff&rev=320823&r1=320822&r2=320823
==============================================================================
--- branches/1.8/CHANGES (original)
+++ branches/1.8/CHANGES Wed May 25 12:06:38 2011
@@ -436,8 +436,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: branches/1.8/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/UPGRADE.txt?view=diff&rev=320823&r1=320822&r2=320823
==============================================================================
--- branches/1.8/UPGRADE.txt (original)
+++ branches/1.8/UPGRADE.txt Wed May 25 12:06:38 2011
@@ -133,6 +133,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:
 
 * SIP no longer sends the 183 progress message for early media by

Modified: branches/1.8/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_dial.c?view=diff&rev=320823&r1=320822&r2=320823
==============================================================================
--- branches/1.8/apps/app_dial.c (original)
+++ branches/1.8/apps/app_dial.c Wed May 25 12:06:38 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: branches/1.8/apps/app_fax.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_fax.c?view=diff&rev=320823&r1=320822&r2=320823
==============================================================================
--- branches/1.8/apps/app_fax.c (original)
+++ branches/1.8/apps/app_fax.c Wed May 25 12:06:38 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: branches/1.8/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_meetme.c?view=diff&rev=320823&r1=320822&r2=320823
==============================================================================
--- branches/1.8/apps/app_meetme.c (original)
+++ branches/1.8/apps/app_meetme.c Wed May 25 12:06:38 2011
@@ -2681,11 +2681,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;
 	}
@@ -3736,11 +3740,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));
 		}
 
@@ -4798,6 +4806,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"
@@ -4810,6 +4820,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: branches/1.8/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_queue.c?view=diff&rev=320823&r1=320822&r2=320823
==============================================================================
--- branches/1.8/apps/app_queue.c (original)
+++ branches/1.8/apps/app_queue.c Wed May 25 12:06:38 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: branches/1.8/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/channel.c?view=diff&rev=320823&r1=320822&r2=320823
==============================================================================
--- branches/1.8/main/channel.c (original)
+++ branches/1.8/main/channel.c Wed May 25 12:06:38 2011
@@ -2818,12 +2818,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)
 		);
@@ -6755,10 +6759,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: branches/1.8/main/features.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/features.c?view=diff&rev=320823&r1=320822&r2=320823
==============================================================================
--- branches/1.8/main/features.c (original)
+++ branches/1.8/main/features.c Wed May 25 12:06:38 2011
@@ -1157,11 +1157,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
 		);
 
@@ -4023,12 +4027,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
 		);
 }
@@ -4504,10 +4512,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);
@@ -5579,12 +5591,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: branches/1.8/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/manager.c?view=diff&rev=320823&r1=320822&r2=320823
==============================================================================
--- branches/1.8/main/manager.c (original)
+++ branches/1.8/main/manager.c Wed May 25 12:06:38 2011
@@ -4325,6 +4325,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"
@@ -4332,6 +4335,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