[Freeswitch-svn] [commit] r13506 - freeswitch/trunk/src/mod/endpoints/mod_sofia

FreeSWITCH SVN mikej at freeswitch.org
Fri May 29 11:08:06 PDT 2009


Author: mikej
Date: Fri May 29 13:08:05 2009
New Revision: 13506

Log:
handle vegastream broken sip info packets

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Fri May 29 13:08:05 2009
@@ -4035,6 +4035,10 @@
 					int tmp;
 					/* move signal_ptr where we need it (right past Signal=) */
 					signal_ptr = signal_ptr + 7;
+
+					/* handle broken devices with spaces after the = (cough) VegaStream (cough) */
+					while (*signal_ptr && *signal_ptr == ' ') signal_ptr++;
+
 					if (*signal_ptr && (*signal_ptr == '*' || *signal_ptr == '#' || *signal_ptr == 'A' || *signal_ptr == 'B' || *signal_ptr == 'C' || *signal_ptr == 'D')) {
 						dtmf.digit = *signal_ptr;
 					} else {
@@ -4049,6 +4053,9 @@
 				if ((signal_ptr = switch_stristr("Duration=", sip->sip_payload->pl_data))) {
 					int tmp;
 					signal_ptr += 9;
+
+					/* handle broken devices with spaces after the = (cough) VegaStream (cough) */
+					while (*signal_ptr && *signal_ptr == ' ') signal_ptr++;
 					
 					if ((tmp = atoi(signal_ptr)) <= 0) {
 						tmp = switch_core_default_dtmf_duration(0);



More information about the Freeswitch-svn mailing list