[Serusers] Conditional forwarding

Corey S. McFadden csm-lists at csma.biz
Mon Sep 12 18:16:49 CEST 2005



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