[Users] full SIP message in perl
Greg Fausak
lgfausak at gmail.com
Wed Dec 13 20:12:19 CET 2006
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 at 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 at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
--
Greg Fausak
greg at thursday.com
More information about the sr-users
mailing list