Module: kamailio
Branch: master
Commit: 743f5dca220b8f1e6a863cd9f68fdeb9c2dc7237
URL: https://github.com/kamailio/kamailio/commit/743f5dca220b8f1e6a863cd9f68fdeb…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2019-10-29T09:31:25+01:00
modules: readme files regenerated - uac ... [skip ci]
---
Modified: src/modules/uac/README
---
Diff: https://github.com/kamailio/kamailio/commit/743f5dca220b8f1e6a863cd9f68fdeb…
Patch: https://github.com/kamailio/kamailio/commit/743f5dca220b8f1e6a863cd9f68fdeb…
---
diff --git a/src/modules/uac/README b/src/modules/uac/README
index caeb998e93..b0e4f76f43 100644
--- a/src/modules/uac/README
+++ b/src/modules/uac/README
@@ -61,7 +61,7 @@ Ramona-Elena Modroiu
4.4. uac_replace_to(display,uri)
4.5. uac_replace_to(uri)
4.6. uac_restore_to()
- 4.7. uac_auth()
+ 4.7. uac_auth([mode])
4.8. uac_req_send()
4.9. uac_reg_lookup(uuid, dst)
4.10. uac_reg_status(uuid)
@@ -179,7 +179,7 @@ Chapter 1. Admin Guide
4.4. uac_replace_to(display,uri)
4.5. uac_replace_to(uri)
4.6. uac_restore_to()
- 4.7. uac_auth()
+ 4.7. uac_auth([mode])
4.8. uac_req_send()
4.9. uac_reg_lookup(uuid, dst)
4.10. uac_reg_status(uuid)
@@ -596,7 +596,7 @@ modparam("uac", "reg_gc_interval", 60)
4.4. uac_replace_to(display,uri)
4.5. uac_replace_to(uri)
4.6. uac_restore_to()
- 4.7. uac_auth()
+ 4.7. uac_auth([mode])
4.8. uac_req_send()
4.9. uac_reg_lookup(uuid, dst)
4.10. uac_reg_status(uuid)
@@ -743,12 +743,16 @@ uac_replace_to("sip:batman@gotham.org");
uac_restore_to();
...
-4.7. uac_auth()
+4.7. uac_auth([mode])
This function can be called only from failure route and will build the
authentication response header and insert it into the request without
sending anything.
+ If mode is set to 1, then the password has to be provided in HA1
+ format. The parameter can be a static integer or a variable holding an
+ integer value.
+
This function can be used from FAILURE_ROUTE.
Example 1.28. uac_auth usage
@@ -773,7 +777,9 @@ failure_route[TRUNKAUTH] {
if(t_check_status("401|407")) {
$avp(auser) = "test";
$avp(apass) = "test";
+ # $avp(apass) = "36d0a02793542b4961e8348347236dbf";
uac_auth();
+ # uac_auth("1");
t_relay();
exit;
}
@@ -838,10 +844,16 @@ $var(status) = uac_reg_status("$rU");
This function can be used to send an authenticated request to a remote
user in the uac registrations table. It sets the request-uri, dst-uri
- and auth_*_avp pv's to the values that correspond to the supplied user.
-
- The mode indicates whether the user should match the local uuid
- (mode=0), or the username (mode=1).
+ and auth_*_avp variables to the values that correspond to the supplied
+ user.
+
+ The mode is a bitwise set of flags controlling how the matching of the
+ record is done and what field is used to set auth_password_avp:
+ * indicates whether the user should match the local uuid (bit
+ value=0), or the username (bit value=1, int value=1).
+ * indicates whether the auth_password value is used to set
+ auth_password_avp (bit value=0), or the auth_ha1 value (bit
+ value=1, int value=2).
The auth_*_avp module parameters must be set to valid pv's.
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for feature requests.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If you submit a feature request (or enhancement) add the description of what you would like to be added.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
I'm using uac module to remote authenticate to a trunk. With the addition of ha1 used instead of plaintext password it is also would be nice to be able to use uac_reg_request_to with it.
### Expected behavior
There should be auth_ha1_avp for uac module, which will use ha1 instead of plaintext to build the request
#### Actual observed behavior
auth_password_avp is set to empty string or dot respectively of how you specify it in database, ha1 is not used in uac_reg_request_to
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a improvement.
-->
Well logically auth_ha1_avp should be prioritized over auth_password_ha1
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.4.0-dev1 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 6.3.0```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
Debian 10 in docker```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2102
Module: kamailio
Branch: master
Commit: 825800e6d3f297076bcce90f1f82c65a91cbb583
URL: https://github.com/kamailio/kamailio/commit/825800e6d3f297076bcce90f1f82c65…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-29T09:25:06+01:00
uac: updated docs for uac_auth()
---
Modified: src/modules/uac/doc/uac_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/825800e6d3f297076bcce90f1f82c65…
Patch: https://github.com/kamailio/kamailio/commit/825800e6d3f297076bcce90f1f82c65…
---
diff --git a/src/modules/uac/doc/uac_admin.xml b/src/modules/uac/doc/uac_admin.xml
index e0ea527776..f718924dad 100644
--- a/src/modules/uac/doc/uac_admin.xml
+++ b/src/modules/uac/doc/uac_admin.xml
@@ -802,14 +802,18 @@ uac_restore_to();
</section>
<section id="uac.f.uac_auth">
<title>
- <function moreinfo="none">uac_auth()</function>
+ <function moreinfo="none">uac_auth([mode])</function>
</title>
<para>
- This function can be called only from failure route and will
+ This function can be called only from failure route and will
build the authentication response header and insert it into the
request without sending anything.
</para>
<para>
+ If mode is set to 1, then the password has to be provided in HA1 format.
+ The parameter can be a static integer or a variable holding an integer value.
+ </para>
+ <para>
This function can be used from FAILURE_ROUTE.
</para>
<example>
@@ -836,7 +840,9 @@ failure_route[TRUNKAUTH] {
if(t_check_status("401|407")) {
$avp(auser) = "test";
$avp(apass) = "test";
+ # $avp(apass) = "36d0a02793542b4961e8348347236dbf";
uac_auth();
+ # uac_auth("1");
t_relay();
exit;
}
Module: kamailio
Branch: master
Commit: 08e676654d901644724f52478a88c6d0258304cc
URL: https://github.com/kamailio/kamailio/commit/08e676654d901644724f52478a88c6d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-29T08:49:27+01:00
uac: updated docs for uac_req_request_to()
---
Modified: src/modules/uac/doc/uac_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/08e676654d901644724f52478a88c6d…
Patch: https://github.com/kamailio/kamailio/commit/08e676654d901644724f52478a88c6d…
---
diff --git a/src/modules/uac/doc/uac_admin.xml b/src/modules/uac/doc/uac_admin.xml
index 8ddf26ca0f..e0ea527776 100644
--- a/src/modules/uac/doc/uac_admin.xml
+++ b/src/modules/uac/doc/uac_admin.xml
@@ -951,12 +951,27 @@ $var(status) = uac_reg_status("$rU");
<function moreinfo="none">uac_reg_request_to(user, mode)</function>
</title>
<para>
- This function can be used to send an authenticated request to a remote user in
+ This function can be used to send an authenticated request to a remote user in
the uac registrations table. It sets the request-uri, dst-uri and auth_*_avp
- pv's to the values that correspond to the supplied user.
+ variables to the values that correspond to the supplied user.
</para>
<para>
- The mode indicates whether the user should match the local uuid (mode=0), or the username (mode=1).
+ The mode is a bitwise set of flags controlling how the matching of
+ the record is done and what field is used to set auth_password_avp:
+ <itemizedlist>
+ <listitem>
+ <para>
+ indicates whether the user should match the local uuid (bit value=0),
+ or the username (bit value=1, int value=1).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ indicates whether the auth_password value is used to set auth_password_avp
+ (bit value=0), or the auth_ha1 value (bit value=1, int value=2).
+ </para>
+ </listitem>
+ </itemizedlist>
</para>
<para>
The auth_*_avp module parameters must be set to valid pv's.