Freeswitch mod_python 没有名为 freeswitch 的模块

问题描述 投票:0回答:2

我使用 this 链接在 Debian 8 中安装了 Freeswitch 1.6。安装最新版本分支部分。

使用 fs_cli 启用模块 python:

>module_exists mod_python                                                                                              
true

症状

当我执行 Python 脚本时,我得到:

    2016-08-05 05:49:23.875318 [ERR] mod_python.c:231 Error importing module
    2016-08-05 05:49:23.875318 [ERR] mod_python.c:164 Python Error by calling script "fax": <type 'exceptions.ImportError'>    
    Message: No module named freeswitch    
    Exception: None    
    Traceback (most recent call last)
File: "/usr/share/freeswitch/scripts/fax.py", line 1, in <module>

使用文档:

故障排除:

  1. 这个相同的脚本可以与其他 Freeswitch 盒子配合使用。

  2. 正确移动文件:

    ls -al /usr/local/lib/python2.7/site-packages/
    freeswitch.py

  3. 脚本fax.py内容是这里

  4. 重启Freeswitch

  5. 脚本freeswitch.py位置

    • /usr/local/lib/python3.4/dist-packages/freeswitch.py
    • /usr/local/lib/python2.7/site-packages/freeswitch.py
    • /usr/share/pyshared/freeswitch.py
python freeswitch
2个回答
3
投票

我将

freeswitch.py
复制到
/usr/share/freeswitch/scripts/
这解决了问题。


0
投票

您只需将

freeswitch.py
复制到
.../freeswitch/scripts/

© www.soinside.com 2019 - 2024. All rights reserved.