Browse Source

create common routine AUTH_XAVP_TOKEN

master
lazedo 6 years ago
parent
commit
e0175d19df
1 changed files with 11 additions and 10 deletions
  1. +11
    -10
      kamailio/auth.cfg

+ 11
- 10
kamailio/auth.cfg View File

@ -67,22 +67,14 @@ route[SETUP_AUTH_HEADERS]
if (registered("location","sip:$Au", 2, 1) == 1) {
$avp(is_registered) = "true";
$avp(auth_allowed) = "true";
#!ifdef WITH_AUTH_TOKEN
route(AUTH_TOKEN);
#!else
route(AUTH_CCVS)
#!endif
route(AUTH_XAVP_TOKEN);
return;
} else if(is_present_hf("Proxy-Authorization")) {
if(registered("location", "sip:$au@$ar", 2, 1) == 1) {
xlog("L_INFO", "$ci|auth|from sip:$au@$ar\n");
$avp(is_registered) = "true";
$avp(auth_allowed) = "true";
#!ifdef WITH_AUTH_TOKEN
route(AUTH_TOKEN);
#!else
route(AUTH_CCVS)
#!endif
route(AUTH_XAVP_TOKEN);
return;
}
}
@ -116,6 +108,15 @@ route[SETUP_AUTH_HEADERS]
#!ifdef REGISTRAR_ROLE
route[AUTH_XAVP_TOKEN]
{
#!ifdef WITH_AUTH_TOKEN
route(AUTH_TOKEN);
#!else
route(AUTH_CCVS)
#!endif
}
route[AUTH_TOKEN]
{
if($(xavp(ulattrs=>token){s.len}) > 0) {


Loading…
Cancel
Save