this is how i do it from the dialplan:<br><br><br><br><br> <extension name="ServiceLookup"><br> <condition field="destination_number" expression="^(300030)(.*)|^\+(300030)(.*)"><br>
<br> <action application="set" data="bPfx=$1$3"/><br> <action application="set" data="bNum=$2$4"/><br><br> <action inline="true" application="set" data="intf=${regex(${caller_id_number}|^i\+(......)(.*) |%1)}"/><br>
<action application="set" data="caller_id_number=${cond(${intf}==true ? ${caller_id_number:1:32} : ${caller_id_number})}"/><br><br> <action inline="true" application="set" data="aPfx=${caller_id_number:0:6}"/><br>
<action inline="true" application="set" data="aNum=${caller_id_number:6:16}"/><br> <action inline="true" application="set" data="IP_ADDR=${network_addr}:5060"/><br>
<br> <action application="lookup_service_destination" data="in ${aNum}, <br> in ${aPfx}, <br> in ${bNum}, <br>
in ${bPfx}, <br> in ${IP_ADDR}, <br> out redContact, <br>
out authResult"/><br><br> <action application="log" data="INFO ######################## ServiceLookup ########################\n"/><br>
<action application="log" data="INFO ######################## contact = '${redContact}' ##############\n"/><br> <action application="log" data="INFO ######################## CallerNum = '${caller_id_number:6:16}' ##########\n"/><br>
<action application="log" data="INFO ######################## RADIUS auth = '${authResult}' ##########\n"/><br><br> <action application="execute_extension" data="doRedirect XML public"/><br>
</condition><br> </extension><br><br><br> <extension name="doRedirect"><br> <condition field="destination_number" expression="^doRedirect$"/><br> <condition field="${authResult}" expression="^0$|"><br>
<action application="log" data="INFO ######################## RADIUS auth OK!!!' ##########\n"/><br> <action application="redirect" data="${red_contact}"/><br>
<anti-action application="log" data="INFO ######################## RADIUS auth NOK!! ##########\n"/><br> <anti-action application="respond" data="403 Forbidden"/><br>
</condition><br><br> </extension><br><br><br><br><br><div class="gmail_quote">On Wed, Nov 25, 2009 at 6:45 PM, Michael Jerris <span dir="ltr"><<a href="mailto:mike@jerris.com">mike@jerris.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">In trunk there is a sofia profile setting to allow dialplan processing of 302 responses. This won't get you back into your same javascript, but you can probably do something clever from there.<br>
<br>
Mike<br>
<div class="im"><br>
On Nov 24, 2009, at 5:04 PM, John Platts wrote:<br>
<br>
><br>
> I have considered writing JavaScript code to bridge two calls together. However, I would like to perform custom handling of the 302 Moved Temporarily response. How do I handle the 302 Moved Temporarily response if I use JavaScript?<br>
><br>
<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br>