debug=3

loadmodule "sl.so"
loadmodule "tm/tm.so"
loadmodule "db_mysql/db_mysql.so"
loadmodule "cpl-c/cpl-c.so"
loadmodule "mi_fifo/mi_fifo.so"
loadmodule "textops/textops.so"

modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
modparam("cpl-c", "cpl_dtd_file", "../../modules/cpl-c/cpl-06.dtd")

request_route {
	if (is_method("INVITE")) {
		# run incoming script
		if ( !cpl_run_script("incoming", "force_stateful") ) {
			# script execution failed
			sl_send_reply("500", "CPL script execution failed");
			exit;
		}
	}
}
