[Users] Routing Examples

Douglas Garstang dgarstang at oneeighty.com
Tue Dec 13 22:45:11 CET 2005


I'm having a terrible time trying to get failure routes to work. Can someone point me to some USEFUL examples please? The examples that come with OpenSER are trivial. They all use append_branch("sip:user at domain") which in the real world is barely useful. I need to try sending messages to a specified host with the current user's URI.

For example, is this the correct usage for trying to connect in sequence to multple destinations?

rewritehostport("192.168.10.7:5060");
append_branch();
t_on_failure("2");
t_relay();

failure_route[2] {
	rewritehostport("192.168.10.7:5060");
	append_branch();
	t_relay();
}

The second route is never tried. In general, what should I be doing here? 
Which is correct?

rewritehostport(ip-addr)
append_branch()
t_relay()

or maybe...
append_branch(ip-addr)
t_relay()

or maybe...
append_branch(ip-addr1)
append_branch(ip-addr2)
t_relay()

Do you get my point? The docs are really bad and don't cover exactly how this stuff is supposed to be implemented! if I do a google search on this stuff, I get almost no matches. There's no books either. I'm out of ideas.

I'm just trying to connect to multiple destinations in sequence....







More information about the sr-users mailing list