AFAIK 302 reenters the dialplan. If the destination number is unchanged, it will execute the same commands after the redirect as it did before the redirect, which would likely cause it to continously bridge, redirect, bridge, redirect.... That could explain what you&#39;re experiencing.<br>
<br>How do you want to handle the 302?<br><br>It&#39;s advisable to be careful what to do with a 302 which is why it reenters the dialplan. You can try dialing a $0.01 route but have it redirect you to a $1.00 route leaving you sending the call out on a route costing you $1.00 but charging your customer $0.01, or if you do bill them correctly leaving them with a bill of $1.00 when they expected only $0.01.<br>
<br>It&#39;s possible to handle a 302 manually by sending them to a dialplan context specifically for it, which keeps the redirect logic away from your main dialplan. See <a href="http://wiki.freeswitch.org/wiki/Dialplan_Handling_Incoming_Redirect">http://wiki.freeswitch.org/wiki/Dialplan_Handling_Incoming_Redirect</a><br>
<br>-Steve<br><br><br><div class="gmail_quote">On 11 August 2010 21:17, Chris Veazey <span dir="ltr">&lt;<a href="mailto:chris.veazey@gmail.com">chris.veazey@gmail.com</a>&gt;</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;">
Recompiled. Now getting a continuous Invite--&gt;302 loop. That eventually gets killed with a 503 by the upstream redirect server.<br><br><br>[root@fs1 log]# tail -f freeswitch.log<br>2010-08-11 20:03:30.027817 [DEBUG] switch_core_session.c:1039 Send signal sofia/external/9995552000000 [BREAK]<br>

2010-08-11 20:03:30.027817 [DEBUG] switch_core_session.c:1202 Session 6 (sofia/external/9995552000000) Locked, Waiting on external entities<br>2010-08-11 20:03:30.027817 [NOTICE] switch_core_session.c:1220 Session 6 (sofia/external/9995552000000) Ended<br>

2010-08-11 20:03:30.027817 [NOTICE] switch_core_session.c:1222 Close Channel sofia/external/9995552000000 [CS_DESTROY]<br>2010-08-11 20:03:30.027817 [DEBUG] switch_core_state_machine.c:427 (sofia/external/9995552000000) Callstate Change HANGUP -&gt; DOWN<br>

2010-08-11 20:03:30.027817 [DEBUG] switch_core_state_machine.c:430 (sofia/external/9995552000000) Running State Change CS_DESTROY<br>2010-08-11 20:03:30.027817 [DEBUG] switch_core_state_machine.c:440 (sofia/external/9995552000000) State DESTROY<br>

2010-08-11 20:03:30.027817 [DEBUG] mod_sofia.c:358 sofia/external/9995552000000 SOFIA DESTROY<br>2010-08-11 20:03:30.027817 [DEBUG] switch_core_state_machine.c:60 sofia/external/9995552000000 Standard DESTROY<br>2010-08-11 20:03:30.027817 [DEBUG] switch_core_state_machine.c:440 (sofia/external/9995552000000) State DESTROY going to sleep<br>

2010-08-11 20:07:50.601786 [DEBUG] sofia.c:5999 IP 10.14.0.128 Rejected by acl &quot;domains&quot;. Falling back to Digest auth.<br>2010-08-11 20:07:51.179975 [DEBUG] sofia.c:5999 IP 10.14.0.128 Rejected by acl &quot;domains&quot;. Falling back to Digest auth.<br>

2010-08-11 20:07:51.186996 [NOTICE] switch_channel.c:779 New Channel sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> [1e96cac0-a584-11df-ba1a-11ad2b71c214]<br>
2010-08-11 20:07:51.187997 [DEBUG] switch_core_state_machine.c:314 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) Running State Change CS_NEW<br>
2010-08-11 20:07:51.187997 [DEBUG] switch_core_state_machine.c:320 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) State NEW<br>2010-08-11 20:07:51.195018 [DEBUG] sofia.c:4317 Channel sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> entering state [received][100]<br>

2010-08-11 20:07:51.195018 [DEBUG] sofia.c:4328 Remote SDP:<br>v=0<br>o=- 0 0 IN IP4 10.14.0.128<br>s=-<br>c=IN IP4 10.14.0.128<br>t=0 0<br>m=audio 20596 RTP/AVP 107 0 101<br>a=rtpmap:107 CTL-SB-ADPCM/16000<div class="im">
<br>a=rtpmap:0 PCMU/8000<br>
a=rtpmap:101 telephone-event/8000<br></div>m=video 21114 RTP/AVP 125<br>a=rtpmap:125 H264/90000<br>a=fmtp:125 packetization-mode=1;profile-level-id=42E01F;sprop-parameter-sets=Z0IADPQLBKIA,aM44gAA=<br><br>2010-08-11 20:07:51.195018 [DEBUG] sofia.c:4445 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) State Change CS_NEW -&gt; CS_INIT<br>

