[Serusers] serial forking with a recursive failure_route block

Jan Janak jan at iptel.org
Wed Jul 14 09:55:12 CEST 2004


On 13-07 13:14, Michael Przybylski wrote:
> Hello everyone,
> 
> 	I've got a recursing failure_route block that I'm trying to use
> for voice over IP gateway failover.
> 	The recursion bit works without any problem, but I could really
> use some hints on examining the branches appended by previous calls to the
> failure route so that it can know when to stop.
> 
> 	Here's the pseudo-code version of what I'm trying to do.
> 
> if(examing previously appended branches shows
>    IP of last-chance gateway already there){
> 	give up;
> }
> 
> 	Any suggestions would be greatly appreciated.

  You can call t_on_failure from each failure_route block but the last
  one. That is: failure_route[1]->failure_route[2]->failure_route[3].
  failure_route[3] will not call t_on_failure and that will stop
  processing.

     Jan.




More information about the sr-users mailing list