[Serusers] Failover Forwarding

Jiri Kuthan jiri at iptel.org
Wed Jan 14 19:55:59 CET 2004


At 05:38 PM 1/14/2004, jon doe wrote:
>I have a SER proxy setup and would like to forward all calls to a gateway. If that gateway is down i would like to forward the calls to a different gateway. Is this possible. I have tried. the following, 
> 
>if (method=="INVITE") {
>                t_on_failure("1");
>        }
>        t_relay_to_udp("MainGateway.com","5050");
>.
>.
>.
> 
>failure_route[1] {
>     t_relay_to_udp("BackupGateway.com", "5060");
>}
> 
>but when the main gateway goes down the calls never get to the backup gateway and i get the following in /var/adm/messages
> 
>Jan 14 15:40:55 sun /usr/local/sbin/ser[26727]: [ID 680273 daemon.error] ERROR: t_forward_nonack: no branched for fwding

you need to tell SER to what SIP address you wish to
forward on the next try. That's what append_branch
is good for. See doc -- http://www.iptel.org/ser/doc/seruser/seruser.html#REPLYPROCESSINGSECTION


>Jan 14 15:40:55 sun /usr/local/sbin/ser[26727]: [ID 204228 daemon.error] ERROR: failure_route: t_relay_to failed
>Jan 14 15:40:55 sun /usr/local/sbin/ser[26727]: [ID 749208 daemon.error] ERROR: on_negative_reply: Error in do_action
>i understand that this code would work if i were to create a different branch to send to a different address of the user, but i dont want to do that i want to try to reach the same user via a different gateway. Is there any way to do this?

You have to create a branch in either case -- SER does not know if you wish
to forward to same or other URI. If the uri in the new branch is same, create
a branch with the same URI using the action "append_branch()".

-jiri 




More information about the sr-users mailing list