[Freeswitch-users] Trying to load xml using mod_python3
adrian at a2es.co.uk
Sat Nov 12 20:50:51 UTC 2022
I have been stuck on this for a few days now and need some help.
I understand that the "params" parameter passed to my xml_fetch(params)
function should contain a switch event but I never get anything else but
params being a NoneType (i.e. not set). The function is being called
but I have no idea of what xml is being requested.
Can anyone give me any leads as to how I can load configuration using
In autoload_configs/python.conf.xml I have:
<configuration name="python.conf" description="PYTHON Configuration">
<param name="xml-handler-script" value="ahf1"/>
In ahf1.py I have:
# 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.
if not params:
consoleLog("info", 'ahf: No params\n')
purpose = Event.getHeader(params, 'purpose')
profile = Event.getHeader(params, 'profile')
key = Event.getHeader(params, 'key')
consoleLog("info", 'ahfp1: ' + purpose + '\n')
consoleLog("info", 'ahfp2: ' + profile + '\n')
consoleLog("info", 'ahfp3: ' + key + '\n')
Many thanks & kind regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FreeSWITCH-users