Hi,

What version of OpenSIPS do you use ? And your experience is that the avp_db_load fails ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2020 online
  https://www.opensips.org/events/Summit-2020Distributed/

On 9/7/20 1:51 PM, Nayani Nikeshala via Users wrote:
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@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".



_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to