db_load: enable/disable loading from the database on mod_init (except when in db_mode 4 /READ_ONLY)
db_insert_update: insert into table, update on duplicate key
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1048
-- Commit Summary --
* usrloc: adding params
-- File Changes --
M src/modules/usrloc/doc/usrloc_admin.xml (42)
M src/modules/usrloc/ucontact.c (16)
M src/modules/usrloc/usrloc_mod.c (7)
M src/modules/usrloc/usrloc_mod.h (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1048.patchhttps://github.com/kamailio/kamailio/pull/1048.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/1048
Hi,
Kamailio crashes when we handle a 302 redirect and the reply is a 404.
> # kamailio -v
> version: kamailio 4.4.4 (x86_64/linux)
> flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, 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_LISTEN 16, 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 4.9.2
root@14cn5:/home/joel/files#
This works:
> softphone1 > kamailio1 > server1 > 302 > kamailio1 > server2 > 200 OK
This crashes:
> softphone1 > kamailio1 > server1 > 302 > kamailio1 > server2 > 404 Not Found
I'm attaching debug logs, sip traces and the bt full from backtrace.
IPs:
> A.B.C.D = Kamailio IP
> E.F.G.H = Softphone IP
> I.J.K.L1 = dispatcher node1
> I.J.K.L2 = dispatcher node2
In the config we send INVITE requests to a dispatcher group (very simple config).
Then, in failure_route we have:
```
if (t_check_status("302")) {
xlog("L_NOTICE", "Redirecting to TestName: $T_rpl($ct) - M=$rm R=$ru ID=$ci\n");
get_redirects("*");
route(RELAY);
}
```
And call get redirected to the address of the contact in the 302.
If the new INVITE to that address gets a 200, all works, if that request gets a 404, Kamailio crashes.
Please let me know if you need more info, this is 100% reproducible on our platform.
Thank you!
Joel.
[backtrace.txt](https://github.com/kamailio/kamailio/files/623307/backtrace.…
[debug.txt](https://github.com/kamailio/kamailio/files/623308/debug.txt)
[sip.txt](https://github.com/kamailio/kamailio/files/623309/sip.txt)
--
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/875
This pull request is including two commits
1: adding `db_postgres` insert_update support
2: adding new parameters to `usrloc` that are not changing the default behaviour.
I added both to the same PR to highlight that the usage of insert_update will be immediately available for `usrloc` with `db_postgres` and `db_mysql` (maybe others, the ones not supporting it will simply revert to normal insert)
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1044
-- Commit Summary --
* db_postgress: insert_update() with DO UPDATE
* usrloc: adding params
-- File Changes --
M src/modules/db_postgres/db_postgres.c (1)
M src/modules/db_postgres/db_postgres.h (2)
M src/modules/db_postgres/km_dbase.c (216)
M src/modules/db_postgres/km_dbase.h (15)
M src/modules/db_postgres/km_pg_con.c (4)
M src/modules/db_postgres/km_res.c (1)
M src/modules/db_postgres/pg_mod.c (4)
M src/modules/usrloc/doc/usrloc_admin.xml (42)
M src/modules/usrloc/ucontact.c (16)
M src/modules/usrloc/usrloc_mod.c (7)
M src/modules/usrloc/usrloc_mod.h (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1044.patchhttps://github.com/kamailio/kamailio/pull/1044.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/1044