Hi Matteo,

just a fast question: what is the IP of the server? is it possible to have a spiral?

regards,
bogdan



Matteo Piazza wrote:

I have realized a serial forking with load_contacts() and next_contacts(), but i have this problem: When the first time arrive the invite messages the contacts are loaded by the function load_contacts(). So when the call flow enters in the failure_route I can load the second contact. At this point the script reload another time the contacts. But in this way Is is impossible to load the third contact, because the script load the preference of the new contact.
For example:
I call [EMAIL PROTECTED],
the script loads 309 contacts and call the fisrt: [EMAIL PROTECTED]
309 not answered,
the scrip enters in failure route,
it loads the [EMAIL PROTECTED] and call 400,
At this moment I loads the contacts of [EMAIL PROTECTED] WRONG!!!!!


In which way it is possibile to load the contacts only the firt time.
I hope that the problem is clear.

Best
Matteo
=======================================


This is my location table
============================================================

username | domain | contact                            |  q
400      |        | sip:[EMAIL PROTECTED]             | 1.00
401      |        | sip:[EMAIL PROTECTED]             | 1.00
308      |       | sip:[EMAIL PROTECTED]:5060          | 1.00
309      |       | sip:[EMAIL PROTECTED];transport=udp | 1.00
309      |       | sip:[EMAIL PROTECTED]          | 0.80
309    |    | sip:[EMAIL PROTECTED]          | 0.60



....................
....................
route{
......
......
......

 if(load_contacts()){
    xlog("L_ERR","LOAD CONTACTS!\n");
 };

 if(next_contacts()){
    xlog("L_ERR","NEXT CONTACT!\n");
 };

 t_on_failure("1");
 t_relay();
 exit;
}

route[1] {
 log(1,"ROUTE 1 !\n");
  if (!t_relay()) {
        sl_reply_error();
        };
        exit;
}


route[2] {
        # send it out now; use stateful forwarding as it works reliably
        # even for UDP2TCP
        log(1,"ROUTE 2 !\n");
        t_on_failure("1");
        if (!t_relay()) {
                sl_reply_error();
        };
        exit;
}

failure_route[1] {
 log(1,"FAILURE ROUTE !\n");
 if (t_check_status("408")){
        if (next_contacts()) {
                log(1,"NUOVO CONTATTO !\n");
                route(2);
                exit;
        };
 };
exit;
}

This is the output:
7(5504) LOAD CONTACTS!
 7(5504) NEXT CONTACT!
14(5518) FAILURE ROUTE !
14(5518) NUOVO CONTATTO !
14(5518) ROUTE 2 !
 6(5502) LOAD CONTACTS!
 6(5502) NEXT CONTACT!




_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to