osip-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [osip-dev] Need a help : To find out the SIP message boundaries in a


From: Aymeric Moizard
Subject: Re: [osip-dev] Need a help : To find out the SIP message boundaries in a single TCP stream
Date: Tue, 26 May 2015 14:45:43 +0200

Hi,

I saw that you tried to write on the mailing list: you need to subscribe before
you can send email there.

First, you can take a look at:

http://git.savannah.gnu.org/cgit/exosip.git/tree/src/eXtl_tcp.c

eXosip continuously read data and is checking for Content-length
headers

#define END_HEADERS_STR "\r\n\r\n"
#define CLEN_HEADER_STR "\r\ncontent-length:"
#define CLEN_HEADER_COMPACT_STR "\r\nl:"
#define CLEN_HEADER_STR2 "\r\ncontent-length "
#define CLEN_HEADER_COMPACT_STR2 "\r\nl "
#define const_strlen(x) (sizeof((x)) - 1)

After you find a "content-length", you can read the
value.

then, later, you search for END_HEADERS_STR, ie: double CRLF
("\r\n\r\n").

Then, you need to read the value you get from content-length to
make sure you read the entire body.

Once this is done, you have a complete SIP message and support
for binary Content-Type.

In the exosip file, mainly check what I do in handle_messages
and _tcp_tl_recv.

Regards
Aymeric
 


2015-05-26 14:16 GMT+02:00 Chandrika Gautam <address@hidden>:
Hi Moizard,

I am using liibosip2(Antisip) to parse the SIP messages.
We are receiving SIP messages over both UPD and TCP protocol.
We have traffic in which there are multiple SIP packets coming in a single TCP Stream and hence
we are not able to find out the SIP message boundary.

Is there any member or API using which we can find out the length of one SIP message.

Please help as I am stuck at this.


Thanks & Regards,
Chandrika



--
Antisip - http://www.antisip.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]