[OpenSIPS-Users] Midregistrar handle failed registrations

John Matich - Siptalk john at siptalk.com.au
Wed Sep 16 07:15:01 EST 2020


How do I capture the response of a failed registration that has been
passed through to the main registrar and failed to authenticate?

My code is:

if (is_method("REGISTER")) {
	mid_registrar_save("location");
	switch ($retcode) {
	case 1:
		xlog("L_INFO", "forwarding REGISTER to main
registrar...\n");
		$ru = "sip:10.0.0.3:5070";
		if (!t_relay()) {
			send_reply("500", "Server Internal Error 1");
		}

		break;
	case 2:
		xlog("L_INFO", "REGISTER has been absorbed!\n");
		break;
	default:
		xlog("L_ERR", "mid-registrar error!\n");
		send_reply("500", "Server Internal Error 2");
	}

	exit;
}

But there isn't anywhere that I can find to read a failed
authentication.




More information about the Users mailing list