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.txt)
[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
_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to