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

Callum Guy callum.guy at x-on.co.uk
Wed May 13 07:15:58 EST 2020


Do you have the module loaded? Have you
installed opensips-python-module.x86_64? Confirm in your module path that
it exists!

loadmodule "python.so"

On Wed, 13 May 2020 at 03:18, Gordon Yeong <anexiole at gmail.com> wrote:

> Anyone know what's going on?
>
> Gordon
>
>
> On Tue, 12 May 2020 at 17:10, Gordon Yeong <anexiole at gmail.com> wrote:
>
>> 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
>>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

-- 


 <https://www.x-on.co.uk/service/surgery-connect/coronavirus.htm>


*0333 
332 0000  |  x-on.co.uk <https://www.x-on.co.uk>  |   ** 
<https://www.linkedin.com/company/x-on>   <https://www.facebook.com/XonTel> 
  <https://twitter.com/xonuk> **  |  Coronavirus 
<https://www.x-on.co.uk/service/surgery-connect/coronavirus.htm>*


THE 
ITSPA AWARDS 2020 <http://www.itspa.org.uk/itspa-awards> AND Best ITSP - 
Mid Market, Best Software and Best Vertical Solution are trade marks of the 
Internet Telephony Services Providers' Association, used under licence.


X-on
is a trading name of Storacall Technology Ltd a limited company 
registered in
England and Wales.

Registered Office : Avaland House, 110 
London Road, Apsley, Hemel Hempstead,
Herts, HP3 9SD. Company Registration 
No. 2578478.

The information in this e-mail is confidential and for use by 
the addressee(s)
only. If you are not the intended recipient, please notify 
X-on immediately on +44(0)333 332 0000 and delete the
message from your 
computer. If you are not a named addressee you must not use,
disclose, 
disseminate, distribute, copy, print or reply to this email. Views
or 
opinions expressed by an individual
within this email may not necessarily

reflect the views of X-on or its associated companies. Although X-on 
routinely
screens for viruses, addressees should scan this email and any 
attachments
for
viruses. X-on makes no representation or warranty as to the 
absence of viruses
in this email or any attachments.










-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200513/2ccd99bc/attachment-0001.html>


More information about the Users mailing list