Hi all,
when there many records in DB tables like location(usrloc use write
back mode), pua etc, kamailio fail to start by complaining "no pkg
memory left" when try to load (restore) all records from DB to
hashtable of location/pua. The share momory are allocated enough for
the hashtable, but the default compilation of the PKG_MEMORY_SIZE is
4MB, which allow only restore several thousands records. I know I can
increase the PKG_MEMORY_SIZE, but anyway there is a limitation which
may fail to restore all records from DB during the startup of kamailio
if it reach the limit of the number of records in DB.
Is there anyway to reload the hashtable from table by doing query n
rows a time and loop until non more result from DB? this will avoid
the kamailio startup problem when there are many records in hashtable
which are save also in DB.
Thank you very much in advanced!
Laura
Hi
I am using dialog module in Kamailio 3.1.5, and find that the dialog
table entry does not get deleted after call if in-dialog requests (e.g.
session timer refresh re-INVITEs in my case) are challenged. The entry
will stay there and get deleted after a long time (some time out? I
didn't set any dialog timeouts myself). If I remove the challenge for
in-dialog requests, then the dialog entry is deleted right after the call.
I use the example config script with a bit of modification for my
in-dialog route:
route[WITHINDLG] {
xlog("L_DBG","WITHINDLG: method=$rm, callid=$ci, cseq=$cs\n");
if (has_totag() ) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
# Filter out bad/faked up in-dialog requests.
if ( !is_known_dlg() )
{
xlog("L_WARN","WITHINDLG: NOT known dlg!! method=$rm,
callid=$ci, cseq=$cs, $fu->$tu\n");
exit;
}
if (is_method("BYE")) {
xlog("L_DBG","WITHINDLG: BYE found within Dialog \n");
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
}
##########################################################
# challenge: if not CANCEL/ACK
else if ( !is_method("CANCEL") && !is_method("ACK") )
{
route(AUTH);
}
##########################################################
xlog("L_DBG","WITHINDLG: Entering RELAY route from WITHINDLG
route. \n");
route(RELAY);
} else {
if (is_method("SUBSCRIBE") && uri == myself) {
# in-dialog subscribe requests
route(PRESENCE);
exit;
}
if ( is_method("ACK") ) {
xlog("L_DBG","WITHINDLG: ACK callid=$ci, cseq=$cs\n");
if ( t_check_trans() ) {
# no loose-route, but stateful ACK;
# must be an ACK after a 487
# or e.g. 404 from upstream server
xlog("L_DBG","ACK being relayed\n");
t_relay();
exit;
} else {
# ACK without matching transaction ... ignore and discard
xlog("L_DBG","ACK without matching transaction-ignore and
discard\n");
exit;
}
}
sl_send_reply("404","Not here");
}
exit;
}
}
The part that calls route(AUTH) that I added was the cause for the
dialog entry not being deleted after call.
Here are my dialog related settings:
modparam("dialog", "enable_stats", 1)
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "db_url", DBURL)
modparam("dialog", "db_update_period", 20) # use short one to catch
short dlgs (default:60)
modparam("dialog", "db_mode", 1)
# don't use did, so to cope with clients that don't preserve parameters
# and mode 1 (fallback to 3261 matching) didn't work??
modparam("dialog", "dlg_match_mode", 2)
modparam("dialog", "profiles_no_value", "inbound ; outbound")
modparam("dialog", "dlg_extra_hdrs", "Hint: dialog expired\r\n")
# default timeout set to max int 0x07FFFF FFFF
modparam("dialog", "default_timeout", 2147483647)
And I set the dialog flag (4) when receiving the initial INVITE.
Any idea why? Am I using the dialog module correctly?
Thanks very much!
Yufei
--
Yufei Tao
Red Embedded
This E-mail and any attachments hereto are strictly confidential and intended solely for the addressee. If you are not the intended addressee please notify the sender by return and delete the message.
You must not disclose, forward or copy this E-mail or attachments to any third party without the prior consent of the sender.
Red Embedded Design, Company Number 06688253 Registered in England: The Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ
Hi All,
I am trying to create a new module under the kamailio source base, as
part of understanding the framework. But when i start the Kamailio, i
am seeing a core dump occuring when my new module is getting initiated
and when the database is getting initialised. PFA the files attached
containing the config file and source files used for creating module
files.
I am using the "DEFAULT_DB_URL" as database uri. The core dump
backtrace shows that the module init fails at the following point:
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x00ef390d in child_init (rank=9172352) at my_mod.c:239
#2 0x081226be in init_mod (m=0xb7515a04) at sr_module.c:922
#3 0x08122630 in init_mod (m=0xb7515c78) at sr_module.c:919
The line 239 in my module file points to the child-init function which
initializes the database connectivity ==> "mymod_dbh =
mymod_dbf.init(&db_url);"
I have written the module using the template provided under the
kamailio website. All the parameters are defined properly. Have no
idea as to what is going wrong.
I tried debugging the core dump using gdb but of no much help. I am
not able to run the gdb during runti sr-users(a)lists.sip-router.orgme
due to which i am not able to add break points and check. Not sure
what the problem is. That's why i generated core dump file and
analysed the backtrace, but i can't add break points and run it again
as the executable is not involved.
Can anyone please let me know what is the issue is or any pointers if
i have missed some part of the code due to which the connectivity to
db is not happening. Due to this i am not able to proceed further with
the testing of my new module. Also any tips on how to do get the gdb
debugging during runtime will also be very helpful.
Any help is appreciated :).
--
Jagdeep S
Hi, I am an absolute beginniner learning SIP and Kamailio to setup
Kamailio as the Internet proxy for our Asterisk PBX.
My question is how to list the contents of the myself variable from
the command line? My Kamailio server displays a list of Aliases on
startup. Are these the contents of the myself variable?
Thanks
Ben
Hi, I have integrated Kamailio with asterisk, is it possible to handle
video with kamailio and audio with asterisk? I'm using kamailio 3.2, I
could difference a video call using sdpopts module, so before the invite is
routed to asterisk kamailio sends it to the phone. But I would like that
the video media would be peer to peer and the audio follows the path
through asterisk.
Thanks in advance,
Lucas Alvarez
hi, recently i've implemented the module antiflood into kamailio
(3.1.5 from GIT) ,the module works and i can see the ip banned with
kamctl fifo sht_dump ipban
now, when i try to allocate a trusted ip address with permissions module
#!ifdef WITH_IPAUTH
modparam("permissions", "db_url", DBURL)
modparam("permissions", "db_mode", 1)
modparam("permissions", "trusted_table", "trusted")
#!endif
--------------
if(src_ip!=TRUSTEDIP)
then i make a sipsak flood test from ip address 1.2.3.4 , but the ip
address entered before into trusted table (1.2.3.4 ) again is banned
with antiflood module
syslog file
: INFO: auth [auth_mod.c:312]: auth: qop set, but nonce-count
(nc_enabled) support disabled
: INFO: permissions [parse_config.c:251]: file not found:
/usr/local/etc/kamailio/permissions.allow
: INFO: permissions [permissions.c:606]: default allow file
(/usr/local/etc/kamailio/permissions.allow) not found => empty rule
set
: INFO: permissions [parse_config.c:251]: file not found:
/usr/local/etc/kamailio/permissions.deny
:INFO : permissions [permissions.c:615]: default deny file
(/usr/local/etc/kamailio/permissions.deny) not found => empty rule set
must i to create this files (permissions.allow, deny) to this module
works? or is enough with empty rule set, according with documentation
- there are another options into this module, but i need only enabling
the trusted ip address part.
regards
pablo umanzor
Hello,
don't forget to keep the mailing list cc-ed for the discussions started
there...
On 12/5/11 8:20 PM, mn3250 mn3250 wrote:
> Had to modify /usr/local/etc/kamailio/kamctlrc and everything started
> to work.
Was it just setting DBENGINE and then running kamdbctl create or was
some other kind of modification?
Cheers,
Daniel
>
> On Mon, Nov 28, 2011 at 4:15 PM, Daniel-Constantin Mierla
> <miconda(a)gmail.com <mailto:miconda@gmail.com>> wrote:
>
> Hello,
>
> can you check inside MySQL server if database voip1 has a table
> named version?
>
> What is the kamailio version you are using? How did you create the
> database, with kamdbctl create?
>
> Cheers,
> Daniel
>
>
> On 11/28/11 2:59 PM, mn3250 mn3250 wrote:
>> Hi,
>> Looks like the table "Version" is missing in the sql create script.
>> 0(18594) DEBUG: db_mysql [km_my_con.c:94]: opening connection:
>> mysql://xxxx:xxxx@localhost/voip1
>> 0(18594) DEBUG: db_mysql [km_my_con.c:121]: connection type is
>> Localhost via UNIX socket
>> 0(18594) DEBUG: db_mysql [km_my_con.c:122]: protocol version is 10
>> 0(18594) DEBUG: db_mysql [km_my_con.c:123]: server version is
>> 5.0.77-log
>> 0(18594) DEBUG: <core> [db_res.c:118]: allocate 48 bytes for
>> result set at 0x2ba27ac440b0
>> 0(18594) DEBUG: db_mysql [km_res.c:68]: 1 columns returned from
>> the query
>> 0(18594) DEBUG: <core> [db_res.c:155]: allocate 8 bytes for
>> result names at 0x2ba27ac44140
>> 0(18594) DEBUG: <core> [db_res.c:165]: allocate 4 bytes for
>> result types at 0x2ba27ac441a8
>> 0(18594) DEBUG: db_mysql [km_res.c:85]: allocate 16 bytes for
>> RES_NAMES[0] at 0x2ba27ac44210
>> 0(18594) DEBUG: db_mysql [km_res.c:92]:
>> RES_NAMES(0x2ba27ac44210)[0]=[table_version]
>> 0(18594) DEBUG: db_mysql [km_res.c:100]: use DB1_INT result type
>> 0(18594) DEBUG: db_mysql [km_res.c:169]: no rows returned from
>> the query
>> 0(18594) DEBUG: <core> [db.c:385]: no row for table location found
>> 0(18594) ERROR: <core> [db.c:421]: invalid version 0 for table
>> location found, expected 1004 (check table structure and table
>> "version")
>> Anyone has the correct file?
>> Thanks
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users(a)lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla --http://www.asipto.com
> Kamailio Advanced Training, Dec 5-8, Berlin:http://asipto.com/u/kat
> http://linkedin.com/in/miconda -- http://twitter.com/miconda
>
>
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Dec 5-8, Berlin: http://asipto.com/u/kathttp://linkedin.com/in/miconda -- http://twitter.com/miconda
Hi everybody
I cross compiled kamailio for ARM. However, when I try to start kamailio on the ARM machine, it tells me that there are a lot of undefined symbols. E.g. libkcore.so does not find the symbol dprint_crit. Having a look at libkcore.so:
$ nm -C -D lib/kcore/libkcore.so|grep dprint
U dprint_crit
All deployed .so files do not contain dprint_crit. However I found dprint_crit in an object file, that was used for compilation. Namely in dprint.o:
$ nm -C dprint.o |grep print
00000000 B dprint_crit
I used following commands to cross compile kamailio:
export GCC_ARM_HOME=/opt/arm-2009q1/arm-none-linux-gnueabi/
export TOOL_PREFIX=/opt/arm-2009q1/bin/arm-none-linux-gnueabi
export CXX=$TOOL_PREFIX-g++
export AR=$TOOL_PREFIX-ar
export RANLIB=$TOOL_PREFIX-ranlib
export CC=$TOOL_PREFIX-gcc
export LD=$TOOL_PREFIX-ld
export ARM_TARGET_LIB=/opt/arm-2009q1/arm-none-linux-gnueabi/libc
make proper
make cfg FLAVOUR=kamailio PREFIX=/root/kamailio/local include_modules="auth auth_db db_text registrar" ARCH=arm TARGET=arm-none-linux-gnueabi
make all && make install
Thanks
Amin
Hello list,
I'm using Kamailio 3.1.5 in front of asterisk servers. Kamailio handles all
the SIP registrations. Calls from SIP phones are forwarded to asterisks and
then dialled out to Kamailio.
root@SBCserver:~# kamailio -V
version: kamailio 3.1.5 (x86_64/linux) 76fff5
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
DBG_QM_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE,
USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, PKG_SIZE 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 76fff5
compiled on 08:21:33 Oct 27 2011 with gcc 4.6.1
root@SBCserver:~#
Problem:
When call is initiated from a softphone and is in ringing phase, CANCEL
just don't work. I've done some initial debugging and the following piece
of code in main route is failing.
# CANCEL processing
if (is_method("CANCEL"))
{
xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) ---CAPTURED IN MAIN---\n");
if (t_check_trans()){
t_relay();
xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) ---CHECK TRANS
TRUE---\n");
}
xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) ---CHECK TRANS FALSE---\n");
exit;
}
Also the CANCEL fails the has_totag() condition !
The same Call CANCEL scenario works fine for any client on Public IP !
Hope to get some pointers for the solution.
Regards,
Sammy.