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

Joel Serrano joel at gogii.net
Thu Mar 29 16:54:12 UTC 2018


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



More information about the FreeSWITCH-users mailing list