[OpenSIPS-Users] Midregistrar handle failed registrations
John Matich
john at siptalk.com.au
Wed Sep 16 13:29:19 EST 2020
I have tried using t_on_failure + failure_route but every registration
ends up in the failure_route branch regardless of whether the
authentication was successful or not.
Does anyone know how I can capture the response returned from the main
registrar please to know in script whether the register was
authenticated or not?
On Wed, 2020-09-16 at 17:15 +1000, John Matich - Siptalk wrote:
> 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.
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list