test/unit/60.cfg
83d44c64
 # ----------- global configuration parameters ------------------------
 debug=2
 fork=yes
 log_stderror=no
 children=1
 disable_tcp=yes
 listen=udp:127.0.0.1:5060
 auto_aliases=no
 alias=example.invalid
 # ------------------ module loading ----------------------------------
 loadpath "../../modules/"
 
 loadmodule "tm.so"
 loadmodule "sl.so"
 loadmodule "pv.so"
 loadmodule "textops.so"
 loadmodule "textopsx.so"
 loadmodule "sdpops.so"
 
 route {
 	if ( is_present_hf("X-Case") ) {
 		if ($hdr(X-Case) == '60-test7') {
 			sdp_remove_line_by_prefix("s=");
 			msg_apply_changes();
 			set_reply_body($rb,"application/sdp");
 			sl_send_reply(200,"OK");
 			exit;
 		}
 	} else {
 		$var(rc) = sdp_remove_line_by_prefix("a=X-cap");
 		if ( $var(rc) < 0 ) {
 			sl_send_reply(500,"Some error");
 			exit;
 		}
 		msg_apply_changes();
 		set_reply_body($rb,"application/sdp");
 		sl_send_reply(200,"OK");
 		exit;
 	}
 }