From db829aabf30c5b4fdfee5ebd842959b63a598b26 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Thu, 11 Jun 2015 10:49:10 +0200 Subject: [PATCH] uac: updated notes about uac_auth() --- modules/uac/doc/uac_admin.xml | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/modules/uac/doc/uac_admin.xml b/modules/uac/doc/uac_admin.xml index 0a154d907f8..3e6021fe1b7 100644 --- a/modules/uac/doc/uac_admin.xml +++ b/modules/uac/doc/uac_admin.xml @@ -42,8 +42,10 @@ - CSeq is not increased during authentication - the response - may be rejected. + CSeq is not increased automatically by uac_auth() during authentication + - the follow up request may be rejected. CSeq can be increased when + authenticating INVITE requests - dialog module has to be used, with + CSeq tracking feature enabled (see the readme of dialog module). @@ -688,7 +690,31 @@ uac_restore_to(); <function>uac_auth</function> usage ... -uac_auth(); +modparam("uac","auth_username_avp","$avp(auser)") +modparam("uac","auth_password_avp","$avp(apass)") +modparam("uac","auth_realm_avp","$avp(arealm)") + +request_route { + ... + if(is_method("INVITE")) { + t_on_failure("TRUNKAUTH"); + } + ... +} + +failure_route[TRUNKAUTH] { + + if (t_is_canceled()) { + exit; + } + if(t_check_status("401|407")) { + $avp(auser) = "test"; + $avp(apass) = "test"; + uac_auth(); + t_relay(); + exit; + } +} ...