[OpenSIPS-Users] 404 automatic failover

Pacho Baratta [fabbricadigitale] P.Baratta at fabbricadigitale.it
Mon Oct 12 18:53:44 CEST 2009


Brett,
the problem was with 400... it was not 404 as I believed:(

thanks so much for the support, as it works fine now

fabbricadigitale srl
Pacho Baratta | Senior Systems Engineer
Tecnhology Engineering
-----------------------------
Via A.Volta, 3 - 26041 - Casalmaggiore - CR
Phone +39 0375 284600
Fax +39 02 57760002
mailto:p.baratta at fabbricadigitale.it
www.fabbricadigitale.it<http://www.fabbricadigitale.it/>

From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Brett Nemeroff
Sent: lunedì 12 ottobre 2009 18:41
To: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] 404 automatic failover

Please keep this discussion on the list. Other's may benefit from your questions!!


How do you know it isn't called.. stick an xlog in there:
failure_route[1] {
        xlog("L_INFO","****** In failure route 1!!\n");
        if (t_was_cancelled()) {
                exit;
        }

Also, be sure to add the 404 check in:
if (t_check_status("400|486|408|404")) {

On Mon, Oct 12, 2009 at 11:36 AM, Pacho Baratta [fabbricadigitale] <P.Baratta at fabbricadigitale.it<mailto:P.Baratta at fabbricadigitale.it>> wrote:
I don't understand what you mean.
The
if(uri=~"^sip:*@*") {
rewritehostport("172.30.1.110:5060<http://172.30.1.110:5060/>");
 }

Seems to work fine, as I get calls on existing numbers.

My failure route is like this:

failure_route[1] {
        if (t_was_cancelled()) {
                exit;
        }

        # uncomment the following lines if you want to redirect the failed
        # calls to a different new destination
if (t_check_status("400|486|408")) {
                sethostport("172.30.7.54:5060<http://172.30.7.54:5060>");
#               rewritehostport("172.30.7.54:5060<http://172.30.7.54:5060>");
        ##      # do not set the missed call flag again
 xlog("L_ERR",
                "404 calls are redirected");

                t_relay();
        }

But it looks like it is not called


fabbricadigitale srl
Pacho Baratta | Senior Systems Engineer
Tecnhology Engineering
-----------------------------
Via A.Volta, 3 - 26041 - Casalmaggiore - CR
Phone +39 0375 284600
Fax +39 02 57760002
mailto:p.baratta at fabbricadigitale.it
www.fabbricadigitale.it<http://www.fabbricadigitale.it/>

From: users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org> [mailto:users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>] On Behalf Of Brett Nemeroff
Sent: lunedì 12 ottobre 2009 18:21
To: OpenSIPS users mailling list

Subject: Re: [OpenSIPS-Users] 404 automatic failover

Your config really needs some work. For starters:
if(uri=~"^sip:*@*") {
rewritehostport("172.30.1.110:5060<http://172.30.1.110:5060/>");
 }
(ie: if uri is properly formated then...) Of course, there are other cases you might be checking for here, but I don't think that was the intention..


So it might as well just be:
rewritehostport("172.30.1.110:5060<http://172.30.1.110:5060/>");
(without the IF statement around it).

Next, you do a whole bunch of stuff after that rewrite that might end up rewriting the message again.. do you really want that? What I'm suggesting is that your order (where you stuck the rewrite) is off.

Lastly, in the failure route, you should add a check for the 404 in it:
if (t_check_status("400|486|408|404")) {

See where that gets you..
-Brett

On Mon, Oct 12, 2009 at 11:11 AM, Pacho Baratta [fabbricadigitale] <P.Baratta at fabbricadigitale.it<mailto:P.Baratta at fabbricadigitale.it>> wrote:
If a place a call to a number that does not exist, the gateway returns a 404.
I want to redirect this call to a different gateway

fabbricadigitale srl
Pacho Baratta | Senior Systems Engineer
Tecnhology Engineering
-----------------------------
Via A.Volta, 3 - 26041 - Casalmaggiore - CR
Phone +39 0375 284600
Fax +39 02 57760002
mailto:p.baratta at fabbricadigitale.it
www.fabbricadigitale.it<http://www.fabbricadigitale.it/>

From: users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org> [mailto:users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>] On Behalf Of Brett Nemeroff
Sent: lunedì 12 ottobre 2009 18:06
To: Pacho Baratta [fabbricadigitale]
Cc: OpenSIPS users mailling list

Subject: Re: [OpenSIPS-Users] 404 automatic failover

Pacho,
This is better than before. But you haven't mentioned what the problem is this time.

On Mon, Oct 12, 2009 at 11:03 AM, Pacho Baratta [fabbricadigitale] <P.Baratta at fabbricadigitale.it<mailto:P.Baratta at fabbricadigitale.it>> wrote:
As I said, I'm really a newbie. So I tried to modify the default routing logic, but no success.
Can you please tell me what's wrong with this?
Thanks all, pacho


_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20091012/74c44021/attachment-0001.htm 


More information about the Users mailing list