Please do a PR on github. /b On Mon, Jun 1, 2020 at 7:27 PM David Villasmil < david.villasmil.work@gmail.com> wrote:
Thanks Brian,
Something like this removes the "replaces" from the supported.
<param name="disable-sip-replaces" value="true"/>
index 05e50c952f..dd2564931a 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.h +++ b/src/mod/endpoints/mod_sofia/mod_sofia.h @@ -228,6 +228,7 @@ typedef enum { PFLAG_WORKER_RUNNING, PFLAG_UNREG_OPTIONS_FAIL, PFLAG_DISABLE_TIMER, + PFLAG_DISABLE_SIP_REPLACES, PFLAG_ENABLE_RFC5626, PFLAG_DISABLE_100REL, PFLAG_AGGRESSIVE_NAT_DETECTION,
and
index 32f27462e5..dafd35aaad 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -3142,6 +3142,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void int use_100rel = !sofia_test_pflag(profile, PFLAG_DISABLE_100REL); int use_timer = !sofia_test_pflag(profile, PFLAG_DISABLE_TIMER); int use_rfc_5626 = sofia_test_pflag(profile, PFLAG_ENABLE_RFC5626); + int use_sip_replaces = sofia_test_pflag(profile, PFLAG_DISABLE_SIP_REPLACES); const char *supported = NULL; int sanity, attempts = 0; switch_thread_t *worker_thread; @@ -3164,7 +3165,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void goto end; } - supported = switch_core_sprintf(profile->pool, "%s%s%spath, replaces", use_100rel ? "precondition, 100rel, " : "", use_timer ? "timer, " : "", use_rfc_5626 ? "outbound, " : ""); + supported = switch_core_sprintf(profile->pool, "%s%s%s%spath", use_100rel ? "precondition, 100rel, " : "", use_timer ? "timer, " : "", use_rfc_5626 ? "outbound, " : "", use_sip_replaces ? "replaces, ": ""); if (sofia_test_pflag(profile, PFLAG_AUTO_NAT) && switch_nat_get_type()) { if ( (! sofia_test_pflag(profile, PFLAG_TLS) || ! profile->tls_only) && switch_nat_add_mapping(profile->sip_port, SWITCH_NAT_UDP, NULL, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) { @@ -5240,6 +5241,12 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name) } else { profile->mflags |= MFLAG_REFER; } + } else if (!strcasecmp(var, "disable-sip-replaces")) { + if (!switch_true(val)) { + sofia_set_pflag(profile, PFLAG_DISABLE_SIP_REPLACES); + } else { + sofia_clear_pflag(profile, PFLAG_DISABLE_SIP_REPLACES); + } } else if (!strcasecmp(var, "disable-register")) { if (switch_true(val)) { profile->mflags &= ~MFLAG_REGISTER;
Now, I need to reject incoming INVITEs with "replaces" as requiered...
Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
On Mon, Jun 1, 2020 at 10:12 PM Brian West <brian@freeswitch.com> wrote:
Doesn't appear to be a way currently. Look at how MFLAG_REFER is handled. /b
On Mon, Jun 1, 2020 at 1:23 PM David Villasmil < david.villasmil.work@gmail.com> wrote:
Is this possible?
Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337 _________________________________________________________________________
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@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
--
Brian West | Co-founder and Developer
Need Commercial support? email sales@freeswitch.com
FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045 <https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g>
Email: brian@freeswitch.com
Mobile: 918-424-9378
Website: https://www.FreeSWITCH.com <https://www.freeswitch.com/>
[image: https://www.facebook.com/signalwireinc?src=email] <https://www.facebook.com/freeswitch> [image: https://twitter.com/freeswitch] <https://twitter.com/freeswitch> _________________________________________________________________________
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@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________
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@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
-- Brian West | Co-founder and Developer Need Commercial support? email sales@freeswitch.com FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045 <https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g> Email: brian@freeswitch.com Mobile: 918-424-9378 Website: https://www.FreeSWITCH.com <https://www.freeswitch.com/> [image: https://www.facebook.com/signalwireinc?src=email] <https://www.facebook.com/freeswitch> [image: https://twitter.com/freeswitch] <https://twitter.com/freeswitch>