I am sorry it seems that error was in my code.
Actually I am persisting parsed Call ID in my custom structure as a key for
searching between nodes and unfortunately I was saving just reference to
parsed str structure. That means that I didn't save actual copy of string
and when another message appeared I was trying to parse previously saved
Call ID from the body of new message.
Sorry guys, my bad. But at least I learned something new :)
On Sun, Apr 12, 2015 at 11:51 PM, Cockhootec Yahrabee <cockootec(a)gmail.com>
wrote:
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