[Freeswitch-dev] Is 3PCC broken in FreeSWITCH Version 1.10.6?

KageDS alan at kageds.com
Mon Sep 13 15:04:10 UTC 2021


So to answer my own question, yes it does seem to be broken, the 
following patch fixes it but I'm not sure if this is the right thing to do:


diff --git a/src/mod/endpoints/mod_sofia/sofia.c 
b/src/mod/endpoints/mod_sofia/sofia.c
index b76a804..29f233d 100644
--- a/src/mod/endpoints/mod_sofia/sofia.c
+++ b/src/mod/endpoints/mod_sofia/sofia.c
@@ -6532,15 +6532,20 @@ static void 
sofia_handle_sip_r_invite(switch_core_session_t *session, int status
                 switch_channel_clear_flag(channel, CF_REQ_MEDIA);

                 if (status < 200) {
-                       if (switch_core_session_get_partner(session, 
&other_session) == SWITCH_STATUS_SUCCESS) {
- if(switch_core_session_compare(session, other_session)) {
-                                       private_object_t *other_tech_pvt 
= switch_core_session_get_private(other_session);
-                                       if 
(sofia_test_flag(other_tech_pvt, TFLAG_3PCC)) {
- sofia_set_flag_locked(tech_pvt, TFLAG_SKIP_EARLY);
-                                       }
-                               }
- switch_core_session_rwunlock(other_session);
-                       }
+//
+// **AlanE**
+// The following code sets TFLAG_SKIP_EARLY for the b-leg of a call 
with a 3PCC on the a-leg
+// this then later on causes the call to fail with no write codec error
+// Just commenting the code out seems to fix the issue
+//                     if (switch_core_session_get_partner(session, 
&other_session) == SWITCH_STATUS_SUCCESS) {
+// if(switch_core_session_compare(session, other_session)) {
+//                                     private_object_t *other_tech_pvt 
= switch_core_session_get_private(other_session);
+//                                     if 
(sofia_test_flag(other_tech_pvt, TFLAG_3PCC)) {
+// sofia_set_flag_locked(tech_pvt, TFLAG_SKIP_EARLY);
+//                                     }
+//                             }
+// switch_core_session_rwunlock(other_session);
+//                     }

                         if (sofia_test_flag(tech_pvt, TFLAG_SKIP_EARLY)) {
                                 return;




More information about the FreeSWITCH-dev mailing list