<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Santiago,<div><br></div><div>you would do this way:</div><div><br></div><div><div><extension name="call_extension"><br> <condition field="network_addr" expression="10.1.1.1"><br> <action application="set" data="continue_on_fail=USER_BUSY"/> </div><div> <action application="set" data="hangup_after_bridge=true"/></div><div> <action application="bridge" data="sofia/gateway/profile/${sip_to_user}"/></div><div> <action application="transfer" data="header_test_extension"/><br> </condition><br><div></div></div><div><div><div><div></extension><br></div></div></div></div><div><br></div><extension name="header_test_extension"><br><div> <condition field="${sip_h_X-Header-Name}" expression="Header Value"><br> <action application="respond" data="404"/><br> <action application="hangup"/><br> </condition></div><div></extension><br></div></div><div><br></div><div>That's the idea, but I am really not sure you can test the value of ${sip_h_X-Header-Name} if that header is sent back by the called endpoint...</div><div><br></div><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 </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: 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: 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"> </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: 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); "> - <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. </i><b><i>IPeva</i></b><i> 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/11/2010 à 21:46, Santiago Soares a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello everybody,<br><br>I'd like to handle my calls like this:<br>If callee sends a "486 User Busy" AND a certain header is present in the response, Freeswitch would send a "404 Not Found" to the caller.<br>
The following code would solve my problem:<br><br><extension name="header_test_extension"><br><br><condition field="network_addr" expression="10.1.1.1"><br> <action application="set" data="continue_on_fail=USER_BUSY"/> <br>
<action application="bridge" data="sofia/gateway/profile/${sip_to_user}"/><br> <condition field="${sip_h_X-Header-Name}" expression="Header Value"><br> <action application="respond" data="404"/><br>
<action application="hangup"/><br> </condition><br></condition><br><br></extension><br><br>But the thing is that Freeswitch doesn't allow nested conditions.<br><br>Any ideas on how I can handle this?<br>
<br clear="all">Santiago Soares<br>Fone: (41) 8488-0537<br>
_______________________________________________<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>