[svn-commits] wedhorn: trunk r381195 - /trunk/channels/chan_skinny.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Feb 11 12:54:16 CST 2013


Author: wedhorn
Date: Mon Feb 11 12:54:12 2013
New Revision: 381195

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381195
Log:
Fix some issues with skinny callid.

Add extra string to transmit_callinfo_var, Only set string2 to tonum for outgoing calls
and changes to send_callinfo and push_callinfo to not set callid name to last number.

(closes issue ASTERISK-21063)
Reported by: wedhorn
Tested by: snuffy, myself
Patches: 
    skinny-callinfoupdate03.diff uploaded by wedhorn (license 5019)

Modified:
    trunk/channels/chan_skinny.c

Modified: trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=381195&r1=381194&r2=381195
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Mon Feb 11 12:54:12 2013
@@ -2402,7 +2402,7 @@
 {
 	struct skinny_req *req;
 	char *strptr;
-	char *thestrings[12];
+	char *thestrings[13];
 	int i;
 	int callinfostrleft = MAXCALLINFOSTR;
 
@@ -2421,7 +2421,11 @@
 
 	thestrings[0] = fromnum;
 	thestrings[1] = "";                     /* Appears to be origfrom */
-	thestrings[2] = tonum;
+	if (calldirection == SKINNY_OUTGOING) {
+		thestrings[2] = tonum;
+	} else {
+		thestrings[2] = "";
+	}
 	thestrings[3] = "";
 	thestrings[4] = "";
 	thestrings[5] = "";
@@ -2432,10 +2436,11 @@
 	thestrings[9] = fromname;
 	thestrings[10] = toname;
 	thestrings[11] = "";
+	thestrings[12] = "";
 
 	strptr = req->data.callinfomessagevariable.calldetails;
 
-	for(i = 0; i < 12; i++) {
+	for(i = 0; i < 13; i++) {
 		ast_copy_string(strptr, thestrings[i], callinfostrleft);
 		strptr += strlen(thestrings[i]) + 1;
 		callinfostrleft -= strlen(thestrings[i]) + 1;
@@ -2474,7 +2479,7 @@
 	} else if (sub->calldirection == SKINNY_OUTGOING) {
 		fromname = S_COR(ast_channel_caller(ast)->id.name.valid, ast_channel_caller(ast)->id.name.str, "");
 		fromnum = S_COR(ast_channel_caller(ast)->id.number.valid, ast_channel_caller(ast)->id.number.str, "");
-		toname = S_COR(ast_channel_connected(ast)->id.name.valid, ast_channel_connected(ast)->id.name.str, l->lastnumberdialed);
+		toname = S_COR(ast_channel_connected(ast)->id.name.valid, ast_channel_connected(ast)->id.name.str, "");
 		tonum = S_COR(ast_channel_connected(ast)->id.number.valid, ast_channel_connected(ast)->id.number.str, l->lastnumberdialed);
 	} else {
 		ast_verb(1, "Error sending Callinfo to %s(%d) - No call direction in sub\n", d->name, l->instance);
@@ -2514,7 +2519,7 @@
 	} else if (sub->calldirection == SKINNY_OUTGOING) {
 		fromname = S_COR(ast_channel_caller(ast)->id.name.valid, ast_channel_caller(ast)->id.name.str, "");
 		fromnum = S_COR(ast_channel_caller(ast)->id.number.valid, ast_channel_caller(ast)->id.number.str, "");
-		toname = S_COR(ast_channel_connected(ast)->id.name.valid, ast_channel_connected(ast)->id.name.str, l->lastnumberdialed);
+		toname = S_COR(ast_channel_connected(ast)->id.name.valid, ast_channel_connected(ast)->id.name.str, "");
 		tonum = S_COR(ast_channel_connected(ast)->id.number.valid, ast_channel_connected(ast)->id.number.str, l->lastnumberdialed);
 	} else {
 		ast_verb(1, "Error sending Callinfo to %s(%d) - No call direction in sub\n", d->name, l->instance);




More information about the svn-commits mailing list