Hi,
attached patch fixes the msg_send usage for the utils module. It uses the
forward_request function, instead of doing it manually with msg_send. Its
against the kamailio-3.0 repository.
I also attached a patch that implements a mk_proxy in shared memory and the
necessary utility functions. The kamailio implementation used to allocates
fewer parts of the struct. I simply did a replace for /pkg_/shm_/ on the
existing proxy implementation, so suggestions for improvements are welcome.
This patch is against the sr core, but perhaps its more appropriate to place
it in the libkcore library.
Please apply, thanks,
Henning
Hello,
Four new kamailio modules now compile with the sr core:
* pv (Converted by Daniel)
* domain
* permissions
* perl
* perlvdb
I've also fixed the search_next_avp issue in acc module reported by Ovidiu, so
I marked it as OK again in the wiki.
Jan.
Module: sip-router
Branch: master
Commit: 346a9a0551e546189048d379ebe1f630db910d7c
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=346a9a0…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Tue Mar 31 02:47:44 2009 +0200
Shared memory versions of mk_proxy and free_proxy.
This patch adds function mk_shm_proxy, which is the shared memory
version of function mk_proxy. In addition to that it adds function
free_shm_proxy which is the shared memory version of free_proxy.
To avoid code duplication, we turned the body of the original
hostent_cpy function into macro called HOSTENT_CPY, the macro takes
malloc and free functions as parameters. The macro is then called in
the body of hostent_cpy with pkg_malloc and pkg_free as parameters and
in the body of hostent_shm_cpy with shm_malloc and shm_free as
parameters.
We did the same to mk_proxy function. The original body of the function
was converted into macro MK_PROXY which, again, takes memory allocation
functions as we all the hostent copy function as parameters.
---
proxy.c | 284 ++++++++++++++++++++++++++++++++++++--------------------------
proxy.h | 2 +
2 files changed, 167 insertions(+), 119 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=346…
Hello,
the data lumps system is critically affected if content-length is wrong
for UDP. The anchor_lump() calls abort() in the case content-length is
higher than actually body length. This can be prevented by called sanity
module to check the content length, however, I consider being too
drastic to have abort in such case, it would be better to return an
error and let the sip router process other messages. Opinions?
Checking sip-router sources, it faces same issue.
Another option would be to correct the C-L value locally, but the right
one is that phone vendor fixes its side.
Cheers,
Daniel
--
Daniel-Constantin Mierla
SIP Router Masterclass - Kamailio (OpenSER) Training
http://www.asipto.com/index.php/sip-router-masterclass/
Hello,
it became a trend to add anchors to each header used by some module to
sip_msg structure. While the average is 15 headers per SIP message (some
without anchors in the sip_msg), sip_msg has over 35.
Many of these are used only once, e.g., presence related headers are
used by router as endpoint, not as a proxy. Intended to endpoint are
subject, supported, unsupported, and perhaps others... Keeping them and
cloning in TM when proxying makes no sense. They are not used for routing.
I think would be good to replace some anchors or at least for future the
addition of anchors with functions like:
get_hdr_xyz(sip_msg) - that will take care of parsing and return the
right hdr_field structure.
On another hand I propose to add sortcut to body (start and length) - in
this case if there is a correction done by the parser, will be in effect
everywhere. Looking now in the code, there are functions that extract
body in different ways, some correcting the length by skipping \r, \n at
the end.
Cheers,
Daniel
--
Daniel-Constantin Mierla
Hi,
attached patch fixes the compilation for the usrloc module. It adapts it to
the different parse_phostport syntax, and fixes a missing #define. Patch
against kamailio-3.0 branch.
The other (tiny) patchs introduces a ALL_METHODS #define to the parser of sr,
which is also necessary for usrloc and a few more modules. Patch against sr
master branch.
Please apply, thanks
Henning
Hello,
some time ago, during an IRC devel meeting, it was proposed to migrate K
source repository to GIT (IIRC Ovidiu Sas). At that time SF.net didn't
provide git support but does it now..
Probably many know that most of the modules were updated to compile with
sip-router core (last of them being worked out):
http://sip-router.org/wiki/devel/kamailio-integration#module_integration_st…
Now I am asking the K devels if they feel comfortable with git, so that
we move our repository to git. It will easy synchronization with
sip-router core which is kept in git.
Cheers,
Daniel
--
Daniel-Constantin Mierla