[Freeswitch-users] need help to run python script with mod_python

Do Nguyen Ha donguyenha at gmail.com
Sat Mar 31 02:28:35 UTC 2018


yeah it is working :)

thank you

On Thu, Mar 29, 2018 at 11:54 PM, Joel Serrano <joel at 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 at 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 at localhost site-packages]# fs_cli -x 'global_getvar'|grep script
> > script_dir=/usr/share/freeswitch/scripts
> >
> > and the freeswitch-python package:
> > [root at 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 at 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 at 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 at 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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180331/b3efa8c8/attachment-0001.html>


More information about the FreeSWITCH-users mailing list