[OpenSIPS-Users] Blind call forwarding in OpenSIPS

Nayani Nikeshala nnikeshala at yahoo.com
Mon Sep 7 10:51:14 EST 2020


Hello,
I'm trying to do a simple blind call forwarding with the below script added into "main request routing logic". (123 dials 789 and 789 is forwarded to 456)

if(avp_db_load("$ru","$avp(s:callfwd)")){

$ru = $avp(s:callfwd);

xlog("forwarded to: $avp(s:callfwd)");

route(1);

exit;

}

My usr_preferences table is as below. 

opensips=> select * from usr_preferences;

 id | uuid | username | domain| attribute | type |         value          |   last_modified    

----+------+----------+--------+-----------+------+------------------------+---------------------

  1 |      | 789     |        | callfwd   |    0| sip:456 at xxxxxxxxxxx    |1900-01-01 00:00:01

(1 row)
opensips=>
I have added the avpops module as below. 
#AVPOPS module

loadmodule "avpops.so"

modparam("avpops","db_url","postgres://opensips:xxxxxxxx@localhost/opensips")
modparam("avpops","avp_table","usr_preferences")
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 "main request routing logic". 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200907/62a11bc2/attachment.html>


More information about the Users mailing list