Hi guys,
I am trying to parse CallID from received message in SREV_NET_DGRAM_IN callback.

I am doing so with this piece of code:

https://gist.github.com/ivanbarlog/e475a8443fd15b3c155a

in skip_message() function I am checking if the message is one of Dialog creating SIP messages eg. INVITE request or ~200 response with Cseq method INVITE.

Unfortunately I am getting really weird results from parse_headers, eg. when I am trying to print out the call_id sometime I am getting correct result so the Call-ID is printed (I am checking by sniffing with WIreshark and also by checking Kamailio logs) but other time I am getting random string from message headers.

Any help is appreciated