Hi,
On Wednesday 13 December 2006 17:35, Daniel-Constantin Mierla wrote:
On 12/13/06 18:08, Bastian Friedrich wrote:
Hi,
On Wednesday 13 December 2006 16:05, Klaus Darilion wrote:
m->getFullHeader returns only the headers. How can I access the whole message (headers + all bodies)?
I just added a new function "getBody()" to the Perl API.
Headers plus all bodies should be "getFullHeader()."\n\n".getBody()".
sip_msg->buf is the buffer storing the whole SIP message as it was received.
Great :) I just added a "getMessage()" function. I found the comments in msg_parser.h a little ambiguous, so I was unsure about buf's nature.
Another set of useful functions in Perl would be the access to first_line filed of sip_msg. There you can see the type of SIP message (request or reply) -- I do not know if it already in place, I was just thinking of.
The problem is that I'm anything but a SIP/OpenSER expert... I'm just trying to get one ;)
All my tests were done in the normal "route" branch; I never saw any non-request messages there, so currently I reject them totally: if ((_msg->first_line).type != SIP_REQUEST) { LOG(L_ERR, ...
I'll need to work on that, obviously.
Bastian