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

Martin Paterson martin at pattersong.co.uk
Tue Nov 30 17:57:13 UTC 2021


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



More information about the FreeSWITCH-users mailing list