Hi!
m->getFullHeader returns only the headers. How can I access the whole message (headers + all bodies)?
regards klaus
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()".
Best, Bastian
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.
Hi Bastian!
Thanks
Headers plus all bodies should be "getFullHeader()."\n\n".getBody()".
^^^^^^ \r\n works fine
regards klaus
Hello,
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.
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.
Cheers, Daniel
Best, Bastian
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
Bastian,
I can see where the sip message is exported to perl. Can perl modify the message and send it back? Can perl rewrite the RURI?
Being able to have the perl language with sip route processing is real exciting :-)
Thank you,
-g
On 12/13/06, Bastian Friedrich bastian.friedrich@collax.com wrote:
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
-- Collax GmbH . Burkheimer Straße 3 . 79111 Freiburg . Germany p: +49 (0) 761-45684-24 f: +49 (0) 761-45684-10 www.collax.com
\ None of you exist, my Sysop types all this in.
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi
On Wednesday 13 December 2006 20:12, Greg Fausak wrote:
I can see where the sip message is exported to perl. Can perl modify the message and send it back?
Yes, modification is possible. I did not implement too many functions though; you have two means of modification: * Use the one or two I wrote. The most important probably is rewrite_ruri, just as you asked for. * Use the functions that are exported by other modules (esp. the "textops" module) for message modification
Can perl rewrite the RURI?
Sure! It has it's own "rewrite_ruri()" function.
Being able to have the perl language with sip route processing is real exciting :-)
Thx for your interest :)
Regards, Bastian