<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<tt>Hi,<br>
<br>
What version of OpenSIPS do you use ? And your experience is that
the avp_db_load fails ?<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 2020 online
<a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2020Distributed/">https://www.opensips.org/events/Summit-2020Distributed/</a></pre>
<div class="moz-cite-prefix">On 9/7/20 1:51 PM, Nayani Nikeshala via
Users wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1710887589.3041225.1599475874802@mail.yahoo.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div class="yahoo-style-wrap" style="font-family:Helvetica Neue,
Helvetica, Arial, sans-serif;font-size:16px;">
<div dir="ltr" data-setdir="false">Hello,</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">I'm trying to do a simple
blind call forwarding with the below script added into "<span>main
request routing logic". (123 dials 789 and 789 is forwarded
to 456)</span></div>
<div dir="ltr" data-setdir="false">
<div>
<p class="ydpcb692f43MsoNormal"
style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;background:white"><span
style="font-size:12.0pt;font-family:"Helvetica",sans-serif;mso-fareast-font-family:"Times
New Roman";color:black"><br>
</span><span style="font-size: 10pt; font-family:
Consolas;"><font style="background-color: inherit;"
color="#a46016">if(avp_db_load("$ru","$avp(s:callfwd)"))
{</font></span></p>
<p class="ydpcb692f43MsoNormal"
style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;background:white"><span
style="font-size: 10pt; font-family: Consolas;"><font
style="background-color: inherit;" color="#a46016">$ru
= $avp(s:callfwd);</font></span></p>
<p class="ydpcb692f43MsoNormal"
style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;background:white"><span
style="font-size: 10pt; font-family: Consolas;"><font
style="background-color: inherit;" color="#a46016">xlog("forwarded
to: $avp(s:callfwd)");</font></span></p>
<p class="ydpcb692f43MsoNormal"
style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;background:white"><span
style="font-size: 10pt; font-family: Consolas;"><font
style="background-color: inherit;" color="#a46016">route(1);</font></span></p>
<p class="ydpcb692f43MsoNormal"
style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;background:white"><span
style="font-size: 10pt; font-family: Consolas;"><font
style="background-color: inherit;" color="#a46016">exit;</font></span></p>
<p class="ydpcb692f43MsoNormal"
style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;background:white"><span
style="font-size: 10pt; font-family: Consolas;"><font
style="background-color: inherit;" color="#a46016">}</font></span></p>
</div>
</div>
<div dir="ltr" data-setdir="false">
<div><br>
</div>
<div dir="ltr" data-setdir="false">My usr_preferences table is
as below. </div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">
<p class="ydp5aa7ffcMsoNormal"><span
style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font
style="background-color: inherit;" color="#a46016">opensips=>
select * from usr_preferences;</font></span></p>
<p class="ydp5aa7ffcMsoNormal"><span
style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font
style="background-color: inherit;" color="#a46016"><span> </span>id
| uuid | username | domain
| attribute | type |<span> </span>value<span>
</span>|<span>
</span>last_modified<span> </span></font></span></p>
<p class="ydp5aa7ffcMsoNormal"><span
style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font
style="background-color: inherit;" color="#a46016">----+------+----------+--------+-----------+------+------------------------+---------------------</font></span></p>
<p class="ydp5aa7ffcMsoNormal"><span
style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font
style="background-color: inherit;" color="#a46016"><span>
</span>1 |<span> </span>| 789<span>
</span>|<span> </span>| callfwd<span> </span>|<span>
</span>0
| <a class="moz-txt-link-freetext" href="sip:456@xxxxxxxxxxx">sip:456@xxxxxxxxxxx</a><span> </span><span> </span>|
1900-01-01 00:00:01</font></span></p>
<p class="ydp5aa7ffcMsoNormal"><span
style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font
style="background-color: inherit;" color="#a46016">(1
row)</font></span></p>
<div><span
style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font
style="background-color: inherit;" color="#a46016">opensips=></font></span></div>
<div><span
style="font-size:10.0pt;line-height:107%;font-family:Consolas"><br>
</span></div>
<div dir="ltr" data-setdir="false"><span style="line-height:
107%; font-family: Consolas;"><font
style="background-color: inherit;" size="3">I have
added the avpops module as below. </font></span></div>
<div dir="ltr" data-setdir="false">
<p class="ydp53c62242MsoNormal"><span
style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font
style="background-color: inherit;" color="#a46016">#AVPOPS
module</font></span></p>
<p class="ydp53c62242MsoNormal"><span
style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font
style="background-color: inherit;" color="#a46016">loadmodule
"avpops.so"</font></span></p>
<p class="ydp53c62242MsoNormal"><span
style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font
style="background-color: inherit;" color="#a46016">modparam("avpops",
"db_url","postgres://opensips:xxxxxxxx@localhost/opensips")</font></span></p>
<div><span
style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font
style="background-color: inherit;" color="#a46016">modparam("avpops","avp_table","usr_preferences")</font></span></div>
</div>
</div>
<div dir="ltr" data-setdir="false">
<div dir="ltr" data-setdir="false"><span></span><br>
</div>
<div dir="ltr" data-setdir="false">Anyways, this script does
not do the call forwarding task. Anyone could help on this
please. Could there be a problem of the position that I
have added the script in <span><span style="color: rgb(0,
0, 0); font-family: "Helvetica Neue",
Helvetica, Arial, sans-serif; font-size: 16px;">"</span><span
style="color: rgb(0, 0, 0); font-family:
"Helvetica Neue", Helvetica, Arial,
sans-serif; font-size: 16px;">main request routing
logic". </span></span></div>
<div dir="ltr" data-setdir="false"><br>
</div>
<br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-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>