### Description
We have various commercial UE's connecting over an Amarisoft Callbox Classic eNB with Open5GS core network. This issue concerns different UE behaviour.
Name checking code introduced between Kamailio v5.6.4 and v5.7.1 (udomain.c lines 580 to 599) leads to rejection of the SUBSCRIBE request from a Huawei UE (user-agent: IM-client/OMA1.0 HW-Rto/V1.0). SUBSCRIBE requests from a OnePlus UE (user-agent: OnePlus_KB2003_RPIA.201005.001) are accepted.
We assume that the behaviour of the commercial-off-the-shelf UE's complies with the 3GPP standards; but we do not know to what extent. The following code, however, caused our Huawei UE's to lose VoLTE capability, after updating the Kamailio IMS from v5.6.4 to v5.7.1.
```
580 if ((contact_info->aor.len>0) && (needle_uri.user.len != 0)){
581 if ((needle_uri.user.len != c->contact_user.len) ||
582 (memcmp(needle_uri.user.s, c->contact_user.s, needle_uri.user.len) != 0)) {
583 LM_ERR("user name does not match - no match here...\n");
584 LM_DBG("found pcontact username [%d]: [%.*s]\n", i, c->contact_user.len, c->contact_user.s);
585 LM_DBG("incoming contact username: [%.*s]\n", needle_uri.user.len, needle_uri.user.s);
586 c = c->next;
587 continue;
588 }
589 if ((contact_info->aor.len >= 4) && (memcmp(contact_info->aor.s, c->aor.s, 4) != 0)) { // do not mix up sip- and tel-URIs.
590 LM_ERR("scheme does not match - no match here...\n");
591 LM_DBG("found pcontact scheme [%d]: [%.*s]\n", i, 4, c->aor.s);
592 LM_DBG("incoming contact scheme: [%.*s]\n", 4, contact_info->aor.s);
593 c = c->next;
594 continue;
595 }
596 }
597 else{
598 LM_DBG("No user name present - abort user name check\n");
599 }
```
The above code also does not consider the reverse_search flag (uses c=c->next instead of c = reverse_search? c->prev : c->next), so if reverse_search is set, the code's behaviour may be incorrect.
In the following pcap file, the Huawei's SIP REGISTER process starts at packet 2, 200 OK arriving in packet 41, with the P-Associated-URI <sip:51194@ims.mnc001.mcc001.3gppnetwork.org>. This UE sends SUBSCRIBE (packet 47) incorporating a new Contact: <sip:51194@10.46.0.6:31896>, presumably derived from the P-Associated-URI; but receives "403 Forbidden - You must register first with a S-CSCF".
The Oneplus sends SIP REGISTER at packet 56, receiving 200 OK at packet 83 with P-Associated-URI <sip:51196@ims.mnc001.mcc001.3gppnetwork.org>. But this UE's SUBSCRIBE (packet 84) incorporates the same Contact used in the REGISTER request: <sip:c57d4262-e59d-4530-a0f4-b4faaa2fb1c6@10.46.0.8:5060>, and 200 OK arrives at packet 92.
[v571-pcscf-name-check-fail.zip](https://github.com/kamailio/kamailio/files/…
#### Debugging Data
None acquired
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
NB: log messages acquired prior to above pcap. The following extract shows failed name check (udomain.c lines 580 - 599) for username 51194, while 001010000051194 was registered:
```
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_registrar_pcscf [service_routes.c:210]: getContactP(): This is a request - using first via to find contact
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_registrar_pcscf [service_routes.c:218]: getContactP(): searching for contact with host:port:proto contact [1://10.46.0.6:31894]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:459]: get_pcontact_from_cache(): Searching for contact with AOR [sip:51194@10.46.0.6:31894] in P-CSCF usrloc based on VIA [1://10.46.0.6:31894] Received [1://10.46.0.6:31409], Search flag is 0, reverse_search 0
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:469]: get_pcontact_from_cache(): Have an AOR to search for
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:474]: get_pcontact_from_cache(): checking for rinstance
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [usrloc.c:157]: get_aor_hash(): Returning hash: [1746035570]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:509]: get_pcontact_from_cache(): get_pcontact slot is [370]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:513]: get_pcontact_from_cache(): comparing contact with aorhash [1746035570], aor [sip:001010000051194@10.46.0.6:5060]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:514]: get_pcontact_from_cache(): contact host [10.46.0.6:5060]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:515]: get_pcontact_from_cache(): contact received [2:10.46.0.6:5060]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:522]: get_pcontact_from_cache(): mached a record by aorhash: 1746035570
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:513]: get_pcontact_from_cache(): comparing contact with aorhash [1746035570], aor [sip:001010000051194@10.46.0.6:31894]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:514]: get_pcontact_from_cache(): contact host [10.46.0.6:31894]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:515]: get_pcontact_from_cache(): contact received [2:10.46.0.6:31409]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:522]: get_pcontact_from_cache(): mached a record by aorhash: 1746035570
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:541]: get_pcontact_from_cache(): matched contact ip address and port
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:569]: get_pcontact_from_cache(): found contact with URI [sip:001010000051194@10.46.0.6:31894]
Jul 18 12:15:31 corsa03 p-cscf[58090]: ERROR: ims_usrloc_pcscf [udomain.c:583]: get_pcontact_from_cache(): user name does not match - no match here...
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:584]: get_pcontact_from_cache(): found pcontact username [1]: [001010000051194]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:585]: get_pcontact_from_cache(): incoming contact username: [51194]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:643]: get_pcontact_from_cache(): contact not found in memory
Jul 18 12:15:31 corsa03 p-cscf[58090]: INFO: ims_registrar_pcscf [service_routes.c:277]: getContactP(): Contact not found based on Contact-header, trying IP/Port/Proto
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:459]: get_pcontact_from_cache(): Searching for contact with AOR [sip:51194@10.46.0.6:31894] in P-CSCF usrloc based on VIA [1://10.46.0.6:31894] Received [1://10.46.0.6:31409], Search flag is 1, reverse_search 0
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:469]: get_pcontact_from_cache(): Have an AOR to search for
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:474]: get_pcontact_from_cache(): checking for rinstance
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [usrloc.c:157]: get_aor_hash(): Returning hash: [1746035570]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:509]: get_pcontact_from_cache(): get_pcontact slot is [370]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:513]: get_pcontact_from_cache(): comparing contact with aorhash [1746035570], aor [sip:001010000051194@10.46.0.6:5060]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:514]: get_pcontact_from_cache(): contact host [10.46.0.6:5060]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:515]: get_pcontact_from_cache(): contact received [2:10.46.0.6:5060]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:522]: get_pcontact_from_cache(): mached a record by aorhash: 1746035570
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:546]: get_pcontact_from_cache(): continuing to match on received details
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:513]: get_pcontact_from_cache(): comparing contact with aorhash [1746035570], aor [sip:001010000051194@10.46.0.6:31894]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:514]: get_pcontact_from_cache(): contact host [10.46.0.6:31894]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:515]: get_pcontact_from_cache(): contact received [2:10.46.0.6:31409]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:522]: get_pcontact_from_cache(): mached a record by aorhash: 1746035570
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:546]: get_pcontact_from_cache(): continuing to match on received details
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:569]: get_pcontact_from_cache(): found contact with URI [sip:001010000051194@10.46.0.6:31894]
Jul 18 12:15:31 corsa03 p-cscf[58090]: ERROR: ims_usrloc_pcscf [udomain.c:583]: get_pcontact_from_cache(): user name does not match - no match here...
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:584]: get_pcontact_from_cache(): found pcontact username [1]: [001010000051194]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:585]: get_pcontact_from_cache(): incoming contact username: [51194]
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_usrloc_pcscf [udomain.c:643]: get_pcontact_from_cache(): contact not found in memory
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_registrar_pcscf [service_routes.c:282]: getContactP(): No entry in usrloc for 10.46.0.6:31409 (Proto 1) found!
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: ims_registrar_pcscf [service_routes.c:319]: getContactP(): Asserted identity not set
Jul 18 12:15:31 corsa03 p-cscf[58090]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[MO] c=[/etc/kamailio/pcscf/route/mo.cfg] l=16 a=26 n=send_reply
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: sl [sl.c:310]: send_reply(): reply in stateless mode (sl)
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: <core> [core/receive.c:126]: sip_check_fline(): first line indicates a SIP reply
Jul 18 12:15:31 corsa03 p-cscf[58090]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[MO] c=[/etc/kamailio/pcscf/route/mo.cfg] l=17 a=2 n=exit
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: <core> [core/receive.c:528]: receive_msg(): request-route executed in: 4219 usec
Jul 18 12:15:31 corsa03 p-cscf[58090]: DEBUG: <core> [core/usr_avp.c:637]: destroy_avp_list(): destroying list 0x7f043587bfc0
```
### Possible Solutions
Commenting out udomain.c lines 580-599 allowed both UE's to complete their SUBSCRIBE's, and make VoLTE calls. In the following pcap, the Oneplus REGISTER's and SUBSCRIBE's over packets 1 to 37; the Huawei process occurs from packets 45 to 98.
[v571-pcscf-name-check-skipped.zip](https://github.com/kamailio/kamailio/fil…
### Additional Information
```
version: kamailio 5.7.1 (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, MEM_JOIN_FREE, 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: unknown
```
* **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 `lsb_release -a` and `uname -a`)
-->
```
Linux corsa03 6.5.?-gentoo-x86_64 #2 SMP PREEMPT_DYNAMIC <not recorded> CEST 2023 x86_64 AMD EPYC 7513 32-Core Processor AuthenticAMD GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3646
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3646(a)github.com>
### Description
This is an umbrella ticket to address issues with the WIP `tls_wolfssl` module
### Expected behavior
The module behaves robustly under load testing and various configurations
and thus can be accepted long-term in kamailio
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3160
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3160(a)github.com>
Compile tls_wolfssl error:
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
./configure: line 6164: syntax error near unexpected token `2.4.2'
./configure: line 6164: `LT_PREREQ(2.4.2)'
make[2]: *** [Makefile:21: ../../../misc/external/wolfssl/build/include/wolfssl/options.h] Error 2
make[1]: *** [Makefile:508: modules] Error 1
make[1]: Leaving directory '/usr/local/src/kamailio-5.7/src'
make: *** [Makefile:34: all] Error 2
Please check, thanks
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3610
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3610(a)github.com>
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
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 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
When using the PATH header option to keep track of original Kamailio node that received the REGISTER, if nathelper is also used with SIP ping enabled, the SIP OPTIONS is sent to itself following the PATH header and not sent directly to the destination.
The nathelper/user location modules should have a flag similar to the "path_check_local" of the registrar module, which is meant to avoid looping the message to itself in case the next hop pointed by the PATH header is "myself".
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
Configure the registrar module to support PATH and before saving the contact info add the PATH header with the local Kamailio information. Also make sure to have the nathelper and usrloc modules configured to send the keepalive SIP OPTIONS to the registered extensions.
By the time the SIP OPTIONS is sent, Kamailio sends to itself, then the message has to be loose_route'd to the final destination.
This could be avoided by having the nathelper module to identify the next hop is Kamailio itself skipping this destination as a call to "lookup()" does for the registrar module when the flag path_check_local is true.
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
172.128.128.10 is the Kamailio IP and 172.128.128.20 is the extension IP
```
11:51:07.224713 IP (tos 0x60, ttl 64, id 64497, offset 0, flags [none], proto UDP (17), length 518)
172.128.128.10.5060 > 172.128.128.10.5060: SIP, length: 490
OPTIONS sip:345671002@172.128.128.20:5060;rinstance=d1eb3444a5cec5a1;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 172.128.128.10:5060;branch=z9hG4bK2540713
Route: <sip:172.128.128.10:5060;received=sip:172.128.128.20:5060;lr;cluster_node=192.168.156.10:5060>
From: sip:sbc@mydomain.com;tag=uloc-5d2e6499-2fb5-1-0-c15309d2
To: sip:345671002@172.128.128.20:5060;rinstance=d1eb3444a5cec5a1;transport=UDP
Call-ID: 40ee1573-7506bba3-5e30c05(a)172.128.128.10
CSeq: 1 OPTIONS
Content-Length: 0
11:51:07.226132 IP (tos 0x60, ttl 64, id 44359, offset 0, flags [none], proto UDP (17), length 502)
172.128.128.10.5060 > 172.128.128.20.5060: SIP, length: 474
OPTIONS sip:345671002@172.128.128.20:5060;rinstance=d1eb3444a5cec5a1;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 172.128.128.10;branch=z9hG4bKb958.b807e80b742db62504a45220d8f0e974.0
Via: SIP/2.0/UDP 172.128.128.10:5060;branch=z9hG4bK2540713
From: sip:sbc@mydomain.com;tag=uloc-5d2e6499-2fb5-1-0-c15309d2
To: sip:345671002@172.128.128.20:5060;rinstance=d1eb3444a5cec5a1;transport=UDP
Call-ID: 40ee1573-7506bba3-5e30c05(a)172.128.128.10
CSeq: 1 OPTIONS
Content-Length: 0
11:51:07.303474 IP (tos 0x0, ttl 128, id 10816, offset 0, flags [none], proto UDP (17), length 786)
172.128.128.20.5060 > 172.128.128.10.5060: SIP, length: 758
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.128.128.10;branch=z9hG4bKb958.b807e80b742db62504a45220d8f0e974.0
Via: SIP/2.0/UDP 172.128.128.10:5060;branch=z9hG4bK2540713
Contact: <sip:172.128.128.20:5060>
To: <sip:345671002@172.128.128.20:5060;rinstance=d1eb3444a5cec5a1;transport=UDP>;tag=bb0c1f2d
From: sip:sbc@mydomain.com;tag=uloc-5d2e6499-2fb5-1-0-c15309d2
Call-ID: 40ee1573-7506bba3-5e30c05(a)172.128.128.10
CSeq: 1 OPTIONS
Accept: application/sdp, application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 3.15.40006 rv2.8.20
Allow-Events: presence, kpml, talk
Content-Length: 0
11:51:07.306821 IP (tos 0x60, ttl 64, id 64570, offset 0, flags [none], proto UDP (17), length 727)
172.128.128.10.5060 > 172.128.128.10.5060: SIP, length: 699
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.128.128.10:5060;branch=z9hG4bK2540713
Contact: <sip:172.128.128.20:5060;alias=172.128.128.20~5060~1>
To: <sip:345671002@172.128.128.20:5060;rinstance=d1eb3444a5cec5a1;transport=UDP>;tag=bb0c1f2d
From: sip:sbc@mydomain.com;tag=uloc-5d2e6499-2fb5-1-0-c15309d2
Call-ID: 40ee1573-7506bba3-5e30c05(a)172.128.128.10
CSeq: 1 OPTIONS
Accept: application/sdp, application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 3.15.40006 rv2.8.20
Allow-Events: presence, kpml, talk
Content-Length: 0
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
Not found.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
# kamailio -v
version: kamailio 5.2.2 (x86_64/linux) 67f967
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, 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: 67f967
compiled on 11:40:41 Mar 11 2019 with gcc 4.8.5
```
* **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`)
-->
```
# uname -a
Linux kamailio-1 3.10.0-514.21.2.el7.x86_64 #1 SMP Tue Jun 20 12:24:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
```
--
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/2011
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
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 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
when i make websocket module:
ws_frame.c:32:20: fatal error: unistr.h: No such file or directory
#include <unistr.h>
^
compilation terminated.
make: *** [ws_frame.o] Error 1
OS:
centos7
and i try reinstall libunistring,Still failed
--
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/2020
#### Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
This is the selectors feature for `lost` module.
The module still in development but the core functionality is working.
What need to do
1. separate feature into dedicated `.c` file;
2. rebase on current `lost` implementation;
3. add documentation;
4. add a unit test.
Would be fine if we can merge this into 5.5.
This branch based on e7d68556e3560f488c4f421731f78b3f9abe549e commit
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2705
-- Commit Summary --
* http_client: http_client_request (api) content-type header support
* lost: new features, attributes and a new function to dereference location
* lost: bug-fix due to a code formatting error
* lost: DOM level count fix
* http_client: duplicated code removed
* lost: README update
* lost: memory leak fix and code refactoring
* lost: implemented sectors
-- File Changes --
M src/modules/http_client/curl_api.c (1)
M src/modules/http_client/curl_api.h (3)
M src/modules/http_client/functions.c (30)
M src/modules/http_client/functions.h (14)
M src/modules/lost/doc/lost.xml (2)
M src/modules/lost/doc/lost_admin.xml (172)
M src/modules/lost/functions.c (921)
M src/modules/lost/functions.h (3)
M src/modules/lost/lost.c (754)
A src/modules/lost/naptr.c (255)
A src/modules/lost/naptr.h (38)
M src/modules/lost/pidf.c (5)
A src/modules/lost/response.c (991)
A src/modules/lost/response.h (131)
M src/modules/lost/utilities.c (532)
M src/modules/lost/utilities.h (65)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2705.patchhttps://github.com/kamailio/kamailio/pull/2705.diff
--
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/pull/2705
version: kamailio 5.5.6 (x86_64/linux) 21a9bc
Operating System: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 5.10.0-22-amd64
we see this core it has repeated some times in different days
```
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007fde2329f537 in __GI_abort () at abort.c:79
#2 0x000055d5fab45995 in sig_alarm_abort (signo=14) at main.c:699
#3 <signal handler called>
#4 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:37
#5 0x00007fde1c80a015 in futex_get (lock=0x7fdd9f9c9ca4) at ../../core/mem/../futexlock.h:108
#6 0x00007fde1c80c526 in destroy_linkers (linker=0x0) at dlg_profile.c:275
#7 0x00007fde1c7f87b3 in destroy_dlg (dlg=0x7fddad479ea0) at dlg_hash.c:377
#8 0x00007fde1c7f8ca0 in destroy_dlg_table () at dlg_hash.c:438
#9 0x00007fde1c790286 in mod_destroy () at dialog.c:809
#10 0x000055d5fad76dd8 in destroy_modules () at core/sr_module.c:842
#11 0x000055d5fab440e2 in cleanup (show_status=1) at main.c:575
#12 0x000055d5fab45d45 in shutdown_children (sig=15, show_status=1) at main.c:718
#13 0x000055d5fab49129 in handle_sigs () at main.c:816
#14 0x000055d5fab56959 in main_loop () at main.c:1903
#15 0x000055d5fab602e9 in main (argc=15, argv=0x7ffd9451bbb8) at main.c:3061
(gdb) bt full
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
set = {__val = {8192, 0 <repeats 15 times>}}
pid = <optimized out>
tid = <optimized out>
ret = <optimized out>
#1 0x00007fde2329f537 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0 <repeats 16 times>}}, sa_flags = 0, sa_restorer = 0x55d5faf6b088}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x000055d5fab45995 in sig_alarm_abort (signo=14) at main.c:699
__func__ = "sig_alarm_abort"
#3 <signal handler called>
No locals.
#4 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:37
No locals.
#5 0x00007fde1c80a015 in futex_get (lock=0x7fdd9f9c9ca4) at ../../core/mem/../futexlock.h:108
v = 2
i = 1024
#6 0x00007fde1c80c526 in destroy_linkers (linker=0x0) at dlg_profile.c:275
p_entry = 0x7fdd9f9c9d88
l = 0x7fddd2aca430
lh = 0x55d5faf81a03
__func__ = "destroy_linkers"
#7 0x00007fde1c7f87b3 in destroy_dlg (dlg=0x7fddad479ea0) at dlg_hash.c:377
ret = 1
var = 0x7fde1c719a44 <mod_destroy+859>
--Type <RET> for more, q to quit, c to continue without paging--
__func__ = "destroy_dlg"
#8 0x00007fde1c7f8ca0 in destroy_dlg_table () at dlg_hash.c:438
dlg = 0x0
l_dlg = 0x7fddad479ea0
i = 0
__func__ = "destroy_dlg_table"
#9 0x00007fde1c790286 in mod_destroy () at dialog.c:809
No locals.
#10 0x000055d5fad76dd8 in destroy_modules () at core/sr_module.c:842
t = 0x7fde1f328018
foo = 0x7fde1f327838
__func__ = "destroy_modules"
#11 0x000055d5fab440e2 in cleanup (show_status=1) at main.c:575
memlog = 0
__func__ = "cleanup"
#12 0x000055d5fab45d45 in shutdown_children (sig=15, show_status=1) at main.c:718
__func__ = "shutdown_children"
#13 0x000055d5fab49129 in handle_sigs () at main.c:816
chld = 0
chld_status = 139
any_chld_stopped = 1
memlog = 0
__func__ = "handle_sigs"
#14 0x000055d5fab56959 in main_loop () at main.c:1903
i = 14
pid = 3845341
--Type <RET> for more, q to quit, c to continue without paging--
si = 0x0
si_desc = "udp receiver child=13 sock=87.237.87.28:5060\000\000\000\000\300\272Q\224\375\177\000\000\000\000\000\000\000\000\000\000\003\032\370\372\325U\000\000-\000\000\000\000\000\000\000\200\003\062\037\336\177\000\000F\034\067#\336\177\000\000\060\000\000\000\060\000\000\000x\266Q\224\375\177\000\000\220\265Q\224\375\177\000\000\000\230\026︾\314\""
nrprocs = 14
woneinit = 1
__func__ = "main_loop"
#15 0x000055d5fab602e9 in main (argc=15, argv=0x7ffd9451bbb8) at main.c:3061
cfg_stream = 0x55d5fbd3f2e0
c = -1
r = 0
tmp = 0x7ffd9451ce7c ""
tmp_len = 832
port = 832
proto = 832
ahost = 0x0
aport = 0
options = 0x55d5faf6e0b8 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 4110196155
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0x98000000980
p = 0xc2 <error: Cannot access memory at address 0xc2>
st = {st_dev = 23, st_ino = 946, st_nlink = 2, st_mode = 16832, st_uid = 0, st_gid = 998, __pad0 = 0, st_rdev = 0, st_size = 140, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1696021490, tv_nsec = 675255852},
--Type <RET> for more, q to quit, c to continue without paging--
st_mtim = {tv_sec = 1696418622, tv_nsec = 168794592}, st_ctim = {tv_sec = 1696418622, tv_nsec = 168794592}, __glibc_reserved = {0, 0, 0}}
tbuf = "P\267Q\224\375\177\000\000\310e)#\336\177\000\000\020\204]#\336\177\000\000\000\000\000\000\000\000\000\000зQ\224\375\177\000\000\000\000\000\000\000\000\000\000зQ\224\375\177", '\000' <repeats 18 times>, "`g^#\336\177\000\000\350$a#\336\177\000\000\204i^#\336\177\000\000\060d^#\336\177\000\000H\020a#\336\177\000\000\000`^#\336\177\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000@\"(#\336\177", '\000' <repeats 66 times>...
option_index = 0
long_options = {{name = 0x55d5faf70526 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55d5faf6b51c "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55d5faf7052b "alias", has_arg = 1, flag = 0x0,
val = 1024}, {name = 0x55d5faf70531 "subst", has_arg = 1, flag = 0x0, val = 1025}, {name = 0x55d5faf70537 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x55d5faf70540 "substdefs", has_arg = 1, flag = 0x0,
val = 1027}, {name = 0x55d5faf7054a "server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x55d5faf70554 "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x55d5faf7055f "modparam", has_arg = 1,
flag = 0x0, val = 1030}, {name = 0x55d5faf70568 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x55d5faf70573 "debug", has_arg = 1, flag = 0x0, val = 1032}, {name = 0x55d5faf70579 "cfg-print",
has_arg = 0, flag = 0x0, val = 1033}, {name = 0x55d5faf70583 "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
__func__ = "main"
(gdb)
```
could it be related to any type of message that is making the kamailio crush?
thanks a lot and regards
david
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3593
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3593(a)github.com>
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
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
I have 2 jsonrpc servers configured with different prio's. For testing, I have the servers configured to always delay the response to any request by more than the module's timout setting.
The (initial) request is sent to the first server. As this one times out, I would expect a retry to go to the second servers, but instead, all retries are sent to the same server. The backup server is never contacted. This makes the whole "prio" system seem a bit useless.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
```
modparam("janssonrpcc", "server", "conn=test;addr=pc1;port=8081;priority=5;weight=10")
modparam("janssonrpcc", "server", "conn=test;addr=pc1;port=8082;priority=5;weight=10")
```
```
janssonrpc_request("test", "Test.Timeout", '[ { "Timout": 1000} ]', "route=JSONRPC_RESPONSE;retry=10;timeout=1000");
```
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Log Messages
No useful logs are produced. I verified the described behavior on the jsonrpc server.
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
2023-02-23T16:59:34.585346+01:00 pc1 proxy1[340870]: INFO: janssonrpcc [janssonrpc_connect.c:361]: bev_connect(): Connecting to server pc1:8081 for conn rating.
2023-02-23T16:59:34.585420+01:00 pc1 proxy1[340870]: INFO: janssonrpcc [janssonrpc_connect.c:361]: bev_connect(): Connecting to server pc1:8082 for conn rating.
2023-02-23T16:59:34.585446+01:00 pc1 proxy1[340870]: INFO: janssonrpcc [janssonrpc_connect.c:290]: bev_connect_cb(): Connected to host pc1:8081
2023-02-23T16:59:34.585462+01:00 pc1 proxy1[340870]: INFO: janssonrpcc [janssonrpc_connect.c:290]: bev_connect_cb(): Connected to host pc1:8082
2023-02-23T17:05:10.903398+01:00 pc1 proxy1[340870]: WARNING: janssonrpcc [janssonrpc_request.c:247]: schedule_retry(): Number of retries exceeded. Failing request.
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
Retry in combination with a timeout and prio's is a bit tricky. When do what? Just retrying on the first prio makes the lower prio servers completely useless, while going to the next prio on every retry skips possibly useful high-prio servers and may exhaust the number of candidate servers very fast.
Best solution IMHO would be to first try every server in the highest prio, before going to the next prio. Do not do (exponential) backoff between these steps.
If there are still retries remaining after that, wrap around to the highest prio with the exponentional backoff delay.
With the above, failover considers all servers and failover between servers is fast while not overloading a single server.
BTW. If I configure multiple servers per prio, it seems to randomly select one of them for every (re)try. It never selects one form the next prio.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
5.6.1
```
* **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 `lsb_release -a` and `uname -a`)
-->
```
(paste your output here)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3378
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3378(a)github.com>