Pre-Submission Checklist

Type Of Change

Checklist:

Description

when handling registration requests we create a transaction for async process and need to use t_on_failure / t_on_failure. when the async processes returns we want to call auth_challenge without the need to create fake routes

onreply_route[KZ_AUTHORIZATION_OK]
{
    $var(password) = $(kzR{kz.json,Auth-Password});
    $var(nonce) = $adn;
   if( $(kzR{kz.json,Event-Name}) == "authn_err" ) {
        ==>> auth_challenge("$fd", "0");
        xlog("L_INFO", "$ci|end|issued auth challenge from async registrar for $Au $si:$sp\n");
        exit;
    } else {
       xlog("L_INFO", "$ci|log|authenticated $Au via registrar async process\n");
       route(SAVE_AUTHORIZATION);
    }
}

failure_route[KZ_AUTHORIZATION_ERROR]
{
    xlog("L_INFO", "$ci|log|registrar process failed with $T_reply_code for $Au $si:$sp\n");
   ==>> auth_challenge("$fd", "0");
    exit;
}

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/1641

Commit Summary

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.