[SR-Users] random incorrect method parsing
Daniel-Constantin Mierla
miconda at gmail.com
Wed Dec 9 08:54:19 CET 2015
Hello,
can you change the sources and replace:
DBG(" method: <%.*s>\n",fl->u.request.method.len,
ZSW(fl->u.request.method.s));
with:
DBG(" method: <%.*s> (%d)\n",fl->u.request.method.len,
ZSW(fl->u.request.method.s), fl->u.request.method.len);
inside parser/msg_parser.c +625
Then recompile, reinstall and wait for same case again.
Maybe there is a '\0', although the logs are not showing it. Or the
length is not properly set.
Cheers,
Daniel
On 08/12/15 16:21, Vasiliy Ganchev wrote:
> Hi folk!
>
> Have a strange issue, and cannot understand what is wrong.
> Test scheme UA(sip) -> INVITE -> Kamailio
> The transport protocol used is TCP.
> The issue is reproduced randomly, in case of wrong INVITE, Kamailio does not
> parse Method from R-URI and answer "400 CSeq method does not match request
> method".
> The log with debug level 3 for such INVITE:
> https://gist.github.com/vance-od/c4e1c783adba02d80c58
>
> my first confuse is why in line 2 different number of bytes: "read= 1025
> bytes, parsed=1037"
> the second is in line 12: Method value is empty
> after this everithing brokes and kamailio answers 400.
>
> Just another call: the same setup (same device, kamailio instance etc), same
> conditions, just another call. Everything is OK, similar part for good call:
> https://gist.github.com/vance-od/01b5dff2d81f0878cff4
>
> All my attempts to find the diff between to messages goes to nothing, the 2
> INVITEs looks similar, the wireshark analyse of TCP level - also had no
> result (all is similar)
>
> The issue happens only with one of our devices and only in case of TCP/TLS
> (UDP constantly ok, this is why I am assured the problem is in device, but I
> need proofs)
>
> version: kamailio 4.2.5 (i386/linux)
> flags: STATS: Off, EXTRA_DEBUG, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS,
> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
> F_MALLOC, DBG_F_MALLOC, 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.
>
> will appreciate any help or idea ,with such a mess!
>
> Cheers!
>
>
>
> --
> View this message in context: http://sip-router.1086192.n5.nabble.com/random-incorrect-method-parsing-tp143749.html
> Sent from the Users mailing list archive at Nabble.com.
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu
More information about the sr-users
mailing list