<div dir="ltr">Hello<div><br></div><div>Could somebody please point me to where I should look for the clue ?</div><div><br></div><div>Thanks</div><div>Maciej</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">pon., 30 lis 2020 o 15:51 Maciej Bylica <<a href="mailto:mbgatherer@gmail.com">mbgatherer@gmail.com</a>> napisał(a):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">





<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">Hello</p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;min-height:14px"><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">I am struggling with OpenSIPS-CP 8.3.0 (.zip source) configuration on Centos 8.2</p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">Opensips 3.1 uses port 8000 to interop with opensips-cp, but there are no tcpdump packets on that port.</p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">It turned out that i am getting following errors on php level:</p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;min-height:14px"><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">[30-Nov-2020 14:13:54 UTC] PHP Warning:<span>  </span>Creating default object from empty value in /var/www/html/opensips-cp/config/tools/system/drouting/local.inc.php on line 24</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">[30-Nov-2020 14:13:54 UTC] PHP Stack trace:</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">[30-Nov-2020 14:13:54 UTC] PHP <span>  </span>1. {main}() /var/www/html/opensips-cp/web/tools/system/drouting/apply_changes.php:0</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">[30-Nov-2020 14:13:54 UTC] PHP <span>  </span>2. require() /var/www/html/opensips-cp/web/tools/system/drouting/apply_changes.php:25</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">[30-Nov-2020 14:13:54 UTC] PHP Error:<span>  </span>Call to undefined function json_encode() in /var/www/html/opensips-cp/web/common/mi_comm.php on line 31</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">[30-Nov-2020 14:13:54 UTC] PHP Stack trace:</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">[30-Nov-2020 14:13:54 UTC] PHP <span>  </span>1. {main}() /var/www/html/opensips-cp/web/tools/system/drouting/apply_changes.php:0</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">[30-Nov-2020 14:13:54 UTC] PHP <span>  </span>2. mi_command($command = 'dr_reload', $params_array = NULL, $mi_url = 'json:<a href="http://127.0.0.1:8000/JSON" target="_blank">127.0.0.1:8000/JSON</a>', $errors = NULL) /var/www/html/opensips-cp/web/tools/system/drouting/apply_changes.php:43</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">[30-Nov-2020 14:13:54 UTC] PHP <span>  </span>3. write2json($command = 'dr_reload', $params_array = NULL, $json_url = '<a href="http://127.0.0.1:8000/JSON" target="_blank">127.0.0.1:8000/JSON</a>', $errors = NULL) /var/www/html/opensips-cp/web/common/mi_comm.php:87</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">[30-Nov-2020 14:13:54 UTC] PHP Fatal error:<span>  </span>Uncaught Error: Call to undefined function json_encode() in /var/www/html/opensips-cp/web/common/mi_comm.php:31</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">Stack trace:</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">#0 /var/www/html/opensips-cp/web/common/mi_comm.php(87): write2json('dr_reload', NULL, '<a href="http://127.0.0.1:8000/..." target="_blank">127.0.0.1:8000/...</a>', NULL)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">#1 /var/www/html/opensips-cp/web/tools/system/drouting/apply_changes.php(43): mi_command('dr_reload', NULL, 'json:127.0.0.1:...', NULL)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">#2 {main}</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><span>  </span>thrown in /var/www/html/opensips-cp/web/common/mi_comm.php on line 31</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;min-height:14px"><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">I followed installation&configuration document located at <a href="http://controlpanel.opensips.org/documentation.php" target="_blank">http://controlpanel.opensips.org/documentation.php</a>.</p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;min-height:14px"><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">Here is my </span><span style="font-variant-ligatures:no-common-ligatures">boxes.global.inc.php </span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">config:</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(180,36,25)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(193,101,28)">$</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(46,174,187)">boxes</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(200,20,201)">[</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(193,101,28)">$</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(46,174,187)">box_id</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(200,20,201)">][</span><span style="font-variant-ligatures:no-common-ligatures">'mi'</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(200,20,201)">][</span><span style="font-variant-ligatures:no-common-ligatures">'conn'</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(200,20,201)">]</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(193,101,28)">=</span><span style="font-variant-ligatures:no-common-ligatures">"json:<a href="http://127.0.0.1:8000/JSON" target="_blank">127.0.0.1:8000/JSON</a>"</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">;</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">but i also tried with</p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(64,11,217)"><span style="font-variant-ligatures:no-common-ligatures">$boxes[$box_id]['mi']['conn']="json:<a href="http://127.0.0.1:8000/mi" target="_blank">127.0.0.1:8000/mi</a>";</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">with the same effect.</p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;min-height:14px"><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">Opensips (compiled from the sources) has got following modules up and running:</p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;min-height:14px"><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(64,11,217)"><span style="font-variant-ligatures:no-common-ligatures">####HTTP</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">loadmodule "httpd.so"</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">modparam("httpd", "port", 8000)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(64,11,217)"><span style="font-variant-ligatures:no-common-ligatures">###JSON</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">loadmodule "</span><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(224,228,9)">json</span><span style="font-variant-ligatures:no-common-ligatures">.so"</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(64,11,217)"><span style="font-variant-ligatures:no-common-ligatures">###MI_HTTP</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">loadmodule "mi_http.so"</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;min-height:14px"><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">Could you please point me where the problem might be located ?</p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica"><br></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">Thanks</p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">Maciej</p></div>
</blockquote></div>