]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add more example
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 16 Jul 2008 15:44:41 +0000 (15:44 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 16 Jul 2008 15:44:41 +0000 (15:44 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9052 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/languages/mod_python/python_example.py

index 49f260dc2f93e051151d42895225d267561e3522..a4f059a4ab2b0b29e16d50f88eb1c654995053c8 100644 (file)
@@ -59,3 +59,32 @@ def fsapi(session, stream, env, args):
 def runtime(args):
 
        print args + "\n"
+
+# BIND TO AN XML LOOKUP
+#
+# default name for binding to an XML lookup is "xml_fetch" it can be overridden with <modname>::<function>
+# params a switch_event with all the relevant data about what is being searched for in the XML registry.
+#
+def xml_fetch(params):
+
+       xml = '''
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="freeswitch/xml">
+  <section name="dialplan" description="RE Dial Plan For FreeSWITCH">
+    <context name="default">
+      <extension name="generated">
+        <condition>
+         <action application="answer"/>
+         <action application="playback" data="${hold_music}"/>
+        </condition>
+      </extension>
+    </context>
+  </section>
+</document>
+'''
+
+       return xml
+
+
+
+