]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak configs slightly to use the acl for rfc1918 check
authorBrian West <brian@freeswitch.org>
Thu, 27 Mar 2008 20:34:49 +0000 (20:34 +0000)
committerBrian West <brian@freeswitch.org>
Thu, 27 Mar 2008 20:34:49 +0000 (20:34 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7971 d0543943-73ff-0310-b7d9-9358b9ac24b2

conf/dialplan/default.xml
src/mod/applications/mod_commands/mod_commands.c

index 0fd2e71128bfa20acd3d5fbe47ca6f1e255ae5e9..69b3238ee821e1c7a1c8187c57d217ee4368f452 100644 (file)
@@ -40,8 +40,8 @@
 
     <extension name="global" continue="true">
       <condition field="${network_addr}" expression="^$" break="never">
-       <action application="set" data="use_profile=${cond(${is_lan_addr($${local_ip_v4})} == yes ? nat : default)}"/>
-       <anti-action application="set" data="use_profile=${cond(${is_lan_addr(${network_addr})} == yes ? nat : default)}"/>
+       <action application="set" data="use_profile=${cond(${acl($${local_ip_v4} rfc1918)} == true ? nat : default)}"/>
+       <anti-action application="set" data="use_profile=${cond(${acl(${network_addr} rfc1918)} == true ? nat : default)}"/>
       </condition>
       <!-- This will setup some variables if the user isn't authenticated.
           numbering_plan is required for the demo to function properly. 
index 872896bc942aa404dff517c56e2e53934f48dbec..297012dd20dfedc320ec665a2f1376c3d48714f0 100644 (file)
@@ -505,7 +505,7 @@ ok:
 
 SWITCH_STANDARD_API(lan_addr_function)
 {
-       stream->write_function(stream, "%s", switch_is_lan_addr(cmd) ? "yes" : "no");
+       stream->write_function(stream, "%s", switch_is_lan_addr(cmd) ? "true" : "false");
        return SWITCH_STATUS_SUCCESS;
 }