<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Aqs,<br>
      <br>
      Maybe there is an error in the boxes.global.inc.php - be sure the
      box has and 'mi' connector and the indexing of the boxes is
      correct.<br>
      <br>
      Just to be sure, do an update to the latest 8.2.4 code from git.<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit 2019
  <a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2019Amsterdam/">https://www.opensips.org/events/Summit-2019Amsterdam/</a>
</pre>
    <div class="moz-cite-prefix">On 01/25/2019 10:36 PM, Aqs Younas
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAGVOjVUVSguutkO3gKtXFaVz7RsjBeROFHgEdiAc1mZ7JrnobQ@mail.gmail.com">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">
                <div dir="ltr">Greetings list,
                  <div><br>
                  </div>
                  <div>I am trying to execute mi commands from
                    opensips-cp but looks like opensips-cp is unable to
                    find the json URL and sending me the below error. </div>
                  <div><br>
                  </div>
                  <div><i
style="color:rgb(0,0,0);font-family:Montserrat,sans-serif;font-size:13px;background-color:rgb(233,236,239)">16:06:52</i><span
style="color:rgb(0,0,0);font-family:Montserrat,sans-serif;font-size:13px;background-color:rgb(233,236,239)">  |  </span><b
style="color:rgb(0,0,0);font-family:Montserrat,sans-serif;font-size:13px;background-color:rgb(233,236,239)">uptime</b><span
style="color:rgb(0,0,0);font-family:Montserrat,sans-serif;font-size:13px;background-color:rgb(233,236,239)">  |  </span><br
style="color:rgb(0,0,0);font-family:Montserrat,sans-serif;font-size:13px;background-color:rgb(233,236,239)">
                    <hr
style="color:rgb(0,0,0);font-family:Montserrat,sans-serif;font-size:13px;background-color:rgb(233,236,239)"
                      width="100%">
                    <pre style="color:rgb(0,0,0);font-size:13px;background-color:rgb(233,236,239)"><font color="red">Unknwon/Unsupported type[] for MI URL <></font></pre>
                  </div>
                  <div><br>
                  </div>
                  <div>By looking at the below snippet of mi.php file, I
                    see </div>
                  <div><br>
                  </div>
                  <div>
                    <div>if ($_GET['action']=="change_box" &&
                      !empty($_POST['box_val'])) {</div>
                    <div>        $current_box=$_POST['box_val'];</div>
                    <div>       
                      $_SESSION['mi_current_box']=$current_box ;</div>
                    <div>} else if (!empty($_SESSION['mi_current_box']))
                      {</div>
                    <div>       
                      $current_box=$_SESSION['mi_current_box'];</div>
                    <div>} else {</div>
                    <div>        <b>$current_box="";</b></div>
                    <div>}</div>
                  </div>
                  <div><br>
                  </div>
                  <div>Somehow variable current_box is being populated
                    as empty. </div>
                  <div><br>
                  </div>
                  <div>My boxes.global.inc.php is configured like below.</div>
                  <div> </div>
                  <div>
                    <div>$box_id=0;</div>
                    <div>//  MI connector (via JSON backend): 
                       json:host:port/json</div>
                    <div>$boxes[$box_id]['mi']['conn']="json:<a
                        href="http://127.0.0.1:8888/json"
                        moz-do-not-send="true">127.0.0.1:8888/json</a>";</div>
                  </div>
                  <div><br>
                  </div>
                  <div>And i am able to use mi commands from the
                    terminal. </div>
                  <div><br>
                  </div>
                  <div>
                    <div>root@opensips:~# curl <a
                        href="http://127.0.0.1:8888/json/uptime"
                        moz-do-not-send="true">http://127.0.0.1:8888/json/uptime</a></div>
                    <div>{"Now": "Fri Jan 25 16:32:45 2019", "Up since":
                      "Fri Jan 25 16:21:57 2019", "Up time": "648
                      [sec]"}root@opensips:~#</div>
                  </div>
                  <div><br>
                  </div>
                  <div>I am at lost where else i need to define my
                    server json URL. </div>
                  <div><br>
                  </div>
                  <div>Any help is much appreciated. </div>
                  <div><br>
                  </div>
                  <div>Thanks. </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>