Thank you for the answers, but it didn't work.<br>Isn't there any way I can get a header value from the called endpoint response?<br>I have a server that returns 486 for many call setup problems, and I'd like that FS send another response to the caller endpoint, based on this "X-Header-Name".<br>
In other words, I'd like to override the callee response, based on this header value. <br>Is it possible?<br><br clear="all">Santiago Soares<br>Fone: (41) 8488-0537<br>
<br><br><div class="gmail_quote">On Wed, Nov 10, 2010 at 4:27 AM, Troy Anderson <span dir="ltr"><<a href="mailto:freeswitch@tlainvestments.com">freeswitch@tlainvestments.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;">
Santiago,<br>
<br>
I think something like this will work:<br>
<div class="im"><br>
<extension name="header_test_extension"><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>
</div> <action application="transfer' data="header_test_extension-BUSY"><br>
</condition><br>
</extension><br>
<br>
<extension name="header_test_extension-BUSY"><br>
<div class="im"> <condition field="${sip_h_X-Header-Name}" expression="Header Value"><br>
<action application="respond" data="404"/><br>
<action application="hangup"/><br>
</condition><br>
</div></extension><br>
<font color="#888888"><br>
-Troy<br>
</font><div><div></div><div class="h5"><br>
On Nov 8, 2010, at 1:46 PM, Santiago Soares wrote:<br>
<br>
> 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>
> Santiago Soares<br>
> Fone: (41) 8488-0537<br>
</div></div><div><div></div><div class="h5">> _______________________________________________<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>
<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>
</div></div></blockquote></div><br>