[asterisk-commits] qwell: trunk r77895 - in /trunk: ./ channels/chan_skinny.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 2 10:16:53 CDT 2007


Author: qwell
Date: Thu Aug  2 10:16:53 2007
New Revision: 77895

URL: http://svn.digium.com/view/asterisk?view=rev&rev=77895
Log:
Merged revisions 77894 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10358)
........
r77894 | qwell | 2007-08-02 10:15:45 -0500 (Thu, 02 Aug 2007) | 5 lines

Make sure that we show the correct extension if dialed from a macro
"From: 5555" rather than "From: s"

Issue 10358, initial patch by DEA, reworked by me to use S_OR, tested by sbisker

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_skinny.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=77895&r1=77894&r2=77895
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Thu Aug  2 10:16:53 2007
@@ -2733,6 +2733,9 @@
 	struct skinny_line *l = sub->parent;
 	struct skinny_device *d = l->parent;
 	struct skinnysession *s = d->session;
+	char exten[AST_MAX_EXTENSION] = "";
+
+	ast_copy_string(exten, S_OR(ast->macroexten, ast->exten), sizeof(exten));
 
 	sub->cxmode = SKINNY_CX_SENDRECV;
 	if (!sub->rtp) {
@@ -2748,7 +2751,7 @@
 	/* order matters here...
 	   for some reason, transmit_callinfo must be before transmit_callstate,
 	   or you won't get keypad messages in some situations. */
-	transmit_callinfo(s, ast->cid.cid_name, ast->cid.cid_num, ast->exten, ast->exten, l->instance, sub->callid, 2);
+	transmit_callinfo(s, ast->cid.cid_name, ast->cid.cid_num, exten, exten, l->instance, sub->callid, 2);
 	transmit_callstate(s, l->instance, SKINNY_CONNECTED, sub->callid);
 	transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_CONNECTED);
 	transmit_displaypromptstatus(s, "Connected", 0, l->instance, sub->callid);
@@ -2927,6 +2930,9 @@
 	struct skinny_line *l = sub->parent;
 	struct skinny_device *d = l->parent;
 	struct skinnysession *s = d->session;
+	char exten[AST_MAX_EXTENSION] = "";
+
+	ast_copy_string(exten, S_OR(ast->macroexten, ast->exten), sizeof(exten));
 
 	if (skinnydebug)
 		ast_verb(3, "Asked to indicate '%s' condition on channel %s\n", control2str(ind), ast->name);
@@ -2936,9 +2942,9 @@
 			if (!sub->progress) {
 				transmit_tone(s, SKINNY_ALERT, l->instance, sub->callid);
 				transmit_callstate(s, l->instance, SKINNY_RINGOUT, sub->callid);
-				transmit_dialednumber(s, ast->exten, l->instance, sub->callid);
+				transmit_dialednumber(s, exten, l->instance, sub->callid);
 				transmit_displaypromptstatus(s, "Ring Out", 0, l->instance, sub->callid);
-				transmit_callinfo(s, ast->cid.cid_name, ast->cid.cid_num, ast->exten, ast->exten, l->instance, sub->callid, 2); /* 2 = outgoing from phone */
+				transmit_callinfo(s, ast->cid.cid_name, ast->cid.cid_num, exten, exten, l->instance, sub->callid, 2); /* 2 = outgoing from phone */
 				sub->ringing = 1;
 				break;
 			}
@@ -2967,7 +2973,7 @@
 			transmit_tone(s, SKINNY_ALERT, l->instance, sub->callid);
 			transmit_callstate(s, l->instance, SKINNY_PROGRESS, sub->callid);
 			transmit_displaypromptstatus(s, "Call Progress", 0, l->instance, sub->callid);
-			transmit_callinfo(s, ast->cid.cid_name, ast->cid.cid_num, ast->exten, ast->exten, l->instance, sub->callid, 2); /* 2 = outgoing from phone */
+			transmit_callinfo(s, ast->cid.cid_name, ast->cid.cid_num, exten, exten, l->instance, sub->callid, 2); /* 2 = outgoing from phone */
 			sub->progress = 1;
 			break;
 		}




More information about the asterisk-commits mailing list