examples/redirect.cfg
468bf60b
 #
 # $Id$
 #
 # this example shows use of ser as stateless redirect server
 #
 
 # ------------------ module loading ----------------------------------
 
0e3e0fbf
 loadmodule "modules/sl/sl.so"
468bf60b
 
 
 # -------------------------  request routing logic -------------------
 
 # main routing logic
 
 route{
 	# for testing purposes, simply okay all REGISTERs
 	if (method=="REGISTER") {
 		log("REGISTER");
 		sl_send_reply("200", "ok");
 		break;
 	};
0e3e0fbf
 	# rewrite current URI, which is always part of destination ser
 	rewriteuri("sip:parallel@iptel.org:9");
 	# append one more URI to the destination ser
468bf60b
 	append_branch("sip:redirect@iptel.org:9");
0e3e0fbf
 	# redirect now
468bf60b
 	sl_send_reply("300", "Redirect");
 }