]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update docs
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 9 Jan 2012 20:32:37 +0000 (14:32 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 9 Jan 2012 20:32:37 +0000 (14:32 -0600)
conf/autoload_configs/httapi.conf.xml
src/mod/applications/mod_httapi/mod_httapi.c
src/mod/applications/mod_httapi/mod_httapi_doc.txt

index dfd7d692fb4b99e19a87108446e1f3664491ee98..c2fe584a02d9eda8ba21ca75600ce40da31f470b 100644 (file)
        <!-- <permission name="all" value="true"/> -->
        <!--<permission name="none" value="true"/> -->
        <permission name="set-params" value="true"/>
-       <permission name="set-vars" value="false"/>
+       <permission name="set-vars" value="false">
+         <!-- default to "deny" or "allow" -->
+         <!-- type attr can be "deny" or "allow" nothing defaults to opposite of the list default so allow in this case -->
+         <!-- 
+         <variable-list default="deny">
+           <variable name="caller_id_name"/>
+           <variable name="hangup"/> 
+         </variable-list>
+         -->
+       </permission>
+       <permission name="get-vars" value="false">
+         <!-- default to "deny" or "allow" -->
+         <!-- type attr can be "deny" or "allow" nothing defaults to opposite of the list default so allow in this case -->
+         <!-- 
+         <variable-list default="deny">
+           <variable name="caller_id_name"/>
+           <variable name="hangup"/> 
+         </variable-list>
+         -->
+       </permission>
        <permission name="extended-data" value="false"/>
        <permission name="execute-apps" value="true">
          <!-- default to "deny" or "allow" -->
            <application name="hangup"/>
          </application-list>
        </permission>
-       <permission name="expand-vars-in-tag-body" value="false"/>
+       <permission name="expand-vars-in-tag-body" value="false">
+         <!-- default to "deny" or "allow" -->
+         <!-- type attr can be "deny" or "allow" nothing defaults to opposite of the list default so allow in this case -->
+         <!-- 
+         <variable-list default="deny">
+           <variable name="caller_id_name"/>
+           <variable name="hangup"/> 
+         </variable-list>
+
+         <api-list default="deny">
+           <api name="expr"/>
+           <api name="lua"/> 
+         </api-list>
+         -->
+       </permission>
        <permission name="dial" value="true"/>
        <permission name="dial-set-context" value="false"/>
        <permission name="dial-set-dialplan" value="false"/>
index 5449cb5e0d9ec6a2ae99130c2f11572d1118b4d8..42a05e326259f75d22a8ac484f44ef0f0506eefb 100644 (file)
@@ -999,7 +999,7 @@ static switch_status_t parse_xml(client_t *client)
                                                        }
                                                        switch_event_add_header_string(client->params, SWITCH_STACK_BOTTOM, tag->name, val);
                                                }
-                                               tag = tag->sibling;
+                                               tag = tag->ordered;
                                        }
                                }
                        }
@@ -1014,6 +1014,8 @@ static switch_status_t parse_xml(client_t *client)
                                                        if (zstr(val)) {
                                                                val = NULL;
                                                        }
+                                                       printf("WTF [%s][%s]\n", tag->name, val);
+
                                                        if (client->profile->perms.set_vars && 
                                                                (!client->profile->var_params.set_var_list || 
                                                                 switch_event_check_permission_list(client->profile->var_params.set_var_list, tag->name))) {
@@ -1022,7 +1024,7 @@ static switch_status_t parse_xml(client_t *client)
                                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "variable %s permission denied!\n", tag->name);
                                                        }
                                                }
-                                               tag = tag->sibling;
+                                               tag = tag->ordered;
                                        }
                                }
                        }
index c8121379bc79c3706d88e9cf98e04b2dc69bb596..cb5463dca437f15048ba851728bd67893c40db95 100644 (file)
@@ -18,10 +18,10 @@ The format is roughly as described below (We could use a DTD maybe).
 
 <document type="xml/freeswitch-httapi">
   <params>
-    <param name="" value=""/>
+   <someparam>someval</someparam>
   </params>
   <variables>
-    <variable name="" value=""/>
+   <somevar>someval</somevar>
   </variables>
   <work>
   <...>