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 <[email protected]>
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
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to