<br><br><div class="gmail_quote">On Mon, Nov 15, 2010 at 3:19 PM, Anthony Cosgrove <span dir="ltr"><<a href="mailto:acosgrov@gmail.com">acosgrov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div style="word-wrap: break-word;"><div>I would think in this situation you would need to either use a dynamic dialplan to return the 302 to whatever destination you wish (<a href="http://wiki.freeswitch.org/wiki/Mod_xml_curl" target="_blank">http://wiki.freeswitch.org/wiki/Mod_xml_curl</a>), or if staying static a continue_on_fail branch along with lua to fetch your destination value.</div>
<div><br></div><div>After a quick look at google looks like my line of thinking is somewhat on track... </div><div><br></div><div><span style="font-family: arial,sans-serif; line-height: 19px;"><a href="http://old.nabble.com/302-redirects-and-continue_on_fail%3Dtrue-td24544501.html" style="color: rgb(34, 0, 193);" target="_blank">Old Nabble - </a><i style="font-weight: bold; font-style: normal;"><a href="http://old.nabble.com/302-redirects-and-continue_on_fail%3Dtrue-td24544501.html" style="color: rgb(34, 0, 193);" target="_blank">Freeswitch</a></i><a href="http://old.nabble.com/302-redirects-and-continue_on_fail%3Dtrue-td24544501.html" style="color: rgb(34, 0, 193);" target="_blank">-users - 302 redirects and </a><i style="font-weight: bold; font-style: normal;"><a href="http://old.nabble.com/302-redirects-and-continue_on_fail%3Dtrue-td24544501.html" style="color: rgb(34, 0, 193);" target="_blank">continue_on_fail</a></i><a href="http://old.nabble.com/302-redirects-and-continue_on_fail%3Dtrue-td24544501.html" style="color: rgb(34, 0, 193);" target="_blank"> </a><b><a href="http://old.nabble.com/302-redirects-and-continue_on_fail%3Dtrue-td24544501.html" style="color: rgb(34, 0, 193);" target="_blank">...</a></b></span></div>
<div><span style="font-family: arial,sans-serif; line-height: 19px;"><span style="line-height: 15px;"><a href="http://www.google.com/url?q=http://lists.freeswitch.org/pipermail/freeswitch-users/2009-July/016903.html&sa=X&ei=zD7hTMTkM4WglAe-5_TMAw&ved=0CDIQrAIoAzAD&usg=AFQjCNGc7F3s8UprN9V3M6iaV7L-NBsnog" style="color: rgb(34, 0, 193);" target="_blank">302 redirects and <i style="font-weight: bold; font-style: normal;">continue_on_fail</i>=true</a> - <span style="color: rgb(118, 118, 118);">Jul 18, 2009</span></span></span></div>
<div><span style="font-family: arial,sans-serif; line-height: 19px;"><span style="line-height: 15px;"><span style="color: rgb(118, 118, 118);"><span style="color: rgb(34, 0, 193); line-height: 19px;">[<i style="font-weight: bold; font-style: normal;">Freeswitch</i>-users] "<i style="font-weight: bold; font-style: normal;">continue on fail</i>" howto</span></span></span></span></div>
<br></div></blockquote></div><br><br>thanks for your answer ....<br><br>actually im looking at something like this... still need to test it and see what the scalability might be.<br><br><br><br><br>put this in context features:<br>
<br><br> <extension name="A-CFU"><br> <condition field="destination_number" expression="^\*21\*(\d.*)$"><br><br> <action application="db" data="insert/FWD-${caller_id_number}/U/$1"/><br>
<br> <!-- play appropriate confirmation tone --><br> <action application="hangup"/><br> </condition><br> </extension><br><br><br><br> <extension name="D-CFU"><br>
<condition field="destination_number" expression="^\#21\#$"><br><br> <action application="db" data="delete/FWD-${caller_id_number}/U"/><br><br> <!-- play appropriate confirmation tone --><br>
<action application="hangup"/><br> </condition><br> </extension><br><br><br> <extension name="check_if_forwarded"><br><br> <condition field="destination_number" expression="^check_if_forwarded$"/><br>
<condition field="${forwarded-to}" expression="^$"/><br> <action application="export" data="to_dial=user/${dialed_extension}"/><br> </condition><br><br>
<condition field="destination_number" expression="^check_if_forwarded$"/><br> <condition field="${forwarded-to}" expression="^(10[01][0-9])$"/><br> <action application="set" data="sip_h_Diversion=<sip:${dialed_extension}@${sip_from_host};user=phone>;reason=unconditional"/> <br>
<action application="export" data="to_dial=user/${forwarded-to}"/><br> </condition><br><br> <condition field="destination_number" expression="^check_if_forwarded$"/><br>
<condition field="${forwarded-to}" expression="^(0.*)$"/><br> <action application="set" data="sip_h_Diversion=<sip:${dialed_extension}@${sip_from_host};user=phone>;reason=unconditional"/><br>
<action application="export" data="to_dial=loopback/${forwarded-to}"/><br> </condition><br> </extension><br><br><br><br>In context default just execute this to populate forwarded-to variable:<br>
<br> <extension name="isForwarded"><br> <condition><br> <action application="set" data="forwarded-to=${db(select/FWD-${destination_number}/U)}"/><br> </condition><br>
</extension><br><br><br><br><br><br>modify just a bit the LocalExtension :)<br><br><br> <extension name="Local_Extension"><br> <condition field="destination_number" expression="^(10[01][0-9])$"><br>
<action application="set" data="dialed_extension=$1"/><br> <action application="export" data="dialed_extension=$1"/><br> <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> --><br>
<action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/><br> <action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/><br>
<action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/><br> <action application="set" data="ringback=${us-ring}"/><br> <action application="set" data="transfer_ringback=$${hold_music}"/><br>
<action application="set" data="call_timeout=30"/><br> <!-- <action application="set" data="sip_exclude_contact=${network_addr}"/> --><br> <action application="set" data="hangup_after_bridge=true"/><br>
<!--<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/> --><br> <action application="set" data="continue_on_fail=true"/><br>
<action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/><br> <action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/><br>
<action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/><br> <!--<action application="export" data="nolocal:sip_secure_media=${user_data(${dialed_extension}@${domain_name} var sip_secure_media)}"/>--><br>
<action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/><br><br><br> <!-- check if the destination is actually forwarded --><br> <action application="execute_extension" data="check_if_forwarded" XML features/><br>
<br><br> <action application="bridge" data="${to_dial}@${domain_name}"/><br><br><br> <action application="answer"/><br> <action application="sleep" data="1000"/><br>
<action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/><br> </condition><br> </extension><br><br><br><br><br><br><br><br>
<br><br><br><br>