<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.gmaildefault
{mso-style-name:gmail_default;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Gordon,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The link instructions you gave do not say that no loading is required. It says that no *<b>other</b>* modules are required to be loaded *<b>before</b>* this one, meaning it has no dependencies. All modules must be loaded before they can
be used.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">You must still load the python module in order to use it:<o:p></o:p></p>
<p class="MsoNormal">loadmodule “python.so”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="color:black">Ben Newlin </span><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Users <users-bounces@lists.opensips.org> on behalf of Gordon Yeong <anexiole@gmail.com><br>
<b>Reply-To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Date: </b>Wednesday, May 13, 2020 at 9:10 AM<br>
<b>To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Subject: </b>Re: [OpenSIPS-Users] Can't seem to get python module to work<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099">Anyone know what's going on? <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099"><o:p> </o:p></span></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black">Gordon </span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, 12 May 2020 at 17:10, Gordon Yeong <<a href="mailto:anexiole@gmail.com">anexiole@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099">hi guys<br clear="all">
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099"> I managed to get opensips to work with the perl module.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099">I now need to port what I have to python 3.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099">I can't seem to start opensips 3.0 because I have the following error:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099"><br>
May 12 16:59:51 [47532] ERROR:core:set_mod_param_regex: no module matching python found<br>
May 12 16:59:51 [47532] Traceback (last included file at the bottom):<br>
May 12 16:59:51 [47532] 0. /opt/opensips/etc/opensips/opensips-Enum-Python.cfg<br>
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<br>
May 12 16:59:51 [47532]<br>
May 12 16:59:51 [47532] loadmodule "enum.so"<br>
May 12 16:59:51 [47532] modparam("python", "script_name", "/tmp/test.py")<br>
May 12 16:59:51 [47532] ^~<br>
May 12 16:59:51 [47532]<br>
May 12 16:59:51 [47532] ####### Routing Logic ########<br>
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?<br>
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?<br>
May 12 16:59:51 [47532] ERROR:core:parse_opensips_cfg: bad config file (3 errors)<br>
May 12 16:59:51 [47532] ERROR:core:main: failed to parse config file /opt/opensips/etc/opensips/opensips-Enum-Python.cfg<br>
May 12 16:59:51 [47532] NOTICE:core:main: Exiting....<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099">1) the first issue is "ERROR:core:set_mod_param_regex: no module matching python found".<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099"> I find this really weird because I referred to <a href="https://opensips.org/docs/modules/3.0.x/python.html" target="_blank">https://opensips.org/docs/modules/3.0.x/python.html</a> and
it says in </span><span style="font-family:Helvetica;color:black">1.2.1. that no loading is required.</span><span style="font-family:"Arial",sans-serif;color:#000099"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:Helvetica;color:black">2) Additionally, I am using the line "</span><span style="font-family:"Arial",sans-serif;color:#222222">modparam("python", "script_name", "/tmp/test.py")" to load my test python functions
as per the same documentation in section </span><span style="font-family:Helvetica;color:black">1.3.1</span><span class="gmaildefault"><span style="font-family:"Arial",sans-serif;color:#000099">.</span></span><span style="font-family:"Arial",sans-serif;color:#000099"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#222222"> 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". </span><span style="font-family:"Arial",sans-serif;color:#000099"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099">Any ideas? <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099">Thank you<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#000099"><o:p> </o:p></span></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:black">Regards,<br>
Gordon Yeong</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="gmaildefault"><span style="font-family:"Arial",sans-serif;color:#000099">perl, python3, elixir, rails, php = joy</span></span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</body>
</html>