添加测试脚本:
文件路径:/usr/local/freeswitch/scripts/test1.py
文件内容:
import freeswitchdef fsapi(session,stream,env,args):stream.write("hello")freeswitch.consoleLog("info","test")
控制台测试
[email protected]> python test1 hello 2016-09-06 23:06:09.069753 [NOTICE] mod_python.c:212 Invoking py module: test1 2016-09-06 23:06:09.069753 [DEBUG] mod_python.c:283 Call python script 2016-09-06 23:06:09.069753 [INFO] switch_cpp.cpp:1360 test 2016-09-06 23:06:09.069753 [DEBUG] mod_python.c:286 Finished calling python script [email protected]>
参考
https://freeswitch.org/confluence/display/FREESWITCH/mod_python