2010-08-11 20:07:51.195018 [DEBUG] switch_core_session.c:1039 Send signal sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> [BREAK]<br>2010-08-11 20:07:51.195018 [DEBUG] switch_core_state_machine.c:314 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) Running State Change CS_INIT<br>

2010-08-11 20:07:51.195018 [DEBUG] switch_core_state_machine.c:338 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) State INIT<br>2010-08-11 20:07:51.195018 [DEBUG] mod_sofia.c:83 sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> SOFIA INIT<br>

2010-08-11 20:07:51.195018 [DEBUG] mod_sofia.c:119 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) State Change CS_INIT -&gt; CS_ROUTING<br>2010-08-11 20:07:51.195018 [DEBUG] switch_core_session.c:1039 Send signal sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> [BREAK]<br>

2010-08-11 20:07:51.195018 [DEBUG] switch_core_state_machine.c:338 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) State INIT going to sleep<br>2010-08-11 20:07:51.195018 [DEBUG] switch_core_state_machine.c:314 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) Running State Change CS_ROUTING<br>

2010-08-11 20:07:51.195018 [DEBUG] switch_channel.c:1512 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) Callstate Change DOWN -&gt; RINGING<br>2010-08-11 20:07:51.196022 [DEBUG] switch_core_state_machine.c:341 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) State ROUTING<br>

2010-08-11 20:07:51.196022 [DEBUG] mod_sofia.c:142 sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> SOFIA ROUTING<br>2010-08-11 20:07:51.196022 [DEBUG] switch_core_state_machine.c:77 sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> Standard ROUTING<br>

2010-08-11 20:07:51.196022 [INFO] mod_dialplan_xml.c:331 Processing 9995551000000-&gt;9995552000000 in context default<br>Dialplan: sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> parsing [default-&gt;unloop] continue=false<br>

Dialplan: sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> Regex (PASS) [unloop] ${unroll_loops}(true) =~ /^true$/ break=on-false<br>Dialplan: sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> Regex (FAIL) [unloop] ${sip_looped_call}() =~ /^true$/ break=on-false<br>

Dialplan: sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> parsing [default-&gt;sip_uri] continue=false<br>Dialplan: sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> Regex (FAIL) [sip_uri] destination_number(9995552000000) =~ /^sip:(.*)$/ break=on-false<br>

Dialplan: sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> parsing [default-&gt;catchall] continue=false<br>Dialplan: sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> Regex (PASS) [catchall] destination_number(9995552000000) =~ /.*/ break=on-false<br>

Dialplan: sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> Action bridge(sofia/gateway/<a href="http://sip.blinkmind.net/$%7Bdestination_number%7D" target="_blank">sip.blinkmind.net/${destination_number}</a>)<br>

2010-08-11 20:07:51.196022 [DEBUG] switch_core_state_machine.c:119 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) State Change CS_ROUTING -&gt; CS_EXECUTE<br>
2010-08-11 20:07:51.196022 [DEBUG] switch_core_session.c:1039 Send signal sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> [BREAK]<br>
2010-08-11 20:07:51.196022 [DEBUG] switch_core_state_machine.c:341 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) State ROUTING going to sleep<br>2010-08-11 20:07:51.196022 [DEBUG] switch_core_state_machine.c:314 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) Running State Change CS_EXECUTE<br>

2010-08-11 20:07:51.196022 [DEBUG] switch_core_state_machine.c:348 (sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a>) State EXECUTE<br>2010-08-11 20:07:51.196022 [DEBUG] mod_sofia.c:235 sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> SOFIA EXECUTE<br>

2010-08-11 20:07:51.196022 [DEBUG] switch_core_state_machine.c:157 sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> Standard EXECUTE<br>EXECUTE sofia/internal/<a href="mailto:9995551000000@sip.blinkmind.net" target="_blank">9995551000000@sip.blinkmind.net</a> bridge(sofia/gateway/<a href="http://sip.blinkmind.net/9995552000000" target="_blank">sip.blinkmind.net/9995552000000</a>)<br>

