[asterisk-commits] file: trunk r41689 - /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Sep 1 09:19:04 MST 2006


Author: file
Date: Fri Sep  1 11:19:03 2006
New Revision: 41689

URL: http://svn.digium.com/view/asterisk?rev=41689&view=rev
Log:
If no number is specified in the SIP_HEADER dialplan function, then just use the first one. (issue #7854 reported by sxpert and issue #7863 reported by hristo)

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=41689&r1=41688&r2=41689&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Sep  1 11:19:03 2006
@@ -10909,9 +10909,13 @@
 	}
 
 	AST_STANDARD_APP_ARGS(args, data);
-	sscanf(args.number, "%d", &number);
-	if (number < 1)
+	if (!args.number) {
 		number = 1;
+	} else {
+		sscanf(args.number, "%d", &number);
+		if (number < 1)
+			number = 1;
+	}
 
 	p = chan->tech_pvt;
 



More information about the asterisk-commits mailing list