[Freeswitch-svn] [commit] r9052 - freeswitch/trunk/src/mod/languages/mod_python
Freeswitch SVN
anthm at freeswitch.org
Wed Jul 16 11:44:42 EDT 2008
Author: anthm
Date: Wed Jul 16 11:44:41 2008
New Revision: 9052
Modified:
freeswitch/trunk/src/mod/languages/mod_python/python_example.py
Log:
add more example
Modified: freeswitch/trunk/src/mod/languages/mod_python/python_example.py
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/python_example.py (original)
+++ freeswitch/trunk/src/mod/languages/mod_python/python_example.py Wed Jul 16 11:44:41 2008
@@ -59,3 +59,32 @@
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
+
+
+
+
More information about the Freeswitch-svn
mailing list