<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Personally, I used to do it this way:<div><br></div><div><div>&nbsp;&nbsp; &nbsp;&lt;extension name="from_gw_to_internal"&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp;&lt;condition field="destination_number" expression="^(.*)$"&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="set" data="hangup_after_bridge=true"/&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="set" data="continue_on_fail=19"/&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="bridge" data="{sip_cid_type=none}sofia/gateway/gw/$1"/&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="transfer" data="480to503"/&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp;&lt;/condition&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;/extension&gt;</div><div><br></div><div>&nbsp;&nbsp; &nbsp;&lt;extension name="480to503"&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp;&lt;condition field="${proto_specific_hangup_cause}" expression="<a href="sip:480">sip:480</a>"&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="set" data="sip_ignore_remote_cause=true"/&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="respond" data="503"/&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="hangup" data="NORMAL_CIRCUIT_CONGESTION"/&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp;&lt;/condition&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;/extension&gt;</div><div><br></div><div>Of course, you would have to change continue_on_fail=19 to whatever you want, as there are several possibilities for 480.</div><div><br></div><div>
<span class="Apple-style-span" style="font-size: 14px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" color="#1C00FF">David Ponzone &nbsp;</font><font class="Apple-style-span" color="#000000" size="3"><span class="Apple-style-span" style="font-size: 12px; ">Direction Technique</span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">email: <a href="mailto:david.ponzone@ipeva.fr">david.ponzone@ipeva.fr</a></span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">tel: &nbsp; &nbsp; &nbsp;01 74 03 18 97</span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">gsm: &nbsp; 06 66 98 76 34</span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><br></font></div><div><font class="Apple-style-span" color="#1C00FF" face="'Helvetica Neue'">Service Client<span class="Apple-converted-space">&nbsp;</span></font><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" color="#FF0000">IP</font></font><font class="Apple-style-span" color="#1C00FF" face="'Helvetica Neue'">eva</font></div><div><font class="Apple-style-span" color="#1C00FF" face="'Helvetica Neue'"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; "><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">tel: &nbsp; &nbsp; &nbsp;0811 46 26 26</span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'" size="3"><span class="Apple-style-span" style="font-size: 13px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Arial; color: rgb(0, 34, 243); "><span style="text-decoration: underline; "><a href="BLOCKED::http://www.ipeva.fr/">www.ipeva.fr</a></span><span style="color: rgb(101, 104, 149); ">&nbsp; -&nbsp; &nbsp;<span style="color: rgb(0, 34, 243); text-decoration: underline; "><a href="BLOCKED::http://www.ipeva-studio.com/">www.ipeva-studio.com</a></span></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Arial; color: rgb(0, 34, 243); "><span class="Apple-style-span" style="text-decoration: underline; "><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Arial; color: rgb(0, 34, 243); "><span class="Apple-style-span"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: justify; font: normal normal normal 10px/normal Arial; color: rgb(192, 192, 192); "><i>Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération.&nbsp;</i><b><i>IPeva</i></b><i>&nbsp;décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur.</i></div><div style="text-decoration: underline; text-align: justify; "><font class="Apple-style-span" color="#C0C0C0"><i><br></i></font></div></span></div></span></font></div></span></font></div></div></span><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br><div><div>Le 08/06/2011 à 01:46, Michael Collins a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite">Thanks for the tip Steve!<div>-MC<br><br><div class="gmail_quote">On Tue, Jun 7, 2011 at 4:03 PM, Steven Ayre <span dir="ltr">&lt;<a href="mailto:steveayre@gmail.com">steveayre@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Try also setting this before the bridge:<br>&lt;action application="set" data="sip_ignore_remote_cause=true"/&gt;<br><br>Without that you'll get a 34 reason but 480 sip code, with it you'll get a 34+503.<br>


