Hi,
instead of using a hardcoded value via
avp_write("i:28","$fr_inv_timer");
you may loaded it from db:
avp_db_load("ruri","$fr_inv_timer");
this will load the $fr_inv_timer (i:103) from the DB based on RURI.
For more details about the avps, please see the avpops tutorial (see
"docs" section on the site).
regards,
bogdan
Klaus Darilion wrote:
Hilco de Lathouder wrote:
If there is an incoming request for, say, user 399(a)domain.com i want
to load an alternate fr_invite_timer using AVP. According to the TM
module docs, this is supported with the parameter fr_inv_timer_avp.
I've studied the AVP & TM docs but i still don't fully understand how
to get this working. Do I have to use avp_load statements, or does
the TM module automaticaly recognize the right user ?
I do it this way:
# -- tm params --
modparam("tm", "fr_inv_timer_avp", "i:103")
# default INVIT timeout if not set via AVP
modparam("tm", "fr_inv_timer", 60)
# set noisytimer to get a CANCEL in all cases
modparam("tm", "noisy_ctimer", 1)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("avpops","avp_aliases","fr_inv_timer=i:103;cansipuri=i:104;)
in route:
if (uri =~ "sip:klaus@darilion.com") {
t_on_failure("1"); # to voicemail after 28 seconds
avp_write("i:28","$fr_inv_timer");
}
Another question is, if i rewrite the user's URI, what will happen
with the AVP?
The AVPs belong to the transaction.
klaus
Ive created an AVP entry in the usr_preferences table for user
399(a)domain.com, with a string attribute 'hg_invite_timer' and an
integer value of 5. (which would be type 1).
Thanks in advance,
Hilco
=================
Below are my TM and AVPOPS papameters from the config file. I dont
use any other avp funtion calls.
#
# TM params
#
modparam("tm", "fr_inv_timer", 15 )
modparam("tm", "fr_inv_timer_avp","s:hg_invite_timer")
#
# AVPOPS params
#
modparam("avpops","avp_url","mysql://openser:xxxxx@localhost/openser")
modparam("avpops","avp_table","usr_preferences")
=================
_______________________________________________
Users mailing list
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users