2010-08-11 20:07:51.196022 [NOTICE] switch_channel.c:779 New Channel sofia/external/9995552000000 [1e984e40-a584-11df-ba1b-11ad2b71c214]<br>2010-08-11 20:07:51.196022 [DEBUG] mod_sofia.c:3892 (sofia/external/9995552000000) State Change CS_NEW -&gt; CS_INIT<br>

2010-08-11 20:07:51.196022 [DEBUG] switch_core_session.c:1039 Send signal sofia/external/9995552000000 [BREAK]<br>2010-08-11 20:07:51.197023 [DEBUG] switch_core_state_machine.c:314 (sofia/external/9995552000000) Running State Change CS_INIT<br>

2010-08-11 20:07:51.197023 [DEBUG] switch_core_state_machine.c:338 (sofia/external/9995552000000) State INIT<br>2010-08-11 20:07:51.197023 [DEBUG] mod_sofia.c:83 sofia/external/9995552000000 SOFIA INIT<br>2010-08-11 20:07:51.197023 [DEBUG] sofia_glue.c:2036 sip:10.11.0.20 Setting proxy route to sofia/external/9995552000000<br>

2010-08-11 20:07:51.197023 [DEBUG] mod_sofia.c:119 (sofia/external/9995552000000) State Change CS_INIT -&gt; CS_ROUTING<br>2010-08-11 20:07:51.197023 [DEBUG] switch_core_session.c:1039 Send signal sofia/external/9995552000000 [BREAK]<br>

2010-08-11 20:07:51.197023 [DEBUG] switch_core_state_machine.c:338 (sofia/external/9995552000000) State INIT going to sleep<br>2010-08-11 20:07:51.197023 [DEBUG] switch_core_state_machine.c:314 (sofia/external/9995552000000) Running State Change CS_ROUTING<br>

2010-08-11 20:07:51.197023 [DEBUG] switch_channel.c:1512 (sofia/external/9995552000000) Callstate Change DOWN -&gt; RINGING<br>2010-08-11 20:07:51.197023 [DEBUG] switch_core_state_machine.c:341 (sofia/external/9995552000000) State ROUTING<br>

2010-08-11 20:07:51.197023 [DEBUG] mod_sofia.c:142 sofia/external/9995552000000 SOFIA ROUTING<br>2010-08-11 20:07:51.197023 [DEBUG] switch_ivr_originate.c:66 (sofia/external/9995552000000) State Change CS_ROUTING -&gt; CS_CONSUME_MEDIA<br>

2010-08-11 20:07:51.197023 [DEBUG] switch_core_session.c:1039 Send signal sofia/external/9995552000000 [BREAK]<br>2010-08-11 20:07:51.197023 [DEBUG] switch_core_state_machine.c:341 (sofia/external/9995552000000) State ROUTING going to sleep<br>

2010-08-11 20:07:51.197023 [DEBUG] switch_core_state_machine.c:314 (sofia/external/9995552000000) Running State Change CS_CONSUME_MEDIA<br>2010-08-11 20:07:51.197023 [DEBUG] switch_core_state_machine.c:360 (sofia/external/9995552000000) State CONSUME_MEDIA<br>

2010-08-11 20:07:51.197023 [DEBUG] switch_core_state_machine.c:360 (sofia/external/9995552000000) State CONSUME_MEDIA going to sleep<br>2010-08-11 20:07:51.198023 [DEBUG] sofia.c:4317 Channel sofia/external/9995552000000 entering state [calling][0]<br>

2010-08-11 20:07:51.201020 [DEBUG] sofia_glue.c:2036 sip:10.11.0.20 Setting proxy route to sofia/external/9995552000000<br>2010-08-11 20:07:51.201020 [DEBUG] sofia.c:4317 Channel sofia/external/9995552000000 entering state [calling][0]<br>

2010-08-11 20:07:51.203018 [DEBUG] sofia_glue.c:2036 sip:10.11.0.20 Setting proxy route to sofia/external/9995552000000<br>2010-08-11 20:07:51.204015 [DEBUG] sofia.c:4317 Channel sofia/external/9995552000000 entering state [calling][0]<br>

2010-08-11 20:07:51.206022 [DEBUG] sofia_glue.c:2036 sip:10.11.0.20 Setting proxy route to sofia/external/9995552000000<br>2010-08-11 20:07:51.207023 [DEBUG] sofia.c:4317 Channel sofia/external/9995552000000 entering state [calling][0]<br>

2010-08-11 20:07:51.209026 [DEBUG] sofia_glue.c:2036 sip:10.11.0.20 Setting proxy route to sofia/external/9995552000000<br>2010-08-11 20:07:51.209026 [DEBUG] sofia.c:4317 Channel sofia/external/9995552000000 entering state [calling][0]<br>

