<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="monospace">Hi Bela,<br>
      <br>
      If you should put the A number in UUID or user+domain columns
      depends 100% on how you use the avp_db_load() from script, mainly
      what is that first param - an uuid or user. See
<a class="moz-txt-link-freetext" href="https://opensips.org/html/docs/modules/3.2.x/avpops.html#func_avp_db_load">https://opensips.org/html/docs/modules/3.2.x/avpops.html#func_avp_db_load</a>,
      the "source" param<br>
      <br>
      Regards,<br>
    </font>
    <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 eBootcamp 23rd May - 3rd June 2022
  <a class="moz-txt-link-freetext" href="https://opensips.org/training/OpenSIPS_eBootcamp_2022/">https://opensips.org/training/OpenSIPS_eBootcamp_2022/</a></pre>
    <div class="moz-cite-prefix">On 4/6/22 11:48 AM, Bela H wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:SY4P282MB22529270FD7EC6BBDCDA10D8C0E79@SY4P282MB2252.AUSP282.PROD.OUTLOOK.COM">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@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;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}.MsoChpDefault
        {mso-style-type:export-only;}div.WordSection1
        {page:WordSection1;}</style>
      <div class="WordSection1">
        <p class="MsoNormal"><span lang="EN-US">Hi Bogdan,<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">Great thanks for your
            quick answer.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">I got that workaround as
            well, however that would have been my next question what you
            already answered: using the A number in uuid field instead
            of  username
          </span><span style="font-family:"Segoe UI
            Emoji",sans-serif" lang="EN-US">😉</span><span
            lang="EN-US"><o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal">Cheers,</p>
        <p class="MsoNormal">Bela</p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div
          style="mso-element:para-border-div;border:none;border-top:solid
          #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
          <p class="MsoNormal" style="border:none;padding:0cm"><b>From:
            </b><a href="mailto:bogdan@opensips.org"
              moz-do-not-send="true">Bogdan-Andrei Iancu</a><br>
            <b>Sent: </b>Wednesday, 6 April 2022 18:25<br>
            <b>To: </b><a href="mailto:users@lists.opensips.org"
              moz-do-not-send="true">OpenSIPS users mailling list</a>;
            <a href="mailto:hobe69@hotmail.com" moz-do-not-send="true">Bela
              H</a><br>
            <b>Subject: </b>Re: [OpenSIPS-Users] How to use old
            "opensipsctl avp add" with opensips-cli?</p>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span style="font-family:"Courier
            New"">Hi Bela,<br>
            <br>
            The opensips-cli does not offer anymore the pure DB oriented
            ops (like the opensipsctl did). The actually
            <i>opensipsctl avp add A_number callfwd 0 C_number</i>
            translates into the query:<br>
            <br>
            INSERT INTO  usr_preferences<br>
            ( uuid, username, domain, attribute, type, value,
            last_modified)<br>
            VALUES<br>
            ('A_number','','','callfwd', 0,'C_number',NOW());<br>
            <br>
            Regards,<br>
            <br>
          </span><o:p></o:p></p>
        <pre>Bogdan-Andrei Iancu</pre>
        <pre><o:p> </o:p></pre>
        <pre>OpenSIPS Founder and Developer</pre>
        <pre>  <a href="https://www.opensips-solutions.com" moz-do-not-send="true">https://www.opensips-solutions.com</a></pre>
        <pre>OpenSIPS eBootcamp 23rd May - 3rd June 2022</pre>
        <pre>  <a href="https://opensips.org/training/OpenSIPS_eBootcamp_2022/" moz-do-not-send="true">https://opensips.org/training/OpenSIPS_eBootcamp_2022/</a></pre>
        <div>
          <p class="MsoNormal">On 4/5/22 11:31 PM, Bela H wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <div>
            <p class="MsoNormal"><span
                style="font-size:12.0pt;color:black">Hello,<o:p></o:p></span></p>
          </div>
          <div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:12.0pt;color:black">I want to set up
                  a call forwarding and followed the instructions from
                  the "Building telephony systems with OpenSIPS".
                  However, this is a little bit outdated, the old
                  opensipsctl was replaced by opensips-cli. How can I
                  add an avp data into a usr_preferences table from
                  opensips-cli?
                  <o:p></o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:12.0pt;color:black">This was the old
                  format:
                  <i>opensipsctl avp add A_number callfwd 0 C_number</i><o:p></o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
            </div>
            <div>
              <p class="MsoNormal"><span
                  style="font-size:12.0pt;color:black">Cheers,<br>
                  Bela<o:p></o:p></span></p>
            </div>
            <p class="MsoNormal"><span
                style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
          </div>
          <p class="MsoNormal"><br>
            <br>
            <o:p></o:p></p>
          <pre>_______________________________________________</pre>
          <pre>Users mailing list</pre>
          <pre><a href="mailto:Users@lists.opensips.org" moz-do-not-send="true">Users@lists.opensips.org</a></pre>
          <pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></pre>
        </blockquote>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>