<html><head></head><body><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 color="#a46016" style="background-color: inherit;">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 color="#a46016" style="background-color: inherit;">$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 color="#a46016" style="background-color: inherit;">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 color="#a46016" style="background-color: inherit;">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 color="#a46016" style="background-color: inherit;">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 color="#a46016" style="background-color: inherit;">}</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 color="#a46016" style="background-color: inherit;">opensips=> select * from usr_preferences;</font></span></p>

<p class="ydp5aa7ffcMsoNormal"><span style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font color="#a46016" style="background-color: inherit;"><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 color="#a46016" style="background-color: inherit;">----+------+----------+--------+-----------+------+------------------------+---------------------</font></span></p>

<p class="ydp5aa7ffcMsoNormal"><span style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font color="#a46016" style="background-color: inherit;"><span>  </span>1 |<span>      </span>| 789<span>     
</span>|<span>        </span>| callfwd<span>   </span>|<span>    </span>0
| sip:456@xxxxxxxxxxx<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 color="#a46016" style="background-color: inherit;">(1 row)</font></span></p>

<div><span style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font color="#a46016" style="background-color: inherit;">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 size="3" style="background-color: inherit;">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 color="#a46016" style="background-color: inherit;">#AVPOPS module</font></span></p>

<p class="ydp53c62242MsoNormal"><span style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font color="#a46016" style="background-color: inherit;">loadmodule "avpops.so"</font></span></p>

<p class="ydp53c62242MsoNormal"><span style="font-size:10.0pt;line-height:107%;font-family:Consolas"><font color="#a46016" style="background-color: inherit;">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 color="#a46016" style="background-color: inherit;">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></body></html>