[OpenSIPS-Users] Invoking 'failure_route[X]' when OpenSIPS replies [3456]XX by itself
Brett Nemeroff
brett at nemeroff.com
Wed Nov 26 17:36:11 CET 2008
That's better than what I had in mind. :)
I don't think that's too bad really.. Conforms with all the rules of what a
failure route is for.. so I think that's a good way to do it.
Just my $0.02
-Brett
On Wed, Nov 26, 2008 at 10:29 AM, Iñaki Baz Castillo <ibc at aliax.net> wrote:
> El Miércoles, 26 de Noviembre de 2008, Brett Nemeroff escribió:
> > Why not just call a normal route after you send your negative reply?
>
> Because I've already coded the needed logic in a failure_route that would
> be
> runned when a negative reply comes from the callee. But I want the same
> behaviour when I (OpenSIPS) send the negative reply.
>
> I could do the following (but it's not very cool):
>
> ---------
> route[TO_USER] {
>
> t_on_failure("TO_USER");
>
> # some_custom_query...
> if $rc = ... {
> # I decide to reject the call
> # First create the transaction ("failure_route" could have
> sense)
> t_newtran();
> route(FAILURE);
> exit;
> }
>
> # do loockup and so...
> t_relay();
> }
>
> failure_route[TO_USER] {
>
> route(FAILURE);
>
> }
>
> route[FAILURE] {
>
> if $fU == "alice" {
> $ru = "sip:voicemail at server";
> append_branch();
> }
>
> }
> ---------
>
> --
> Iñaki Baz Castillo
>
> _______________________________________________
> 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/20081126/91953f6e/attachment-0001.htm
More information about the Users
mailing list