[Serusers] Conditional forwarding

Olivier Taylor olivier.taylor at gmail.com
Mon Sep 12 18:56:33 CEST 2005


What about this mysterious route(3) you mention ;)?

And I suppose that "# Whatever destination rewrite here" can be an
"avp_pushto("$ruri/username", "s:callee_3");" for example..


Thanks, Olivier



-----Message d'origine-----
De : Corey S. McFadden [mailto:csm-lists at csma.biz] 
Envoyé : lundi 12 septembre 2005 18:17
À : Olivier Taylor
Cc : serusers at lists.iptel.org
Objet : Re: [Serusers] Conditional forwarding




Oliver,

In the failure route you can add some conditional logic like this:

...
        } else if (t_check_status("408")) {
                xlog("L_ERR", " Failure Route 1 - 408 no answer
detected.\n");
		# Whatever destination rewrite here
                append_branch();
                route(3);
                break;
        } else if (t_check_status("486")) {
                xlog("L_ERR", " Failure Route 1 - 486 busy detected.\n");
		# Whatever destination rewrite here
                append_branch();
                route(3);
                break;
...

The other popular one is unconditional forwarding.  If you're going to use 
that one you're going to have to do it before anything else.

I'd also do something like this in your main route:
     if (!lookup("location")) {

         if (does_uri_exist()) {
                 xlog("L_ERR", " Unregistered UA found. Diverting to
VM.\n");
                 # Rewrite to voicemail or wherever
                 route(3);
                 break;
         };

This will catch offline UAs.

Those are the basics.

-Corey



On Mon, 12 Sep 2005, Olivier Taylor wrote:

> Hi all,
> 
> Does any of you can give me the ser.cfg part for a call forwarding 
> when busy or no response?
> 
> My code works for unconditional forwarding.
> 
> Thx,
> 
> Olivier
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
> 
> *********************************************
> This message has been scanned for viruses and
> dangerous content, and is believed to be clean.
> 
> 


*********************************************
This message has been scanned for viruses and
dangerous content, and is believed to be clean.




More information about the sr-users mailing list