Hello,
the new sip router core and librarization of kamailio management (MI)
and statistics interfaces affected the module interface. At this time,
although all the fields are still in the module interface, some are passive:
- mi commands exports
- statistics exports
- extra processes
The modules in the public GIT repository use the either mod_init or
mod_register to export them, so everything should work as expected.
fyi: if you didn't know so far - mod_register is a function
automatically called when a module is loaded, giving the possibility to
export components from module in very early stage, e.g., transfomations
must be exported via mod_register since they are lookep up while parsing
the routing blocks -- mod_register is available in kamailio since 1.5,
back ported from sip router core, you just need to implement it in the
module, it is not part of module interface.
Back to module interface, the three fields mislead private module
implementations as everything compiles ok, but at startup the fields are
not actually exported. I propose to remove them and document the
transition process to new interface, which is practically couple of code
lines. It this way people migrating private stuff will notice the change
and update.
Since we are here and we have to go through each K module and remove the
fields from the module interface, maybe we can create a single interface
for k and s modules. Doing a short analysis and considering the above
three fields removed from k interface, then:
- K interface has extra
- dlopen flags - needed to specify how the .so is open, required so
far by perl module, iirc
- PV exports - the list of pseudo-variables exported by module
- the cmd (function) exports structure has a field to specify a free
fixup function (not implemented for all exported commands). The goal is
to allow calling functions exported by modules for higher application
languages, like perl so far, where it is needed to free the memory
allocated by fixup function
- S interface has extra
- rpc exports - exported rpc commands
- onbreak function - is this used?!? couldn't find docs about or a
use case, so I consider it obsolete
Then common interface would be:
- name
- dlopen flags
- mod parameters
- mod commands with free fixup
- rpc commands
- PV exports
- mod init
- child init
- mod destroy
- onreply callback
Probably we can normalize it a bit more, comments and suggestions are
welcome!
Thanks,
Daniel
--
Daniel-Constantin Mierla
* SIP Router Bootcamp
* Kamailio (OpenSER) and Asterisk Training
* Berlin, Germany, Sep 1-4, 2009
* http://www.asipto.com/index.php/sip-router-bootcamp/
hi
I use pa module to support SUBSCRIBE request which Event header is "presence",
and the function I used in ser.cfg is as follow :
if (method=="SUBSCRIBE") {
if (!t_newtran()) {
log(1, "newtran error\n");
sl_reply_error();
};
handle_subscription("registrar");
break;
};
But the response of this request is 400 error while parsing header Server: SIP Express Route (0.9.6(i386/linux))
I find there is no place in source code to parse Server header
I am I miss something in ser.cfg or any other modules should be loaded ?
Could any one tell me why?
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/
Sorry Rafael, the .cfg is not big ... moreover it's a simple .cfg compared
with other ones I worked on.
Also I will not review/debug your config for you.
Just try to do a flow analisys and check where you are wrong.
With a fast read .. I could tell you that you are having troubles with the
failure routes at least ..
--
Raúl Alexis Betancor Santana
Dimensión Virtual
Hi, all
I use kamailio 1.5.1 notls as a call-relay, It works fine but I found
some errors in my logs, can you tell me what happened? Should I you
increase MAX_BRANCHES value in sip-server/config.h?
ERROR:core:append_branch: max nr of branches exceeded
ERROR:dispatcher:ds_update_dst: append_branch action failed
ERROR:dispatcher:ds_next_dst: cannot set dst addr
my cfg:
ds_select_domain("2","4");
force_rtp_proxy();
t_relay();
Hello
Is there a way to find the IP address that the request will be sent to
using kamailio.cfg ? For example if extension is behind NAT, after
lookup() I have in $rd the IP in the contact column of location table,
not the actual IP in the received column. I couldn't find a pseudovar
for this.
Thanks,
Catalina
Hello
I try to launch ser_mysql.sh as root user, When I try it using
"/usr/sbin/ser_mysql.sh create" ,
I got the error "HA1 calculation failed" .
How to overcome the problem ?
Cheers,
Jay
Just grabbed the latest CVS for SER and attempted to compile it on a
CentOS 5.3 box, but received these errors:
config.mak loaded
Makefile.defs defs skipped
gcc -m64 -g -O9 -funroll-loops -Wcast-align -minline-all-stringops
-falign-loops -ftree-vectorize -mtune=opteron -Wall -DNAME='"ser"'
-DVERSION='"2.1.0-dev23-make"' -DARCH='"x86_64"' -DOS='linux_'
-DOS_QUOTED='"linux"' -DCOMPILER='"gcc 4.1.2"' -D__CPU_x86_64
-D__OS_linux -DSER_VER=2001000 -DCFG_DIR='"/usr/local/etc/ser/"'
-DMODS_DIR='"/usr/local/lib/ser/modules/"' -DPKG_MALLOC -DSHM_MEM
-DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP
-DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER
-DUSE_DST_BLACKLIST -DUSE_NAPTR -DDBG_QM_MALLOC -DUSE_TLS -DTLS_HOOKS
-DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM
-DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD
-DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H
-DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_EPOLL -DHAVE_SIGIO_RT
-DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT -c cfg_core.c -o
cfg_core.o
In file included from futexlock.h:52,
from lock_ops.h:85,
from locking.h:70,
from pt.h:50,
from cfg_core.c:42:
/usr/include/linux/futex.h:108: error: expected ')' before '*' token
/usr/include/linux/futex.h:112: error: expected ')' before '*' token
make: *** [cfg_core.o] Error 1
As you can see, it's an X86_64 architecture box running kernel
2.6.18-128.el5.
I saw a similar error in Google, but there was no resolution. Any ideas?
N.