[OpenSIPS-Users] 404 automatic failover

Brett Nemeroff brett at nemeroff.com
Mon Oct 12 18:21:18 CEST 2009


Your config really needs some work. For starters:

if(uri=~"^sip:*@*") {

rewritehostport("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");

(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> 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
>
>
>
> fabbrica*digitale* 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 <p.baratta at fabbricadigitale.it>
> *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: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> 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
> 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/d36ac4f4/attachment-0001.htm 


More information about the Users mailing list