<html>
<head>
<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>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks Bogdan again!</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I am using that function but somehow didn't work with avp_db_load("$rU",$avp(callfwd)).
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
With uuid it is all good!</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Bela<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Bogdan-Andrei Iancu <bogdan@opensips.org><br>
<b>Sent:</b> Wednesday, 6 April 2022 21:48<br>
<b>To:</b> Bela H <hobe69@hotmail.com>; OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Subject:</b> Re: [OpenSIPS-Users] How to use old "opensipsctl avp add" with opensips-cli?</font>
<div> </div>
</div>
<div><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="x_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="x_moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="x_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="x_moz-txt-link-freetext" href="https://opensips.org/training/OpenSIPS_eBootcamp_2022/">https://opensips.org/training/OpenSIPS_eBootcamp_2022/</a></pre>
<div class="x_moz-cite-prefix">On 4/6/22 11:48 AM, Bela H wrote:<br>
</div>
<blockquote type="cite">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif}
a:link, span.x_MsoHyperlink
{color:blue;
text-decoration:underline}
pre
{margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New"}
span.x_HTMLPreformattedChar
{font-family:"Courier New"}
.x_MsoChpDefault
{}
div.x_WordSection1
{}
-->
</style>
<div class="x_WordSection1">
<p class="x_MsoNormal"><span lang="EN-US">Hi Bogdan,</span></p>
<p class="x_MsoNormal"><span lang="EN-US"> </span></p>
<p class="x_MsoNormal"><span lang="EN-US">Great thanks for your quick answer.</span></p>
<p class="x_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 lang="EN-US" style="">😉</span><span lang="EN-US"></span></p>
<p class="x_MsoNormal"><span lang="EN-US"> </span></p>
<p class="x_MsoNormal">Cheers,</p>
<p class="x_MsoNormal">Bela</p>
<p class="x_MsoNormal"> </p>
<div style="border:none; border-top:solid
#E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="x_MsoNormal" style="border:none; padding:0cm"><b>From: </b><a href="mailto:bogdan@opensips.org">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">OpenSIPS users mailling list</a>;
<a href="mailto:hobe69@hotmail.com">Bela H</a><br>
<b>Subject: </b>Re: [OpenSIPS-Users] How to use old "opensipsctl avp add" with opensips-cli?</p>
</div>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal"><span style="">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></p>
<pre>Bogdan-Andrei Iancu</pre>
<pre> </pre>
<pre>OpenSIPS Founder and Developer</pre>
<pre> <a href="https://www.opensips-solutions.com">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/">https://opensips.org/training/OpenSIPS_eBootcamp_2022/</a></pre>
<div>
<p class="x_MsoNormal">On 4/5/22 11:31 PM, Bela H wrote:</p>
</div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black">Hello,</span></p>
</div>
<div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_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?
</span></p>
</div>
<div>
<p class="x_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></span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black">Cheers,<br>
Bela</span></p>
</div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<p class="x_MsoNormal"><br>
<br>
</p>
<pre>_______________________________________________</pre>
<pre>Users mailing list</pre>
<pre><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a></pre>
<pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></pre>
</blockquote>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal"> </p>
</div>
</blockquote>
<br>
</div>
</body>
</html>