[Devel] future perl module

Bastian Friedrich bastian.friedrich at collax.com
Fri Nov 17 15:49:15 CET 2006


Hi,

unfortunately my OpenSER knowledge and experience is rather limited, so I'd 
need to know what functions exactly you need.

Am Dienstag, 14. November 2006 12:12 schrieb Daniel-Constantin Mierla:
> like playing with flags,

setflag(), resetflag() and isflagset() are available now. Constants for FL_* 
have been redefined in Perl.

> dst uri

A new package "OpenSER::URI" exists now with functions user(), host(), 
port(), ... - for all string members of sip_uri type. I might add more 
functions for the non-string members. A function getParsedURI in 
OpenSER::Message extracts the RURI.

RURI can be set with "rewrite_ruri", as copied from alias_db. Should I user 
msg_parser's set_dst_uri instead?

> , branches, AVPs, sockets...

Can you give me a comprehension of which functions you will need?

As for the AVPs: Do you need access to the core functions, or will it be 
sufficient to access the exported avpops module functions only?

Am Dienstag, 14. November 2006 16:41 schrieb Klaus Darilion:
> IMO Reading/writing AVPs would be very useful.

Dito. :)

> Reading pseudo variables would also makes sense.

Done.

I had a lot of difficulties to connect the right xl_* functions. Maybe a much 
simpler convenience function "char *xl_sprintf(struct sip_msg *m, char *fmt)" 
should be defined on a higher level? I have one of those now...

My "pseudoVar" function returns a new string with all contained variables 
substituted by their values. This should be enough to read AVPs, too, right?

Oh, btw: Is it OK to use the str(n)dup functions in the code? It allocates 
it's memory via "malloc()" instead of "pkg_malloc()"...

Thx,
   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

\ There is something to be said about me: "Wow!!"



More information about the Devel mailing list