Revision
15597
Author
anthm
Date
2009-11-21 00:54:16 -0600 (Sat, 21 Nov 2009)

Log Message

reset timestamp counter when we get new sdp etc because sonus likes to say ptime 20 and send 30ms timestamps in the 183 then once they say 200 ok with the same sdp they decide to actually send 20 for real this time FSRTP-8

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (15596 => 15597)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	2009-11-21 06:40:38 UTC (rev 15596)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	2009-11-21 06:54:16 UTC (rev 15597)
@@ -813,7 +813,9 @@
 					}
 					
 					if ((tech_pvt->read_frame.datalen % 10) == 0 &&
-						sofia_test_pflag(tech_pvt->profile, PFLAG_AUTOFIX_TIMING) && tech_pvt->check_frames++ < MAX_CODEC_CHECK_FRAMES) {
+						sofia_test_pflag(tech_pvt->profile, PFLAG_AUTOFIX_TIMING) && tech_pvt->check_frames < MAX_CODEC_CHECK_FRAMES) {
+						tech_pvt->check_frames++;
+						
 						if (!tech_pvt->read_impl.encoded_bytes_per_packet) {
 							tech_pvt->check_frames = MAX_CODEC_CHECK_FRAMES;
 							goto skip;
@@ -853,7 +855,8 @@
 													  "This issue has so far been identified to happen on the following broken platforms/devices:\n" 
 													  "Linksys/Sipura aka Cisco\n"
 													  "ShoreTel\n"
-													  "Sonus/L3\n"
+													  "Sonus/L3 (If you're really lucky, you may even get this message twice once they "
+													  "answer and change it back again!! Go Sonus!)\n"
 													  "We will try to fix it but some of the devices on this list are so broken who knows what will happen..\n"
 													  , 
 													  (int)tech_pvt->codec_ms, (int)codec_ms);

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (15596 => 15597)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-11-21 06:40:38 UTC (rev 15596)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-11-21 06:54:16 UTC (rev 15597)
@@ -3259,6 +3259,10 @@
 
 			sofia_update_callee_id(session, profile, sip, SWITCH_FALSE);
 
+			if (sofia_test_pflag(tech_pvt->profile, PFLAG_AUTOFIX_TIMING)) {
+				tech_pvt->check_frames = 0;
+			}
+
 		}
 		
 		if (channel && sip && (status == 300 || status == 302 || status == 305) && switch_channel_test_flag(channel, CF_OUTBOUND)) {

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (15596 => 15597)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	2009-11-21 06:40:38 UTC (rev 15596)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	2009-11-21 06:54:16 UTC (rev 15597)
@@ -1094,6 +1094,9 @@
 						/* Reactivate the NAT buster flag. */
 						switch_rtp_set_flag(tech_pvt->video_rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
 					}
+					if (sofia_test_pflag(tech_pvt->profile, PFLAG_AUTOFIX_TIMING)) {
+						tech_pvt->check_frames = 0;
+					}
 				}
 			}
 		}
@@ -1120,6 +1123,9 @@
 				/* Reactivate the NAT buster flag. */
 				switch_rtp_set_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_AUTOADJ);	
 			}
+			if (sofia_test_pflag(tech_pvt->profile, PFLAG_AUTOFIX_TIMING)) {
+				tech_pvt->check_frames = 0;
+			}
 		}
 	}