Hi Mike,

Using a single condition did the trick, thanks :-)
Based on Brian's explanation the example from http://wiki.freeswitch.org/wiki/Proxy_Media is buggy...

regards,
Rodrigo Telles

Michael Jerris wrote:
Actions are all run AFTER all conditions are parsed so the nated var is not set yet.  you can do a single condition in this case, and set nated for use elsewhere if you need it in the actions.

Mike

On Mar 26, 2009, at 10:27 AM, Rodrigo P. Telles wrote:

Hi Guys,

I'm trying to do some string matching against a created var and looks like I am doing something wrong but I can't find whats it.

I'm wrote an extension just for tests purposes on dialplan/default.xml:

<extension name="nat_detect" continue="true">
     <condition>
        <action application="set" data=""/>
     </condition>
     <condition field="${nated}" _expression_="1">
       <action application="log" data=""/>
       <action application="set" data=""/>
       <action application="set" data=""/>
       <anti-action application="log" data=""/>
     </condition>
</extension>

Using two SIP extensions (1000 and 1001) behind NAT and I expected too see "Action="" on the logs/console, but I'm seeing "Anti-Action="">
2009-03-26 11:02:57 [DEBUG] switch_core_state_machine.c:152 switch_core_standard_on_execute() sofia/internal/[email protected] Execute set(nated=${cond(${network_addr} != ${sip_contact_host} ? 1 : 0)})
2009-03-26 11:02:57 [DEBUG] switch_core_session.c:1286 switch_core_session_exec() sofia/internal/[email protected] Expanded String set(nated=1)
2009-03-26 11:02:57 [DEBUG] mod_dptools.c:711 set_function() sofia/internal/[email protected] SET [nated]=[1]
2009-03-26 11:02:57 [DEBUG] switch_core_state_machine.c:152 switch_core_standard_on_execute() sofia/internal/[email protected] Execute log(Anti-Action=""> 2009-03-26 11:02:57 [DEBUG] switch_core_session.c:1286 switch_core_session_exec() sofia/internal/[email protected] Expanded String log(Anti-Action=""> 2009-03-26 11:02:57 [DEBUG] mod_dptools.c:895 log_function() Anti-Action=""> 2009-03-26 11:02:57 [DEBUG] switch_core_state_machine.c:152 switch_core_standard_on_execute() sofia/internal/[email protected] Execute set(dialed_extension=1000)
....

I really appreciate any inputs.
I'm using FS 1.0.3 stable.

regards,
Rodrigo Telles


_______________________________________________
Freeswitch-users mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Reply via email to