<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p><br>
    </p>
    <p>the RPC commands usually target to change the data stored in
      Kamailio memory, like it is for location (kaamilio keeps the
      records in memory and use them from there, the database storage
      being only for ability to restore on restart -- well, a matter of
      db_mode parameter, to be accurate).</p>
    <p><br>
    </p>
    <p>If the records are used from database directly, there are no RPC
      commands, their management has to be done directly to database.
      This is the case for tables such as subscriber, dbaliases,
      speeddial.</p>
    <p><br>
    </p>
    <p>Also, note that in some cases, when records are loaded from
      databases and can be changed in memory via RPC, they are not
      stored back to database, you still need to do that -- for example,
      dispatcher module.</p>
    <p><br>
    </p>
    <p>Personally I do not think is useful to add such feature to
      Kamailio, it will add complexity and maintenance overhead (given
      that we support sql, no sql or different other backends like
      line-based text files), and C is not the most flexible/easiest
      language to work with databases. Probably is better to have an
      external HTTP API server for such needs, in the same fashion of:</p>
    <p><br>
    </p>
    <p>  * <a class="moz-txt-link-freetext" href="https://github.com/voipxswitch/kamailio-jsonrpc-client">https://github.com/voipxswitch/kamailio-jsonrpc-client</a></p>
    <p><br>
    </p>
    <p>In many cases, at least for subscriber, the table is extended
      with new columns for having a richer user profile, and used via
      load_credentials modparam or sqlops.<br>
    </p>
    <p><br>
    </p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 09.07.21 10:50, Surabhi Garg wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:TYCP286MB1393B781DCB4D48B9F3855A597189@TYCP286MB1393.JPNP286.PROD.OUTLOOK.COM">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        Hi Alex,</div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        <br>
      </div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        By subscriber management I mean, auth_db module which actually
        works on subscriber table to add or alter sip account for
        authentications.</div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        <span style="box-sizing:border-box; font-family:"Segoe
          UI",system-ui,"Apple Color Emoji","Segoe
          UI Emoji",sans-serif; font-size:14px"><a
