Hi,
I'm trying to do the following things using the avpops:
When I receive a Register Message from uri 666@.., I'd like to register
the uri 1000@... and 2000@... at the same time.
I'd like to do this also for uri 777, to register 778 and 779 when 777
triggers a Register Message.
So I decided to use the SQL Table below to achieve this:
Initnumber: Varchar(64)
Attribute: Varchar(64)
Type: INT (default to 0)
Associated: Varchar(64)
Initnumber attribute type associated
666 register 0 1000
666 register 0 2000
777 register 0 778
777 register 0 779
In Ser.cfg, I put this:
modparam("avpops","avp_url","mysql://ser:heslo@IP/telephone")
modparam("avpops", "avp_table", "associate")
modparam("avpops","username_column","initnumber")
modparam("avpops","attribute_column","attribute")
modparam("avpops","type_column","type")
modparam("avpops","value_column","associated")
if (method=="REGISTER") {
# Authentication Challenge
Challenge
#Test of AVPs
log(1, "LOG: AVP REGISTRATION");
avp_db_load("$from ","s:register");
#to display avp in memory
avp_print();
#fork registration using new avp value to
register
avp_pushto("$from","s:register/g");
save("location");
break;
};
What I expect this to do is to get the values "associated" with
"Initnumber", using avp_db_load and to fork the registration process
using avp_pushto to register the numbers in the associated column.
I use avp_print to see the avp loaded in memory, but I see nothing in
the syslog.
Moreover nothing happens, ie only the uri which initiates the Register
message is registered on SER :'(
Can somebody help me please,
Rodrigue