[OpenSIPS-Users] Can't seem to get python module to work

Gordon Yeong anexiole at gmail.com
Tue May 12 07:10:58 EST 2020


hi guys
 I managed to get opensips to work with the perl module.
I now need to port what I have to python 3.


I can't seem to start opensips 3.0 because I have the following error:


May 12 16:59:51 [47532] ERROR:core:set_mod_param_regex: no module matching
python found
May 12 16:59:51 [47532] Traceback (last included file at the bottom):
May 12 16:59:51 [47532]  0.
/opt/opensips/etc/opensips/opensips-Enum-Python.cfg
May 12 16:59:51 [47532] CRITICAL:core:yyerror: parse error in
/opt/opensips/etc/opensips/opensips-Enum-Python.cfg:137:20-21: Parameter
<script_name> not found in module <python> - can't set
May 12 16:59:51 [47532]
May 12 16:59:51 [47532] loadmodule "enum.so"
May 12 16:59:51 [47532] modparam("python", "script_name", "/tmp/test.py")
May 12 16:59:51 [47532] ^~
May 12 16:59:51 [47532]
May 12 16:59:51 [47532] ####### Routing Logic ########
May 12 16:59:51 [47532] CRITICAL:core:yyerror: parse error in
/opt/opensips/etc/opensips/opensips-Enum-Python.cfg:158:36-37: unknown
command <python_exec>, missing loadmodule?
May 12 16:59:51 [47532] CRITICAL:core:yyerror: parse error in
/opt/opensips/etc/opensips/opensips-Enum-Python.cfg:159:54-55: unknown
command <python_exec>, missing loadmodule?
May 12 16:59:51 [47532] ERROR:core:parse_opensips_cfg: bad config file (3
errors)
May 12 16:59:51 [47532] ERROR:core:main: failed to parse config file
/opt/opensips/etc/opensips/opensips-Enum-Python.cfg
May 12 16:59:51 [47532] NOTICE:core:main: Exiting....

1) the first issue is "ERROR:core:set_mod_param_regex: no module matching
python found".
    I find this really weird because I referred to
https://opensips.org/docs/modules/3.0.x/python.html and it says in 1.2.1.
that no loading is required.

2) Additionally, I am using the  line "modparam("python", "script_name",
"/tmp/test.py")" to load my test python functions as per the same
documentation in section 1.3.1.
    Yet, it errors out, "CRITICAL:core:yyerror: parse error in
/opt/opensips/etc/opensips/opensips-Enum-Python.cfg:137:20-21: Parameter
<script_name> not found in module <python> - can't set".

Any ideas?

Thank you


Regards,
Gordon Yeong
perl, python3, elixir, rails, php = joy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200512/4f03cec1/attachment.html>


More information about the Users mailing list