need help to run python script with mod_python
hi i user python_example.py script to test with freeswitch https://gitlab.k-net.fr/shimaore/freeswitch/blob/c6be531b4b6c38b69274057b19d... i installed freeswitch-python and check the scripts folder is in : [root@localhost site-packages]# fs_cli -x 'global_getvar'|grep script script_dir=/usr/share/freeswitch/scripts and the freeswitch-python package: [root@localhost site-packages]# rpm -ql freeswitch-python /etc/freeswitch/autoload_configs /etc/freeswitch/autoload_configs/python.conf.xml /usr/lib/python2.7/site-packages/freeswitch.py /usr/lib/python2.7/site-packages/freeswitch.pyc /usr/lib/python2.7/site-packages/freeswitch.pyo /usr/lib64/freeswitch/mod/mod_python.so /usr/lib64/python2.7/site-packages/ESL.py /usr/lib64/python2.7/site-packages/ESL.pyc /usr/lib64/python2.7/site-packages/ESL.pyo /usr/lib64/python2.7/site-packages/_ESL.so where do i place the python-example.py script for freeswitch working properly Thank you
Put the script in: /usr/share/freeswitch/scripts/python_example.py Then call it from the dialplan without the extension (.py) For example: <action application="python" data="python_example"/> You can also place it wherever you want and use the full path as long as the user you are running freeswitch with has the correct permissions to access it. On Thu, Mar 29, 2018 at 8:40 AM, Do Nguyen Ha <donguyenha@gmail.com> wrote:
hi
i user python_example.py script to test with freeswitch https://gitlab.k-net.fr/shimaore/freeswitch/blob/c6be531b4b6c38b69274057b19d...
i installed freeswitch-python and check the scripts folder is in : [root@localhost site-packages]# fs_cli -x 'global_getvar'|grep script script_dir=/usr/share/freeswitch/scripts
and the freeswitch-python package: [root@localhost site-packages]# rpm -ql freeswitch-python /etc/freeswitch/autoload_configs /etc/freeswitch/autoload_configs/python.conf.xml /usr/lib/python2.7/site-packages/freeswitch.py /usr/lib/python2.7/site-packages/freeswitch.pyc /usr/lib/python2.7/site-packages/freeswitch.pyo /usr/lib64/freeswitch/mod/mod_python.so /usr/lib64/python2.7/site-packages/ESL.py /usr/lib64/python2.7/site-packages/ESL.pyc /usr/lib64/python2.7/site-packages/ESL.pyo /usr/lib64/python2.7/site-packages/_ESL.so
where do i place the python-example.py script for freeswitch working properly
Thank you
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
yeah it is working :) thank you On Thu, Mar 29, 2018 at 11:54 PM, Joel Serrano <joel@gogii.net> wrote:
Put the script in:
/usr/share/freeswitch/scripts/python_example.py
Then call it from the dialplan without the extension (.py)
For example:
<action application="python" data="python_example"/>
You can also place it wherever you want and use the full path as long as the user you are running freeswitch with has the correct permissions to access it.
On Thu, Mar 29, 2018 at 8:40 AM, Do Nguyen Ha <donguyenha@gmail.com> wrote:
hi
i user python_example.py script to test with freeswitch https://gitlab.k-net.fr/shimaore/freeswitch/blob/ c6be531b4b6c38b69274057b19d73c7b15a07b14/src/mod/languages/ mod_python/python_example.py
i installed freeswitch-python and check the scripts folder is in : [root@localhost site-packages]# fs_cli -x 'global_getvar'|grep script script_dir=/usr/share/freeswitch/scripts
and the freeswitch-python package: [root@localhost site-packages]# rpm -ql freeswitch-python /etc/freeswitch/autoload_configs /etc/freeswitch/autoload_configs/python.conf.xml /usr/lib/python2.7/site-packages/freeswitch.py /usr/lib/python2.7/site-packages/freeswitch.pyc /usr/lib/python2.7/site-packages/freeswitch.pyo /usr/lib64/freeswitch/mod/mod_python.so /usr/lib64/python2.7/site-packages/ESL.py /usr/lib64/python2.7/site-packages/ESL.pyc /usr/lib64/python2.7/site-packages/ESL.pyo /usr/lib64/python2.7/site-packages/_ESL.so
where do i place the python-example.py script for freeswitch working properly
Thank you
____________________________________________________________
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (2)
-
Do Nguyen Ha
-
Joel Serrano