#
# $Id$
#
# this example shows use of ser as stateless redirect server
#

# ----------- global configuration parameters ------------------------

debug=3
fork=no
log_stderror=yes	# (cmd line: -E)
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
syn_branch=1
reply_to_via=0

# ------------------ module loading ----------------------------------

loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/print.so"


# -------------------------  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;
	};
	append_branch("sip:parallel@iptel.org:9");
	append_branch("sip:redirect@iptel.org:9");
	sl_send_reply("300", "Redirect");
}