From alan at kageds.com Thu Sep 2 16:44:08 2021 From: alan at kageds.com (KageDS) Date: Thu, 2 Sep 2021 17:44:08 +0100 Subject: [Freeswitch-dev] Is 3PCC broken in FreeSWITCH Version 1.10.6? Message-ID: <3033ec20-39ac-b061-b130-5d9d4b8ae51c@kageds.com> Hello list, I've just upgraded my Freeswitch from 1.4.6 to 1.10.6 and now audio calls that use 3PCC are no longer working. I get this error: [NOTICE] sofia.c:7419 Pre-Answer sofia/sipinterface_1/xxxxxx at sip.commpeak.com! [DEBUG] switch_channel.c:3565 (sofia/sipinterface_1/xxxxxx at sip.commpeak.com) Callstate Change DOWN -> EARLY [DEBUG] switch_ivr_originate.c:3883 Originate Resulted in Success: [sofia/sipinterface_1/xxxxxx at sip.commpeak.com] [DEBUG] switch_channel.c:2130 (sofia/umainterface_1/yyyyyy at sip.zzzz.com) Callstate Change RING_WAIT -> ACTIVE [DEBUG] switch_ivr_bridge.c:1793 (sofia/sipinterface_1/xxxxxx at sip.commpeak.com) State Change CS_CONSUME_MEDIA -> CS_EXCHANGE_MEDIA [DEBUG] switch_core_state_machine.c:585 (sofia/sipinterface_1/xxxxxx at sip.commpeak.com) Running State Change CS_EXCHANGE_MEDIA (Cur 2 Tot 210) [DEBUG] switch_core_state_machine.c:654 (sofia/sipinterface_1/xxxxxx at sip.commpeak.com) State EXCHANGE_MEDIA [DEBUG] mod_sofia.c:656 SOFIA EXCHANGE_MEDIA [ERR] switch_core_media.c:15697 sofia/sipinterface_1/xxxxxx at sip.commpeak.com has no write codec. [NOTICE] switch_core_media.c:15698 Hangup sofia/sipinterface_1/xxxxxx at sip.commpeak.com [CS_EXCHANGE_MEDIA] [INCOMPATIBLE_DESTINATION] On the a_leg the SDP is provided in the usual 3PCC way: Client                FS Carrier INVITE (no SDP) -----> <-------- 200 OK (SDP) ACK (SDP) ----------->                       INVITE (SDP) ----->                       <-------- 183 (SDP)                       CANCEL -----------> [Cause: INCOMPATIBLE_DESTINATION] <---------------- BYE If anyone has any insight to share I would be very grateful. Thanks Alan From alan at kageds.com Mon Sep 13 15:04:10 2021 From: alan at kageds.com (KageDS) Date: Mon, 13 Sep 2021 16:04:10 +0100 Subject: [Freeswitch-dev] Is 3PCC broken in FreeSWITCH Version 1.10.6? Message-ID: 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; From brian at freeswitch.com Mon Sep 20 14:21:16 2021 From: brian at freeswitch.com (Brian West) Date: Mon, 20 Sep 2021 09:21:16 -0500 Subject: [Freeswitch-dev] Is 3PCC broken in FreeSWITCH Version 1.10.6? In-Reply-To: References: Message-ID: But reports and PR's exist in github, Here isn't so much helpful. https://github.com/freeswitch/ /b On Sun, Sep 19, 2021 at 6:30 PM KageDS wrote: > 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; > > > _________________________________________________________________________ > > The FreeSWITCH project is sponsored by SignalWire https://signalwire.com > Enhance your FreeSWITCH install with disruptive priced SMS and PSTN > services. > Build your next product on our scalable cloud platform. > > Join our online community to chat in real time > https://signalwire.community > > Professional FreeSWITCH Services > sales at freeswitch.com > https://freeswitch.com > > Official FreeSWITCH Sites > https://freeswitch.com/oss > https://freeswitch.org/confluence > https://cluecon.com > > FreeSWITCH-dev mailing list > FreeSWITCH-dev at lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > https://freeswitch.com -- Brian West | Co-founder and Developer Need Commercial support? email sales at freeswitch.com FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045 Email: brian at freeswitch.com Mobile: 918-424-9378 Website: https://www.FreeSWITCH.com [image: https://www.facebook.com/signalwireinc?src=email] [image: https://twitter.com/freeswitch] -------------- next part -------------- An HTML attachment was scrubbed... URL: