[Freeswitch-users] 302 handling with enterprise :_: dial.

Brian West brian at freeswitch.com
Wed Dec 1 17:24:57 UTC 2021


You really can't use enterprise originate for that.  It requires a lot more
thought, you can't exit the loops since each one is in its own threads, the
only option is to ignore.

On Wed, Dec 1, 2021 at 10:51 AM Martin Paterson <martin at pattersong.co.uk>
wrote:

> Thanks for your response, Brian. Actually I think I need the opposite of
> that option! I want FreeSWITCH to handle the 302s in the dialplan, but the
> problem is that when using :_: the redirect ends up in the public dialplan
> not the default dialplan (where the extensions are). When not using :_: the
> redirect works fine - the call goes through the default diaplan and finds
> the extension. However the option has led me to the FS code that handles
> this, so I shall take a look there.
>
> Thanks,
>
> Martin.
>
> Martin Paterson, Pattersong Music
> Reduced orchestrations of G&S
>
>
> On Tue, 30 Nov 2021 at 18:24, Brian West <brian at freeswitch.com> wrote:
>
>> You will want to set outbound_redirect_fatal=true, or the enterprise
>> originate will follow the 302, you can safely ignore those if needed.
>>
>> On Tue, Nov 30, 2021 at 12:09 PM Martin Paterson <martin at pattersong.co.uk>
>> wrote:
>>
>>> I have an issue that I’m struggling to resolve. I’ve tried this out in
>>> the vanilla config.
>>>
>>> If a bridged destination in the default context:
>>> <action application="bridge" data="user/1001@${domain_name}”/>
>>>
>>> returns a 302 Moved Temporarily then the new destination is run
>>> through the dialplan in the same default context and everything is
>>> good. In the log:
>>> [DEBUG] sofia.c:6971 Redirect: Transfering to 1003
>>> [DEBUG] switch_ivr.c:2289 (sofia/internal/1000 at 192.168.1.226) State
>>> Change CS_EXECUTE -> CS_ROUTING
>>> [NOTICE] switch_ivr.c:2296 Transfer sofia/internal/1000 at 192.168.1.226
>>> to XML[1003 at default]
>>>
>>> However I need to call multiple destinations at once. When separating
>>> them with comma, I sometimes get “Only calling the first element in
>>> the list in this mode”. Some destinations in my case may have multiple
>>> registrations, so that’s not an option.
>>>
>>> Instead I do enterprise dial with :_: which gets round that:
>>>
>>> <action application="bridge"
>>> data="user/1001@${domain_name}:_:user/1002@${domain_name}"/>
>>>
>>> but it has the effect that if a destination returns 302 Moved
>>> Temporarily (1002 forwards to 1003 here), then it doesn’t run through
>>> the dialplan the same context, it goes to the public context and fails
>>> because the destination (1003) is an extension in the default context.
>>> The log looks like it’s handling the 302 as if it’s a new call:
>>>
>>> [INFO] sofia.c:10462 sofia/internal/1000 at 192.168.1.226 receiving
>>> invite from 192.168.1.226:5060 version: 1.10.7 -release-19-883d2cb662
>>> 64bit call-id: ee6cd84a-cca5-123a-d6a1-080027d0c8d3
>>> [INFO] mod_dialplan_xml.c:639 Processing Extension 1000 <1000>->1003
>>> in context public
>>> EXECUTE [depth=0] sofia/internal/1000 at 192.168.1.226 deflect(1003)
>>>
>>> I must be missing something in my understanding here – I don’t
>>> understand why the behaviour is different, but more interestingly, is
>>> there a way of getting the enterprise dial to process the 302s in the
>>> same way as when dialling one destination?
>>>
>>> Best wishes,
>>>
>>> Martin.
>>>
>>> Martin Paterson, Pattersong Music
>>> Reduced orchestrations of G&S
>>>
>>> _________________________________________________________________________
>>>
>>> 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-users mailing list
>>> FreeSWITCH-users at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20211201/42bc9c61/attachment-0001.html>


More information about the FreeSWITCH-users mailing list