2010-08-11 20:07:51.212037 [DEBUG] sofia_glue.c:2036 sip:10.11.0.20 Setting proxy route to sofia/external/9995552000000<br>2010-08-11 20:07:51.212037 [DEBUG] sofia.c:4317 Channel sofia/external/9995552000000 entering state [calling][0]<br>

2010-08-11 20:07:51.215047 [DEBUG] sofia_glue.c:2036 sip:10.11.0.20 Setting proxy route to sofia/external/9995552000000<br>2010-08-11 20:07:51.215047 [DEBUG] sofia.c:4317 Channel sofia/external/9995552000000 entering state [calling][0]<br>

2010-08-11 20:07:51.217052 [DEBUG] sofia_glue.c:2036 sip:10.11.0.20 Setting proxy route to sofia/external/9995552000000<br>2010-08-11 20:07:51.217052 [DEBUG] sofia.c:4317 Channel sofia/external/9995552000000 entering state [calling][0]<br>

2010-08-11 20:07:51.220062 [DEBUG] sofia_glue.c:2036 sip:10.11.0.20 Setting proxy route to sofia/external/9995552000000<br>2010-08-11 20:07:51.220062 [DEBUG] sofia.c:4317 Channel sofia/external/9995552000000 entering state [calling][0]<br>

2010-08-11 20:07:51.222070 [DEBUG] sofia_glue.c:2036 sip:10.11.0.20 Setting proxy route to sofia/external/9995552000000<br>2010-08-11 20:07:51.223073 [DEBUG] sofia.c:4317 Channel sofia/external/9995552000000 entering state [calling][0]<br>

2010-08-11 20:07:51.225079 [DEBUG] sofia_glue.c:2036 sip:10.11.0.20 Setting proxy route to sofia/external/9995552000000<br>2010-08-11 20:07:51.225079 [DEBUG] sofia.c:4317 Channel sofia/external/9995552000000 entering state [calling][0]<br>

2010-08-11 20:07:51.227086 [DEBUG] sofia_glue.c:2036 sip:10.11.0.20 Setting proxy route to sofia/external/9995552000000<br>2010-08-11 20:07:51.228089 [DEBUG] sofia.c:4317 Channel sofia/external/9995552000000 entering state [calling][0]<br>

2010-08-11 20:07:51.230097 [DEBUG] sofia.c:4317 Channel sofia/external/9995552000000 entering state [terminated][503]<br>2010-08-11 20:07:51.230097 [DEBUG] switch_channel.c:2309 (sofia/external/9995552000000) Callstate Change RINGING -&gt; HANGUP<br>

2010-08-11 20:07:51.230097 [NOTICE] sofia.c:4931 Hangup sofia/external/9995552000000 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]<br>2010-08-11 20:07:51.230097 [DEBUG] switch_channel.c:2325 Send signal sofia/external/9995552000000 [KILL]<br>

2010-08-11 20:07:51.230097 [DEBUG] switch_core_session.c:1039 Send signal sofia/external/9995552000000 [BREAK]<br>2010-08-11 20:07:51.230097 [DEBUG] switch_core_state_machine.c:314 (sofia/external/9995552000000) Running State Change CS_HANGUP<br>

2010-08-11 20:07:51.230097 [DEBUG] switch_core_state_machine.c:535 (sofia/external/9995552000000) State HANGUP<br>2010-08-11 20:07:51.230097 [DEBUG] mod_sofia.c:447 sofia/external/9995552000000 Overriding SIP cause 503 with 503 from the other leg<div>
<div></div><div class="h5"><br>
<br><div class="gmail_quote">On Wed, Aug 11, 2010 at 2:15 PM, Jeff Lenk <span dir="ltr">&lt;<a href="mailto:jeff@jefflenk.com" target="_blank">jeff@jefflenk.com</a>&gt;</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;">

<br>
Line 3998 of Sofia.c<br>
switch_channel_hangup(channel, SWITCH_CAUSE_REDIRECTION_TO_NEW_DESTINATION);<br>
<font color="#888888">--<br>
View this message in context: <a href="http://freeswitch-users.2379917.n2.nabble.com/FS-processing-302-tp5393783p5413561.html" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/FS-processing-302-tp5393783p5413561.html</a><br>


</font><div><div></div><div>Sent from the freeswitch-users mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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>
</div></div><br>_______________________________________________<br>
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>
<br></blockquote></div><br>