Re: [OpenSIPS-Users] Manually self generate failure

2015-06-30 Thread Podrigal, Aron
Thanks Jeff, I'll post back how it works for me, and for what use case
I chose what.

On 6/30/15, Jeff Pyle  wrote:
> 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 
> 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@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>


-- 
Aron Podrigal
-
//Be happy :-)

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Manually self generate failure

2015-06-30 Thread Jeff Pyle
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 
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@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Manually self generate failure

2015-06-30 Thread Podrigal, Aron
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@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users