[Serusers] if routeXX fails..
Matt Schulte
mschulte at netlogic.net
Fri Apr 22 01:03:28 CEST 2005
I see, that makes perfect sense :-).. So I just might need to flip
around my "if" to get it to work.
-----Original Message-----
From: Marian Dumitru [mailto:marian.dumitru at voice-sistem.ro]
Sent: Thursday, April 21, 2005 5:10 PM
To: Matt Schulte
Cc: serusers at lists.iptel.org
Subject: Re: [Serusers] if routeXX fails..
Hi Matt,
Basically you can do that, but be very careful since the return code of
a route is the return code of the *last* command executed inside the
route - and break always returns true!
Best regards,
Marian
Matt Schulte wrote:
> Is it possible to do this? or is it bad practice, I'm assuming the
> "extra" route would have to return an error code to show a
> nonpositive? I coulda swore I got this to work awhile back.
>
> if (!route(6)) {
> xlog("L_INFO", "NOTICE: blah <%ru> sending 404\n");
> sl_send_reply("404", "Not Found");
> break;
> } else {
> # Else route6 ran another route and break
> break;
> }
>
--
Voice System
http://www.voice-system.ro
More information about the sr-users
mailing list