<br>-Steve<div><div></div><div class="h5"><br><br><br><br><div class="gmail_quote">On 7 June 2011 21:51, Eric Beard <span dir="ltr">&lt;<a href="mailto:eric@loopfx.com" target="_blank">eric@loopfx.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">I tried this and it does not modify the SIP response code.&nbsp; It seems to only affect this response header:</span></p><div><span style="font-size:11.0pt;color:#1F497D">&nbsp;</span><br class="webkit-block-placeholder"></div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Reason: Q.850;cause=34;text="NORMAL_CIRCUIT_CONGESTION"</span></p><div>
<span style="font-size:11.0pt;color:#1F497D">&nbsp;</span><br class="webkit-block-placeholder"></div><p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D">-----------------------</span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;color:#1F497D">Eric Z. Beard, CTO</span></b><span style="font-size:10.0pt;color:#1F497D"></span></p><p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D">Loop LLC</span></p><p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D">w (877) 850-2010 x9249</span></p><p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D">m (727) 776-2768</span></p><p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D"><a href="mailto:eric@loopfx.com" target="_blank">eric@loopfx.com</a></span></p><div><span style="font-size:11.0pt;color:#1F497D">&nbsp;</span><br class="webkit-block-placeholder"></div>


<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Stephen Wilde<br>


<b>Sent:</b> Tuesday, June 07, 2011 12:53 PM<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> Re: [Freeswitch-users] Freeswitch dialplan help</span></p></div><div><div></div><div><div>&nbsp;<br class="webkit-block-placeholder"></div><p class="MsoNormal">I think that something like this can work (not tested by me):</p><div><div>&nbsp;<br class="webkit-block-placeholder"></div></div><div><div><p class="MsoNormal">&lt;context name="default"&gt;</p></div><div><p class="MsoNormal">


&nbsp;&nbsp; &nbsp;&lt;extension name="myextension"&gt;</p></div></div><div><p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;condition&gt;</p></div><div><p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="bridge" data="sofia/${Dialstring}"/&gt;</p>


</div><div><p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="transfer" data="dohangup XML dohangup"/&gt;</p></div><div><p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;/condition&gt;</p></div><div><p class="MsoNormal">


&nbsp;&nbsp; &nbsp;&lt;/extension&gt;</p></div><div><p class="MsoNormal">&lt;/context&gt;</p></div><div><div>&nbsp;<br class="webkit-block-placeholder"></div></div><div><div><div><p class="MsoNormal">&lt;context name="dohangup"&gt;</p></div><div><p class="MsoNormal">


&nbsp;&nbsp; &nbsp;&lt;extension name="dohangup"&gt;</p></div></div><div><p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;condition field="${bridge_hangup_cause}" expression="^(<span><i><span style="font-size:10.0pt">NO_ANSWER</span></i></span>)$" break="on-true"&gt;</p>


</div><div><p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="hangup" data="<span><i><span style="font-size:10.0pt">NORMAL_CIRCUIT_CONGESTION</span></i></span>"/&gt;</p></div><div><div><p class="MsoNormal">


&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;/condition&gt;</p></div><div><p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;condition&gt;</p></div><div><p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="hangup" data="${bridge_hangup_cause}"/&gt;</p>


</div><div><p class="MsoNormal">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;/condition&gt;</p></div><div><p class="MsoNormal">&nbsp;&nbsp; &nbsp;&lt;/extension&gt;</p></div><div><p class="MsoNormal">&lt;/context&gt;</p></div></div><div><div>&nbsp;<br class="webkit-block-placeholder"></div></div>


<div><div>&nbsp;<br class="webkit-block-placeholder"></div></div><div><p class="MsoNormal">Stephen</p></div><div>&nbsp;<br class="webkit-block-placeholder"></div><div><p class="MsoNormal">On Tue, Jun 7, 2011 at 6:05 PM, awais nazir &lt;<a href="mailto:awais-nazeer@hotmail.com" target="_blank">awais-nazeer@hotmail.com</a>&gt; wrote:</p>


<div><p class="MsoNormal">Hi<br><br>I want to achieve a simple scenario , after attempting a bridge in my dialplan if I get cause code 480, it should be converted to 503 to originator.<br><br>&lt;action application="bridge" data="sofia/${Dialstring}"/&gt;<br>


&lt;!--If&nbsp;</p><pre>${hangup_cause} == "480" then ${hangup_cause}</pre><pre>=503<br>&gt;<br><br>Can somebody help here.</pre><pre> </pre></div><p class="MsoNormal" style="margin-bottom:12.0pt"><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></p>


</div><div>&nbsp;<br class="webkit-block-placeholder"></div></div></div></div></div></div><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>
<br></blockquote></div><br><div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%">

</div>
</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></div>
_______________________________________________<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>