Module: kamailio Branch: master Commit: db829aabf30c5b4fdfee5ebd842959b63a598b26 URL: https://github.com/kamailio/kamailio/commit/db829aabf30c5b4fdfee5ebd842959b6...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2015-06-11T10:49:51+02:00
uac: updated notes about uac_auth()
---
Modified: modules/uac/doc/uac_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/db829aabf30c5b4fdfee5ebd842959b6... Patch: https://github.com/kamailio/kamailio/commit/db829aabf30c5b4fdfee5ebd842959b6...
---
diff --git a/modules/uac/doc/uac_admin.xml b/modules/uac/doc/uac_admin.xml index 0a154d9..3e6021f 100644 --- a/modules/uac/doc/uac_admin.xml +++ b/modules/uac/doc/uac_admin.xml @@ -42,8 +42,10 @@ </listitem> <listitem> <para> - 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). </para> </listitem> <listitem> @@ -688,7 +690,31 @@ uac_restore_to(); <title><function>uac_auth</function> usage</title> <programlisting format="linespecific"> ... -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; + } +} ... </programlisting> </example>