# $Id$

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

loadmodule "modules/textops/textops.so"
loadmodule "modules/sl/sl.so"
loadmodule "modules/tm/tm.so"

# ----------------- setting module-specific parameters ---------------

route{
	# if we do not get a positive reply, continue at reply_route[2]
	t_on_failure("2");
	# forward the request to all destinations in destination set now 
	t_relay();
}

failure_route[2] {
	# request failed (no reply, busy, whatever) ... forward it again
	# to pbx's voicemail at phone number 6000 via Cisco gateway at
	# 192.168.10.10; append proprietary CC-Diversion header field with
	# original request uri in it, so that the gateway and voicemail
	# know, whom the request was originally intended for
	append_branch("sip:6000@192.168.10.10");
	append_urihf("CC-Diversion: ", "\r\n");
	t_relay();
}