[Freeswitch-users] Redirect during Bridge

Mathieu Rene mrene_lists at avgs.ca
Mon Feb 8 21:36:55 PST 2010


Hi,

mod_sofia's default behavior is to process 302s within the sip stack,  
automatically, in some cases, like yours, this behavior isnt desired.
You can enable manual redirects which will make the call go back in  
the dialplan whenever an invite hits a 302.
Add the following to your sip profile:
<param name="manual-redirect" value="true" />

You can then, in your dialplan, set the sip_redirect_profile variable  
to your internal network's sip profile. When a call is redirected,   
the sip_redirect_dialstring variable will contain the dialstring you  
need to pass to bridge.

your outbound dialplan should look like this
<extension name="something">
  <condition field="destination_number" expression="....">
    <action application="set" data="sip_redirect_profile=internal" />
  </condition>
</extension>

Once a 302 is received, your call with redirect to the "redirected"  
dialplan context (or to the one specified in sip_redirect_context and  
sip_redirect_dialplan). It should like the following:

<context name="redirected">
  <extension name="redirected">
   <condition>
     <action application="bridge" data="${sip_redirect_dialstring}" />
   </condition>
  </extension>
</context>

Note: you can also check if the user is allowed to do redirects while  
using this method, so, lets say, one of your carrier can't 302 you to  
another of your carriers.


Mathieu Rene
Avant-Garde Solutions Inc
Office: + 1 (514) 664-1044 x100
Cell: +1 (514) 664-1044 x200
mrene at avgs.ca




On 8-Feb-10, at 8:05 PM, Lon Baker wrote:

> Hi,
>
> I need to bridge calls to a proxy that issues a redirect command. Its
> an internal proxy that translates internal SIP URIs into outbound
> URIs.
>
> I have one interface on a private network where the proxy is running
> and another interface on my public network.
>
> If I am reading the debug information correctly, the bridge to the
> proxy is getting the redirect correctly, but since it is on the
> internal network (profile), the call never transitions to the public
> network to complete the call.
>
> Is it possible to do this?
>
> Lon
>
> _______________________________________________
> 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
> http://www.freeswitch.org





More information about the FreeSWITCH-users mailing list