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@192.168.1.33:5060 0.80 800 mydomain.org sip:800@192.168.1.33:5080 0.50
#### INVITE sip:800@mydomain.org #### load_contacts() - avp(i:711) = <null> - ds = Contact: sip:800@192.168.1.33:5060;transport=udp #### next_contacts() - avp(i:711) = <null> - ds = Contact: sip:800@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@192.168.1.33:5060;transport=udp, sip:800@192.168.1.33:5080;q=0
<< No other INVITE is sent to second location >>
Why $avp(i:711) is always NULL? Why $ds has one contact the first time and both contacts the second time? What am I doing wrong? Thanks a lot for any help.
El Lunes, 22 de Octubre de 2007, Iñaki Baz Castillo escribió:
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?
Any help with this please? It's a feature I require and can't get it working as expected.
Note the location table has:
username domain contact q 800 mydomain.org sip:800@192.168.1.33:5060 0.80 800 mydomain.org sip:800@192.168.1.33:5080 0.50
After the "load_contacts() and next_contacts() in route block I get: avp(i:711) = <null> ds = Contact: sip:800@192.168.1.33:5060
That contacts rejects the call so next_contact() in failure route says: avp(i:711) = <null> ds = Contact: sip:800@192.168.1.33:5060, sip:800@192.168.1.33:5080;q=0
Why q=0 in failure_route? why do appear both locations in failure route? how should it be? Of course, the second call is not done, just the first INVITE to contact with q=0.80.
Thanks for any help.
El Martes, 23 de Octubre de 2007, Iñaki Baz Castillo escribió:
Any help with this please? It's a feature I require and can't get it working as expected.
Note the location table has:
username domain contact q 800 mydomain.org sip:800@192.168.1.33:5060 0.80 800 mydomain.org sip:800@192.168.1.33:5080 0.50
Ops, it was a fail of mine. I use modparam("registrar", "method_filtering", 1) and in the contacts I wrote manually into "location" table I set 256 in "methods" column (that just allows MESSAGE).
Now it works ;)