Module: kamailio
Branch: master
Commit: cb1b78e7bc8d61261e429664c6deb8bb1b4b53d0
URL: https://github.com/kamailio/kamailio/commit/cb1b78e7bc8d61261e429664c6deb8b…
Author: Donat Zenichev <dzenichev(a)sipwise.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2021-11-19T09:18:55+01:00
tm: merge t_append_branches() and t_append_branch_by_contact()
Because the implementation of the functions
't_append_branches()' and 't_append_branch_by_contact()' is pretty
much the same, it's proposed to merge them into one:
't_append_branches()'
The way how the function acts now depends on if the contact
parameter of str type is given or not (empty or not).
If the contact parameter is given, then only a desired location
is meant for appending. If not found in the location table,
an append will not happen for this AOR.
Otherwise create branches for all existing location records
of this particular AOR. Search for locations is done in the location table.
---
Modified: src/modules/tm/t_append_branches.c
Modified: src/modules/tm/t_append_branches.h
Modified: src/modules/tm/tm_load.c
Modified: src/modules/tm/tm_load.h
---
Diff: https://github.com/kamailio/kamailio/commit/cb1b78e7bc8d61261e429664c6deb8b…
Patch: https://github.com/kamailio/kamailio/commit/cb1b78e7bc8d61261e429664c6deb8b…
Module: kamailio
Branch: master
Commit: f564c0d33974eeaa1833abeb7972f5d207c5663f
URL: https://github.com/kamailio/kamailio/commit/f564c0d33974eeaa1833abeb7972f5d…
Author: Donat Zenichev <dzenichev(a)sipwise.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2021-11-19T09:18:55+01:00
tm: API improvement, new function introduced: t_append_branch_by_contact()
New module functions introduced:
- t_append_branch_by_contact()
This commit introduces a possibility of TM's API to append a branch
based on specific location (Contact's URI).
Indeed the 't_append_branch_by_contact()' is a corrected copy of
the 't_append_branches()', which instead takes Contact as a parameter
of str type.
The separate function has been introduced, in order to save full
back-compatibility, and not affect existing implementation.
---
Modified: src/modules/tm/t_append_branches.c
Modified: src/modules/tm/t_append_branches.h
Modified: src/modules/tm/tm_load.c
Modified: src/modules/tm/tm_load.h
---
Diff: https://github.com/kamailio/kamailio/commit/f564c0d33974eeaa1833abeb7972f5d…
Patch: https://github.com/kamailio/kamailio/commit/f564c0d33974eeaa1833abeb7972f5d…
Module: kamailio
Branch: master
Commit: 7265f1cf7c57d258538119bc0d41146a04183eec
URL: https://github.com/kamailio/kamailio/commit/7265f1cf7c57d258538119bc0d41146…
Author: Donat Zenichev <dzenichev(a)sipwise.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2021-11-19T09:18:55+01:00
tsilo: Add support of a lookup and branch creating by contact
Improvement of the TSILO module, which allows to run a lookup using the provided RURI,
but only to create a new branch for the Contact, which is set in the currently processed REGISTER.
Or optionally a Contact URI value given as a parameter to the function.
If the Contact URI for a lookup, is given as a parameter,
it is possible to provide it as a pseudo-variable.
Hence it is now possible to append new branch(es) for only UAC(s)
getting REGISTERED at the moment of calling 'ts_append_by_contact()'.
Previously it was only possible to call 'ts_append()' and create new branches
for all previously present location records (for this specific URI), which was in some circumstsances undersired.
New script functions introduced:
- ts_append_by_contact(table, ruri [, contact])
New module functions introduced:
- w_ts_append_by_contact2() / ki_ts_append_by_contact()
- w_ts_append_by_contact3 / ki_ts_append_by_contact_uri()
- ts_append_by_contact() / ts_append_by_contact_to()
Backwards compatibility is saved, the new functionality is not overlapping with
the previously existing implementation, hence it only acts when the new script function
ts_append_by_contact() is used.
The documentation has been updated accordingly.
---
Modified: src/modules/tsilo/doc/tsilo.xml
Modified: src/modules/tsilo/doc/tsilo_admin.xml
Modified: src/modules/tsilo/ts_append.c
Modified: src/modules/tsilo/ts_append.h
Modified: src/modules/tsilo/tsilo.c
---
Diff: https://github.com/kamailio/kamailio/commit/7265f1cf7c57d258538119bc0d41146…
Patch: https://github.com/kamailio/kamailio/commit/7265f1cf7c57d258538119bc0d41146…
### Description
With the latest master, I am trying to register UE in the IMS core. In the S-CSCF Diameter MAR message Authentication scheme is sent as 'unknown".
With Kamailio 5.5.1 works fine.
What I see the problem appears because of the following commits:
6eb67eaa4fc27d1eb7da7b2b674ffe8e7f86ecbc pv: handle case when var value ha flag str but null pointer
ffe311939ebf58e7418940ec6c71bfaf9b21afad pv: fix condition in detecting the null string value when setting $var(...) - issue introduced in previous commit
Check the log messages below for detailed debug data.
pv $aa is empty but after line 711 $var(alg) is with len=1 and printed value '0'.
#### Reproduction
Try to Register UE to the IMS core with the latest master. Check MAR message AVP 612->avp 608 3GPP-SIP-Authentication-Scheme: unknown
#### Log Messages
In s-cscf kamailio.cfg route[REGISTER] I have the following code:
709 route[REGISTER] {
710 xlog("ALGORITHM IS [$aa] and User-Agent is [$ua]\n");
711 $var(alg) = $aa;
712 xlog("ALGORITHM IS [$var(alg)] and User-Agent is [$ua]\n");
733 #user has not been authenticated. Lets send a challenge via 401 Unauthorized
734 xlog("L_DBG","About to challenge! auth_ims\n");
735 ims_www_challenge("REG_MAR_REPLY", "$td", "$var(alg)");
736 exit;
**LOG from master branch:**
Log output for lines 710 and 712:
Nov 11 14:50:30 kamailio_scscf[31798]: 1(31851) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/etc/kamailio_scscf/kamailio.cfg] l=710 a=25 n=xlog
Nov 11 14:50:30 kamailio_scscf[31798]: 1(31851) ERROR: <script>: ALGORITHM IS [] and User-Agent is [EE VOLTE]
Nov 11 14:50:30 kamailio_scscf[31798]: 1(31851) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/etc/kamailio_scscf/kamailio.cfg] l=711 a=63 n=assign
Nov 11 14:50:30 kamailio_scscf[31798]: 1(31851) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/etc/kamailio_scscf/kamailio.cfg] l=712 a=25 n=xlog
Nov 11 14:50:30 kamailio_scscf[31798]: 1(31851) ERROR: <script>: ALGORITHM IS [0] and User-Agent is [EE VOLTE]
Added and debug log into authorize.c:356 file:
...
LM_DBG(" #################### Sending MAR - 0, algo.len=%d algo[%.*s]\n", algo.len, algo.len, algo.s);
....
Log output:
Nov 11 14:50:30 kamailio_scscf[31798]: 1(31851) DEBUG: ims_auth [authorize.c:356]: challenge(): #################### Sending MAR - 0, algo.len=1 algo[0]
**LOG from Kamailio 5.5.1:**
117528 Nov 11 14:43:53 kamailio_scscf[19016]: 1(19060) ERROR: <script>: ALGORITHM IS [] and User-Agent is [EE VOLTE]
117529 Nov 11 14:43:53 kamailio_scscf[19016]: 1(19060) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/etc/kamailio_scscf/kamailio.cfg] l=711 a=63 n=assign
117530 Nov 11 14:43:53 kamailio_scscf[19016]: 1(19060) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/etc/kamailio_scscf/kamailio.cfg] l=712 a=25 n=xlog
117531 Nov 11 14:43:53 kamailio_scscf[19016]: 1(19060) ERROR: <script>: ALGORITHM IS [] and User-Agent is [EE VOLTE]
Nov 11 14:43:53 mnc234 kamailio_scscf[19016]: 1(19060) DEBUG: ims_auth [authorize.c:356]: challenge(): #################### Sending MAR - 0, algo.len=0 algo[]]
#### SIP Traffic
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
version: kamailio 5.6.0-dev2 (x86_64/linux) ffe311-dirty
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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
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: ffe311 -dirty
compiled on 14:44:53 Nov 11 2021 with gcc 7.4.0
* **Operating System**:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
--
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/2928
I have compiled Kamailio with ASAN
When I start Kamailio I this error
```
core/re.c:390:2: runtime error: null pointer passed as argument 2, which is declared to never be null
```
[Link to code](https://github.com/kamailio/kamailio/blob/master/src/core/re.c#L390)
```
Breakpoint 1, replace_build (match=0xffffb0140fc0 "KZQ_CHECK_MEDIA_SERVER_INSERT", nmatch=1, pmatch=0xffffb01410a8, se=0xffffb00b9bc0, msg=0x332ebe0 <_faked_msg>,
rpl=0xffffb0141120) at core/re.c:390
390 RBUF_APPEND(dest, p, end-p);
(gdb)
Continuing.
Breakpoint 1, replace_build (match=0xffffb0162a78 "auth_cache=>size=16;autoexpire=7200;REGISTRAR_S_WARM_CACHE", nmatch=1, pmatch=0xffffb0162b60, se=0xffffb0162730,
msg=0x332ebe0 <_faked_msg>, rpl=0xffffb0162bd8) at core/re.c:390
390 RBUF_APPEND(dest, p, end-p);
(gdb) p p
$4 = 0x0
(gdb) list
385 default:
386 LM_CRIT("unknown type %d\n", se->replace[r].type);
387 /* ignore it */
388 }
389 }
390 RBUF_APPEND(dest, p, end-p);
391 rpl->len = dest - rbuf;
392 if ((rpl->s = pkg_malloc(rpl->len)) == NULL) {
393 PKG_MEM_ERROR;
394 goto error;
(gdb) bt
#0 replace_build (match=0xffffb0162a78 "auth_cache=>size=16;autoexpire=7200;REGISTRAR_S_WARM_CACHE", nmatch=1, pmatch=0xffffb0162b60, se=0xffffb0162730,
msg=0x332ebe0 <_faked_msg>, rpl=0xffffb0162bd8) at core/re.c:390
#1 0x0000000000f91dc4 in subst_run (se=0xffffb0162730, input=0xffffb0162a78 "auth_cache=>size=16;autoexpire=7200;REGISTRAR_S_WARM_CACHE", msg=0x332ebe0 <_faked_msg>,
count=0x0) at core/re.c:460
#2 0x0000000000f926a0 in subst_str (input=0xffffb0162a78 "auth_cache=>size=16;autoexpire=7200;REGISTRAR_S_WARM_CACHE", msg=0x332ebe0 <_faked_msg>, se=0xffffb0162730,
count=0x0) at core/re.c:502
#3 0x00000000011e7d0c in pp_subst_run (data=0x338ba20 <s_buf>) at core/ppcfg.c:216
#4 0x00000000018b1f98 in yylex () at core/cfg.lex:1278
#5 0x0000000001900660 in yyparse () at core/cfg.tab.c:5160
#6 0x000000000048c4e4 in main (argc=11, argv=0xfffffffff3b8) at main.c:2487
```
--
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/2932