[Freeswitch-users] help 302 Redirect
Andrew
aademattia at comcast.net
Tue Apr 22 05:29:36 MSD 2014
Yes all that works but what I am trying to do is call a LRN service and
return back the ported number.
The problem I am facing is the LRN service sends back a 302 and causes a
redirect/ another inbound call.
What I want to do is pull the LRN info back from the outbound call and the
ported number being returned.
So what I am looking for is how to disable redirects and then pull the value
of the 302.
I found outbound_redirect_fatal=true and this does seem to disable the
redirect but I can't get the ported info.
Sample
ManagedSession leg_b = new ManagedSession(
"{outbound_redirect_fatal=true}sofia/internal/123456789 at 1.1.1.1.1 ");
string LRNDip = leg_b.GetVariable("Caller-RDNIS"); ;
string LRNDip1 = leg_b.GetVariable("sip_redirected_to"); ;
string LRNDip2 =
leg_b.GetVariable("sip_redirect_contact_user_X"); ;
string LRNDip3 =
leg_b.GetVariable("sip_redirect_contact_host_X"); ;
string LRNDip4 =
leg_b.GetVariable("sip_redirect_contact_params_X"); ;
string LRNDip5 = leg_b.GetVariable("sip_redirected_by"); ;
I have business logic I will do after getting the LRN. I am trying to avoid
having another setup/ destroy with a redirect.
Andrew
-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Brian
West
Sent: Monday, April 21, 2014 9:14 PM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] help 302 Redirect
Here is the quick start guide to doing 302 redirects: (Also outlined in the
Wiki article that Jay referenced)
Processing Extension 1016 <1016>->5555 in context default
<extension name="redirect_test">
<condition field="destination_number" expression="^5555$">
<action application="bridge"
data="sofia/internal/sip:5555 at conference.freeswitch.org"/>
</condition>
</extension>
Processing Extension 1016 <1016>->888 in context redirected
variable_sip_redirect_contact_0: ["unknown"
<sip:888 at conference.freeswitch.org>]
variable_sip_redirected_to: ["unknown" <sip:888 at conference.freeswitch.org>]
variable_sip_redirect_contact_user_0: [888]
variable_sip_redirect_contact_host_0: [conference.freeswitch.org]
variable_sip_redirect_dialstring_0:
[sofia/internal/sip:888 at conference.freeswitch.org]
variable_sip_redirect_dialstring:
[sofia/internal/sip:888 at conference.freeswitch.org]
Here is what I have in the redirected context.
<context name="redirected">
<extension name="handle_redirect">
<condition field="destination_number" expression="(.*)">
<action application="info"/>
<action application="bridge" data="${sip_redirect_dialstring}"/>
</condition>
</extension>
</context>
Questions?
--
Brian West
brian at freeswitch.org
FreeSWITCH Solutions, LLC
PO BOX 2531
Brookfield, WI 53008-2531
Twitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST
iNUM: +883 5100 1420 9001
ISN: 410*543
Skype:briankwest
PGP Key: http://www.bkw.org:81/key.txt (AB93356707C76CED)
On Apr 21, 2014, at 7:55 PM, Andrew <aademattia at comcast.net> wrote:
> Wow
Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users
mailing list