]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
reset timestamp counter when we get new sdp etc because sonus likes to say ptime...
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 21 Nov 2009 06:54:16 +0000 (06:54 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 21 Nov 2009 06:54:16 +0000 (06:54 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15597 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c

index 955d79e775388a9ee255c03a693a63a41b049225..78d69e7ea60f0357feb9d4c71ca047cb2453611a 100644 (file)
@@ -813,7 +813,9 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
                                        }
                                        
                                        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 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
                                                                                                          "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);
index f54133325f797d10c4254bec361ccca404ad820d..8bf2f2f50b2938b571e1cac70c30782e0c4db752 100644 (file)
@@ -3259,6 +3259,10 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
 
                        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)) {
index e17b22d57e73903d1a2ea73255eed4438c9a6005..3ee6f6f3deca82196913c48d4d0ad9091428cea7 100644 (file)
@@ -1094,6 +1094,9 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt)
                                                /* 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 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt)
                                /* 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;
+                       }
                }
        }