href="https://kamailio.org/docs/modules/4.4.x/modules/auth_db.html#auth_db.f.auth_check"
title="https://kamailio.org/docs/modules/4.4.x/modules/auth_db.html#auth_db.f.auth_check"
            target="_blank" rel="noreferrer noopener" tabindex="-1"
            moz-do-not-send="true">Auth_db Module (kamailio.org)</a></span><br>
      </div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        <br>
      </div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        So, similar like usrloc module which you mentioned having
        JSONRPC commands to alter Location table. </div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        I am looking for JSONRPC Command for subscriber module as well.</div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        <br>
      </div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        <span style="color: rgb(0, 0, 0); font-family: Calibri, Arial,
          Helvetica, sans-serif; font-size: 12pt;">As far as my
          understanding, currently there is no JSONRPC command available
          for subscriber table.</span><br>
      </div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        So, if this is currently a known not offered feature /
        limitation shall we raise it as feature request if others also
        agree to its usefulness. </div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        What I'm seeking is more of an acknowledgment that this feature
        doesn't exist & have it's benefit. As I can see other
        community members either ends up directly interacting with DB
        for subscriber table provisioning. Maybe I can contribute on
        this too.<br>
      </div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        <br>
      </div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        <br>
      </div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        <br>
      </div>
      <div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0)">
          <br>
        </div>
        <div id="Signature">
          <div>
            <div id="divtagdefaultwrapper" dir="ltr"
              style="font-size:12pt; color:#000000;
              font-family:Calibri,Arial,Helvetica,sans-serif">
              <p style="margin-top: 0px; margin-bottom:
                0px;margin-top:0px; margin-bottom:0px; margin-top:0px;
                margin-bottom:0px">
                <span style="color:rgb(0,111,201)">Surabhi Garg</span></p>
              <p style="margin-top: 0px; margin-bottom:
                0px;margin-top:0px; margin-bottom:0px; margin-top:0px;
                margin-bottom:0px">
                <span style="color:rgb(0,111,201)">Mobile - 91 783 888
                  7523 | Skype - surabhi.garg9</span><br>
              </p>
            </div>
          </div>
        </div>
      </div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        <br>
      </div>
      <br>
      <div dir="ltr">
        <div style="font-family:Calibri,Helvetica,sans-serif;
          font-size:10pt; color:rgb(0,0,0)">
          <br>
        </div>
        <div>
          <div id="x_Signature">
            <div>
              <div id="x_divtagdefaultwrapper" dir="ltr"
                style="font-size:10pt; color:#000000;
                font-family:Calibri,Arial,Helvetica,sans-serif">
                <div>
                  <div><span style="font-family:Calibri; font-size:10pt"></span></div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div>
          <hr tabindex="-1" style="display:inline-block; width:98%">
          <div id="x_divRplyFwdMsg" dir="ltr"><font
              style="font-size:11pt" face="Calibri, sans-serif"
              color="#000000"><b>From:</b> sr-users
              <a class="moz-txt-link-rfc2396E" href="mailto:sr-users-bounces@lists.kamailio.org"><sr-users-bounces@lists.kamailio.org></a> on behalf of
              Alex Balashov <a class="moz-txt-link-rfc2396E" href="mailto:abalashov@evaristesys.com"><abalashov@evaristesys.com></a><br>
              <b>Sent:</b> 09 July 2021 01:27<br>
              <b>To:</b> Kamailio (SER) - Users Mailing List
              <a class="moz-txt-link-rfc2396E" href="mailto:sr-users@lists.kamailio.org"><sr-users@lists.kamailio.org></a><br>
              <b>Subject:</b> Re: [SR-Users] Subscriber Management using
              JSONRPC over HTTP</font>
            <div> </div>
          </div>
          <div dir="auto">I am not 100% sure what you mean by subscriber
            management, but if you mean what I think you mean, these
            might be the droids you’re looking for:
            <div><br>
            </div>
            <div><a
