[OpenSIPS-Users] mid-registrar question

Alexey Kazantsev kurgan-rus at inbox.ru
Wed Jul 25 01:05:29 EDT 2018


... and yes, route[RELAY] is like this:


route[RELAY] {
    if ( !t_relay() ) {
	send_reply("500","Internal Error");
    }
    exit;
}


or you may simply do:

	# REGISTER processing
	if ( is_method("REGISTER") ) {
		mid_registrar_save("location");
		switch ($retcode) {
			case 1:
				$ru = "sip:10.223.15.21:5070";
				t_relay();
			        break;
			case 2:
			        break;
			default:
				xlog("L_ERROR", "failed to save registration! ($$ci=$ci)\n");
		}
		exit;
	}


Here's the tutorial http://www.opensips.org/Documentation/Tutorials-MidRegistrar
But keep in mind that it is for OpenSIPS 2.3, as 2.4 does not have 'insertion_mode'
option described there.


-----------------------------------------------
BR, Alexey
http://alexeyka.zantsev.com/


More information about the Users mailing list