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:[EMAIL PROTECTED]:5060        0.80
  800             mydomain.org          sip:[EMAIL PROTECTED]:5080        0.50



  #### INVITE sip:[EMAIL PROTECTED]
  #### load_contacts() - avp(i:711) = <null> - ds =  Contact: sip:[EMAIL 
PROTECTED]:5060;transport=udp
  #### next_contacts() - avp(i:711) = <null> - ds =  Contact: sip:[EMAIL 
PROTECTED]:5060;transport=udp

      <<   I reject the call in first location  >>

  #### failure_route[31] - next_contacts() - avp(i:711) = <null> - ds =  
Contact: sip:[EMAIL PROTECTED]:5060;transport=udp, <sip:[EMAIL 
PROTECTED]: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.


-- 
Iñaki Baz Castillo
[EMAIL PROTECTED]

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

Reply via email to