href="https://kamailio.org/docs/modules/5.5.x/modules/usrloc.html#idm771"
                moz-do-not-send="true">https://kamailio.org/docs/modules/5.5.x/modules/usrloc.html#idm771</a><br>
              <br>
              <div dir="ltr">—
                <div>Sent from mobile, with due apologies for brevity
                  and errors.</div>
              </div>
              <div dir="ltr"><br>
                <blockquote type="cite">On Jul 8, 2021, at 3:55 PM,
                  Surabhi Garg <a class="moz-txt-link-rfc2396E" href="mailto:surabhi.garg@outlook.com"><surabhi.garg@outlook.com></a> wrote:<br>
                  <br>
                </blockquote>
              </div>
              <blockquote type="cite">
                <div dir="ltr">
                  <div style=""><span
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">Hi Team,</span></div>
                  <div style=""><br>
                  </div>
                  <div style=""><span
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">Greetings!</span></div>
                  <div
                    style="font-family:Calibri,Arial,Helvetica,sans-serif;
                    font-size:12pt; color:rgb(0,0,0)">
                    <br>
                  </div>
                  <div style=""><span style="box-sizing:border-box;
                      font-family:"Segoe
                      UI",system-ui,"Apple Color
                      Emoji","Segoe UI Emoji",sans-serif;
                      font-size:14px">I was trying to use HTTP to do the
                      subscriber management (CRUD operations) & for
                      that I am using JSONRPC-S module (JSONRPC over
                      HTTP). But like other modules e.g. dispatcher,
                      location I am unable to find any RPC commands for
                      doing subscriber management (checked in auth_db)
                      module. So is there a way to achieve subscriber
                      management using JSONRPC over HTTP.</span><br>
                  </div>
                  <div style=""><span style="box-sizing:border-box;
                      font-family:"Segoe
                      UI",system-ui,"Apple Color
                      Emoji","Segoe UI Emoji",sans-serif;
                      font-size:14px"><br>
                    </span></div>
                  <div style=""><font face="Segoe UI, system-ui, Apple
                      Color Emoji, Segoe UI Emoji, sans-serif"><span
                        style="font-size:14px">Few HTTP examples which I
                        am using for dispatcher module are given below.
                        Similar commands I am looking for subscriber
                        management as well. </span></font></div>
                  <div style=""><font face="Segoe UI, system-ui, Apple
                      Color Emoji, Segoe UI Emoji, sans-serif"><span
                        style="font-size:14px"><br>
                      </span></font></div>
                  <div style="">
                    <p class="x_x_p1" style="margin-top: 0px;
                      margin-bottom: 0px;margin-top:0px;
                      margin-bottom:0px; margin-top:0px;
                      margin-bottom:0px; margin:0px; font:13px
                      "Helvetica Neue"">
                      <span style="background-color:rgb(255,255,0)">curl
                        <a class="moz-txt-link-freetext" href="http://localhost:8081/RPC">http://localhost:8081/RPC</a> -H "Content-Type:
                        application/json" -d "
                        {\"jsonrpc\":\"2.0\",\"method\":\"dispatcher.add\",
                        \"params\":[2, \<a class="moz-txt-link-rfc2396E" href="sip:127.0.0.1:5061\">"sip:127.0.0.1:5061\"</a>], \"id\":
                        \"1\"}"</span></p>
                    <br>
                  </div>
                  <div style="">
                    <p class="x_x_p1" style="margin-top: 0px;
                      margin-bottom: 0px;margin-top:0px;
                      margin-bottom:0px; margin-top:0px;
                      margin-bottom:0px; margin:0px; font:13px
                      "Helvetica Neue"">
                      <span style="background-color:rgb(255,255,0)">curl
                        <a class="moz-txt-link-freetext" href="http://localhost:8081/RPC">http://localhost:8081/RPC</a> -H "Content-Type:
                        application/json" -d "
                        {\"jsonrpc\":\"2.0\",\"method\":\"dispatcher.remove\”,
                        \"params\":[2, \<a class="moz-txt-link-rfc2396E" href="sip:127.0.0.1:5061\">"sip:127.0.0.1:5061\"</a>], \"id\":
                        \"1\"}"</span></p>
                    <br>
                  </div>
                  <div style=""><br>
                  </div>
                  <div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <div id="x_x_Signature">
                      <div>
                        <div id="x_x_divtagdefaultwrapper" dir="ltr"
                          style="font-size:12pt; color:#000000;
                          font-family:Calibri,Arial,Helvetica,sans-serif">
                          <p style="margin-top: 0px; margin-bottom:
                            0px;margin-top:0px; margin-bottom:0px;
                            margin-top:0px; margin-bottom:0px;
                            margin-top:0px; margin-bottom:0px">
                            <span style="color:rgb(0,111,201)">Surabhi
                              Garg</span></p>
                          <p style="margin-top: 0px; margin-bottom:
                            0px;margin-top:0px; margin-bottom:0px;
                            margin-top:0px; margin-bottom:0px;
                            margin-top:0px; margin-bottom:0px">
                            <span style="color:rgb(0,111,201)">Mobile -
                              91 783 888 7523 </span><br>
                          </p>
                        </div>
                      </div>
                    </div>
                  </div>
                  <span>__________________________________________________________</span><br>
                  <span>Kamailio - Users Mailing List - Non Commercial
                    Discussions</span><br>
                  <span> * <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a></span><br>
                  <span>Important: keep the mailing list in the
                    recipients, do not reply only to the sender!</span><br>
                  <span>Edit mailing list options or unsubscribe:</span><br>
                  <span> *
                    <a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></span><br>
                </div>
              </blockquote>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * <a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
  </body>
</html>