[OpenSIPS-Users] Manually self generate failure

Jeff Pyle jeff.pyle at fidelityvoice.com
Wed Jul 1 02:55:45 CEST 2015


Since the failure route is triggered by tm, I think you have to t_relay()
the request for the failure path to be taken.  Maybe you could t_relay() it
to another proxy with custom headers to indicate how you wanted it to fail,
or even t_relay() it to the same proxy with care to handle it as you see
fit.

Or, perhaps this.  Let's say you have

route[dostuff] {
        stuff();
}

You could make your failure route available to the main script by writing
your failure route like this:

failure_route[failedstuff] {
        route[dostuff];
}

So that way a true failure would run the same script as if you were to
manually invoke route[dostuff].

That's a lot of stuff.  Hopefully some of it fits your use case.



- Jeff


On Tue, Jun 30, 2015 at 8:14 PM, Podrigal, Aron <aronp at guaranteedplus.com>
wrote:

> Is there a way i can manually make a request fail so that my failure route
> would be invoked? I know this may sound weird, but i encountered some
> scenarios that this implementation came to my mind. So i want to know if
> this is possible.
>
> _______________________________________________
> 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/20150630/e7917a8a/attachment.htm>


More information about the Users mailing list