[OpenSER-Users-ES] Help with "lcr" load_contacts() and next_contacts()
Iñaki Baz Castillo
ibc at aliax.net
Mon Oct 22 01:10:03 CEST 2007
Hi, I want to try serial forwarding changing "q" values of "location" table.
Unfortunatelly my script only does the first INVITE to contact(s) with mayor "q".
I've tryed everything and read the entire doc and examples, but get nothing,
could you help me please?
This is my config and xlogs:
------------------------------------------
modparam("registrar", "append_branches", 1)
modparam("usrloc", "db_mode", 3)
modparam("lcr", "contact_avp", "$avp(i:711)")
route {
xlog("#### $rm $ru\n");
lookup("location");
if (load_contacts()) {
xlog("L_INFO","#### load_contacts() - avp(i:711) = $avp(i:711) - ds = $ds\n");
}
if (next_contacts()) {
xlog("L_INFO","#### next_contacts() - avp(i:711) = $avp(i:711) - ds = $ds\n");
t_on_failure("31");
t_relay();
}
}
failure_route[31] {
if (next_contacts()) {
xlog("L_INFO","#### failure_route[31] - next_contacts() - avp(i:711) = $avp(i:711) - ds = $ds\n");
t_relay();
exit;
}
else {
xlog("L_ERR","#### failure_route[31] - !next_contacts()\n");
exit;
}
}
------------------------------------------
Now I call to a user with 2 entries in "location":
username domain contact q
800 mydomain.org sip:800 at 192.168.1.33:5060 0.80
800 mydomain.org sip:800 at 192.168.1.33:5080 0.50
#### INVITE sip:800 at mydomain.org
#### load_contacts() - avp(i:711) = <null> - ds = Contact: sip:800 at 192.168.1.33:5060;transport=udp
#### next_contacts() - avp(i:711) = <null> - ds = Contact: sip:800 at 192.168.1.33:5060;transport=udp
<< I reject the call in first location >>
#### failure_route[31] - next_contacts() - avp(i:711) = <null> - ds = Contact: sip:800 at 192.168.1.33:5060;transport=udp, <sip:800 at 192.168.1.33:5080>;q=0
<< No other INVITE is sent to second location >>
What am I doing wrong? Thanks a lot for any help.
--
Iñaki Baz Castillo
More information about the Users-es
mailing list