Thank you for the answers, but it didn't work.
Isn't there any way I can get a header value from the called endpoint response?
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".
In other words, I'd like to override the callee response, based on this header value.
Is it possible?

Santiago Soares
Fone: (41) 8488-0537


On Wed, Nov 10, 2010 at 4:27 AM, Troy Anderson <freeswitch@tlainvestments.com> wrote:
Santiago,

I think something like this will work:

<extension name="header_test_extension">
       <condition field="network_addr" expression="10.1.1.1">
           <action application="set" data="continue_on_fail=USER_BUSY"/>
           <action application="bridge" data="sofia/gateway/profile/${sip_to_user}"/>
           <action application="transfer' data="header_test_extension-BUSY">
       </condition>
</extension>

<extension name="header_test_extension-BUSY">
   <condition field="${sip_h_X-Header-Name}" expression="Header Value">
       <action application="respond" data="404"/>
       <action application="hangup"/>
   </condition>
</extension>

-Troy

On Nov 8, 2010, at 1:46 PM, Santiago Soares wrote:

> Hello everybody,
>
> I'd like to handle my calls like this:
> 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.
> The following code would solve my problem:
>
> <extension name="header_test_extension">
>
> <condition field="network_addr" expression="10.1.1.1">
>     <action application="set" data="continue_on_fail=USER_BUSY"/>
>     <action application="bridge" data="sofia/gateway/profile/${sip_to_user}"/>
>     <condition field="${sip_h_X-Header-Name}" expression="Header Value">
>         <action application="respond" data="404"/>
>         <action application="hangup"/>
>     </condition>
> </condition>
>
> </extension>
>
> But the thing is that Freeswitch doesn't allow nested conditions.
>
> Any ideas on how I can handle this?
>
> Santiago Soares
> Fone: (41) 8488-0537