@henningw this is wrong no?
it should be
```
pkg_free(bmt->start);
shm_free(bmt);
```
instead.
you can't access ``bmt->start`` if you freed ``bmt`` first, no?
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/d7770cae2ee68be7184298b2bb41cb0…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/d7770cae2ee68be7184298b2bb41cb0ba3ebb47d/105547932(a)github.com>
In the above case, `SHM_MEM_ERROR` is losing the usefulness of the previous version of the log message, there is `SHM_MEM_ERROR_FMT` that should be used.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/0702a7e0d9df2867cbc86188c06d953…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/0702a7e0d9df2867cbc86188c06d95363d484d5a/105546658(a)github.com>
Probably the `parse_error` label should be replaced by `error` and all `goto`'s point to it. `parse_error` is used for other cases like target pv not being writeable, it's difference comparing with `error` is printing more context info about the position in the string where the error happens.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/01e82b38c41d344c1e94b2e0f574981…
You are receiving this because you commented.
Message ID: <kamailio/kamailio/commit/01e82b38c41d344c1e94b2e0f574981ef0ce4318/105547846(a)github.com>
Is it intended to jump to `error` instead of `parse_error` now? @pantelisk98 @henningw
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/01e82b38c41d344c1e94b2e0f574981…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/01e82b38c41d344c1e94b2e0f574981ef0ce4318/105530322(a)github.com>
### Description
We have faced an issue which appears when TOPOH module is enabled, call is made from WebRTC client, then transferred by callee.
#### Scenario
WebRTC client behind load balancer makes call to softphone, call from softphone is transferred to external number using Asterisk.
#### Expected result
When call is hanged up on external number side, call should be hanged up on WebRTC client side.
#### Actual result
When call is hanged up on external number side, call is not hanged up on WebRTC client side.
### Troubleshooting
#### Legend
10.5.0.145 - load balancer
10.128.150.67 - WebRTC client
10.181.0.1 - kamailio
10.5.2.192 - asterisk
#### Log Messages
On transfer:
https://pastebin.com/H3FQ4Kpj
On hangup from external number side:
https://pastebin.com/wgfRzGbd
On hangup from WebRTC client side:
https://pastebin.com/sE0yhBae
#### SIP Traffic
Faulty case with TOPOH module enabled:
[topoh_on.csv](https://github.com/kamailio/kamailio/files/11028205/topoh_on.…
Normal behavior with TOPOH module disabled:
[topoh_off.csv](https://github.com/kamailio/kamailio/files/11028206/topoh_of…
#### Config files
kamailio.cfg:
[kamailio.txt](https://github.com/kamailio/kamailio/files/11028283/kamailio.…
kamailio-local.cfg enabled toggles:
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
#!define WITH_DISPATCHER
#!define WITH_HOMER
#!define WITH_PSTN
#!define WITH_TOPOH
#!define WITH_CUSTOM_HEADERS
#!define WITH_PROM
#!define WITH_DMQ
#!define WITH_NAT
#!define WITH_XXXX_HEADERS
#!define WITH_TLS
#!define WITH_WEBSOCKET
#!define WITH_VOIP_AUTH
#!define WITH_ADVERTISE
#!define WITH_JSONRPC
#!define WITH_TCP
#!define WITH_DIALOG
#!define WITH_DIFF_PROVIDER_SRC_IP
#!define WITH_UAC
#!define WITH_DEV
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.6.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, 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
compiled on 09:11:15 Nov 15 2022 with gcc 9.3.0
```
* **Operating System**:
```
dockerized kamailio running on Ubuntu 16.04.3 LTS
Docker version 18.03.1-ce, build 9ee9f40
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3398
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3398(a)github.com>
Hi Kamailio,
We have noticed that a request not belonging to a dialog (e.g. a SIP MESSAGE) missing the tag= parameter in the from: header will trigger an ERROR: message like.
````
Mar 21 14:40:23 ip-10-85-164-143 /usr/sbin/kamailio[172]: ERROR: dialog [dlg_handlers.c:726]: pre_match_parse(): failed to get From header
````
````
Mar 21 14:42:31 ip-10-85-165-13 /usr/sbin/kamailio[183]: ERROR: tmx [tmx_pretran.c:227]: tmx_check_pretran(): failed to get From header
````
According to our interpretation of 3261 section 12.1.1
````
"A UAS MUST be prepared to receive a
request without a tag in the From field, in which case the tag is
considered to have a value of null."
````
this should not be the case. Also the BNF states no from: tag: is mandatory
```
From = ( "From" / "f" ) HCOLON from-spec
from-spec = ( name-addr / addr-spec )
*( SEMI from-param )
from-param = tag-param / generic-param
tag-param = "tag" EQUAL token
```
We believe this to be implemented in at least two places where one example is in the `dlg_handler` where `pre_match_parse` check
```
if (parse_from_header(req) < 0 || get_from(req)->tag_value.len == 0) {
LM_ERR("failed to get From header\n");
return -1;
}
```
As our interpretation of the standard is that the from: tag is not mandatory, hence we can't require our customer to change their behaviour, we consider this as a bug.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3399
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3399(a)github.com>
Module: kamailio
Branch: master
Commit: 9cc9a177daf6d5ce11fbdef714bd576716dc5a2f
URL: https://github.com/kamailio/kamailio/commit/9cc9a177daf6d5ce11fbdef714bd576…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-03-20T16:56:03+01:00
p_usrloc: use PRIu64 macro to find out what format is needed for uint64_t since it depends on architecture
---
Modified: src/modules/p_usrloc/ul_check.c
---
Diff: https://github.com/kamailio/kamailio/commit/9cc9a177daf6d5ce11fbdef714bd576…
Patch: https://github.com/kamailio/kamailio/commit/9cc9a177daf6d5ce11fbdef714bd576…
---
diff --git a/src/modules/p_usrloc/ul_check.c b/src/modules/p_usrloc/ul_check.c
index dfc062f266..0ed32dc99f 100644
--- a/src/modules/p_usrloc/ul_check.c
+++ b/src/modules/p_usrloc/ul_check.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <inttypes.h>
#include <stdint.h>
#include "../../core/mem/shm_mem.h"
@@ -136,7 +137,7 @@ int must_retry(time_t *timer, time_t interval){
if(!timer){
return -1;
}
- LM_DBG("must_retry: time is at %llu, retry at %llu.\n", (uint64_t)time(NULL),
+ LM_DBG("must_retry: time is at %" PRIu64 ", retry at %" PRIu64 ".\n", (uint64_t)time(NULL),
(uint64_t)(*timer));
if(*timer <= time(NULL)){
*timer = time(NULL) + interval;
Module: kamailio
Branch: master
Commit: 135f7b5e2114617b0bc408175ec146d248d01d3a
URL: https://github.com/kamailio/kamailio/commit/135f7b5e2114617b0bc408175ec146d…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2023-03-20T11:01:25+01:00
modules: readme files regenerated - ims_registrar_pcscf ... [skip ci]
---
Modified: src/modules/ims_registrar_pcscf/README
---
Diff: https://github.com/kamailio/kamailio/commit/135f7b5e2114617b0bc408175ec146d…
Patch: https://github.com/kamailio/kamailio/commit/135f7b5e2114617b0bc408175ec146d…
---
diff --git a/src/modules/ims_registrar_pcscf/README b/src/modules/ims_registrar_pcscf/README
index 3bfb0e6003..02327a005c 100644
--- a/src/modules/ims_registrar_pcscf/README
+++ b/src/modules/ims_registrar_pcscf/README
@@ -312,6 +312,33 @@ pcscf_save("location");
* domain - Logical domain within the registrar. If a database is used
then this must be name of the table which stores the contacts.
+ The return code may have the following values:
+ * ( 1) OK
+ * (-1) Parsing of contact data failed
+ * (-2) Deregistration in progress
+
+ For db_mode = DB_ONLY (3) setting for ims_usrloc_pcscf module modparam
+ following logic is implemented:
+ * To avoid race time conditions between a REREGISTER and the expiry
+ handler state machine in the scscf an approach is chosen to refuse
+ a REREGISTER in time window of 20 seconds after pcontact expiry on
+ the pcscf (thus allowing expiry handling to finish). REREGISTER is
+ refused in this scenario with return code -2.
+ * In case a REREGISTER arrives at pcscf and the respective pcontact
+ is expired longer than time window of 20 seconds registration also
+ is refused with return code -2 and additionaly PUBLISH is sent to
+ scscf with expiry = 0.
+ * The rc -2 shall be handled in register.cfg script as follows:
+ pcscf_save_pending("location");
+ switch ($retcode) {
+ case -1:
+ .......
+ case -2:
+ send_reply("500", "Deregister in progress - Please try again");
+ exit;
+ break;
+ }
+
4.3. pcscf_follows_service_routes(domain)
Returns true, if the request is following the "learned" service-routes
Module: kamailio
Branch: master
Commit: 38d72c3f8248b32b3ba0ff24abd1f2f7407f9d8f
URL: https://github.com/kamailio/kamailio/commit/38d72c3f8248b32b3ba0ff24abd1f2f…
Author: Annemarie Mandl <mandl(a)rpmbld.novalocal>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2023-03-20T10:57:21+01:00
ims_registrar_pcscf: changes for ul db_mode DB_ONLY
Enable registration of pcscf contact callback during download
from db location table and inserting pcontact (normally this
callback is registered during handling of REGISTER).
Refuse REGISTER when pcontact is expired since [0 to 20] seconds.
Within this time window a NOTIFY is expected from scscf and in order
to avoid race time conditions between scscf and pcscf REGISTER
will be refused. Refuse REGISTER when pcontact is expired longer
than 20 seconds - send PUBLISH (contact expired) to scscf to trigger
NOTIFY. In both REGISTER refused scenarios routing script should reply
500 - Deregistration in progress.
undo changes in ul_callback.c & ul_callback.h
corrections after comments from Henning
---
Modified: src/modules/ims_registrar_pcscf/doc/ims_registrar_pcscf_admin.xml
Modified: src/modules/ims_registrar_pcscf/ims_registrar_pcscf_mod.c
Modified: src/modules/ims_registrar_pcscf/notify.c
Modified: src/modules/ims_registrar_pcscf/save.c
---
Diff: https://github.com/kamailio/kamailio/commit/38d72c3f8248b32b3ba0ff24abd1f2f…
Patch: https://github.com/kamailio/kamailio/commit/38d72c3f8248b32b3ba0ff24abd1f2f…