Hello,
I have two issues related to dialog module state keeping/logging that
caught my attention today:
1.) The module considers requests routed in early (but not yet
confirmed) dialogs to be bogus, as can be seen from a few lines of state
machine code in dlg_hash.c:
http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob;f=modules_…
In the logs, it shows up something like this:
CRITICAL:dialog:log_next_state_dlg: bogus event 8 in state 2 for dlg
0x7f9f237ffff8 [2901:1286709577] with clid '<Call-ID>' and tags '<caller
tag>' '<callee tag, always empty>'
I believe that such in-early-dialog requests should not trigger
bogus-event log messages as they look fine from a standard's point of view.
2.) Various race conditions may generate log messages such as following
when DID mode is enabled:
WARNING:dialog:dlg_onroute: unable to find dialog for <REQUEST TYPE>
with route param 'faf.f69e7b4' [4015:79161711]
Observed REQUEST TYPEs at our site were "BYE" when BYE requests were
transmitted by both caller and callee at roughly the same time due to
user behavior; and "PRACK" when a PRACK was received by the UAS after a
486 (Busy Here)/ACK pair of messages was already exchanged between the
UAS and the proxy. In both cases, the associated dialog had already been
destroyed when another request was received.
My suggestion is to lower the log level for this kind of message because
it can simply happen too often but doesn't affect proper dialog handling.
Feedback?
Cheers,
--Timo
Hi,
When I build sip-router (from master) with kamailio flavour using:
make config mode=debug FLAVOUR=kamailio; make all; make install
I'm getting this error when trying to start kamailio:
ERROR: <core> [sr_module.c:396]: ERROR: load_module: could not open module
</usr/local/lib/kamailio/modules_k/tmx.so>:
/usr/local/lib/kamailio/modules_k/tmx.so: undefined symbol: _tm_table
On the other hand, if I use:
make FLAVOUR=kamailio cfg; make all; make install
kamailio starts correctly.
I've tried also:
make mode=debug FLAVOUR=kamailio cfg
with no luck either.
What's the problem? How should I compile kamailio with debugging so it
starts correctly?
Thank you in advance.
Regards,
Santi
Hi ALL,
I have a problem to configure LCR module to work properly (kamailio rel. 1.5)
The task in my case is to handle:
1) All calls coming with CLD number prefix 482223344 from my MGW
(77.77.77.77) towards kamilio and direct them to sip world
(88.88.88.88)
2) Calls with CLD starting with 48 coming from SIP world towards
kamailio and direct them to my MGWs. Additionaly i need to route it on
the basis of CLI number.
So MGWs <---> Kamailio <---> SIPProxies (88.88.88.88)
In db:
+----+-----------+----------------+--------+----------+
| id | prefix | from_uri | grp_id | priority |
+----+-----------+----------------+--------+----------+
| 1 | 48 | 48 | 1 | 1 |
| 2 | 48 | 49 | 2 | 1 |
| 3 | 482223344 | 77.77.77.77 | 3 | 1 |
+----+-----------+----------------+--------+----------+
gw,
+----+--------------+--------+----------------+----------+------+------------+-----------+-------+------+--------+------+-------+
| id | gw_name | grp_id | ip_addr | hostname | port |
uri_scheme | transport | strip | tag | weight | ping | flags |
+----+--------------+--------+----------------+----------+------+------------+-----------+-------+------+--------+------+-------+
| 1 | CLI48 | 1 | 77.77.77.70 | NULL | 5060 | NULL |
NULL | NULL | NULL | 150 | 0 | 0 |
| 2 | CLI48backup | 1 | 77.77.77.71 | NULL | 5060 |
NULL | NULL | NULL | NULL | 150 | 0 | 0 |
| 3 | CLI49 | 2 | 77.77.77.75 | NULL | 5060 | NULL |
NULL | NULL | NULL | 15 | 0 | 0 |
| 4 | CLI49backup | 2 | 77.77.77.76 | NULL | 5060 |
NULL | NULL | NULL | NULL | 15 | 0 | 0 |
| 5 | SIPWORLD | 3 | 88.88.88.88 | NULL | 5060 |
NULL | NULL | NULL | NULL | 250 | 0 | 0 |
+----+--------------+--------+----------------+----------+------+------------+-----------+-------+------+--------+------+-------+
Unfortunately:
- call is originated on 77.77.77.77 with CLD 48222334455 number and
kamailio forward this call to grp_id=3 SIPWORLD which is okay. The
problem is that if the call fail, kamailio will try to use 77.77.77.70
and 77.77.77.71 from grp_id=1 which is wrong. I have no idea how to
provide a kind of huntstop in grp_id=3.
I've been trying with
+----+-----------+----------------+--------+----------+
| id | prefix | from_uri | grp_id | priority |
+----+-----------+----------------+--------+----------+
| 1 | 48 | 88.88.88.88 | 1 | 1 |
| 2 | 48 | 88.88.88.88 | 2 | 1 |
| 3 | 482223344 | 77.77.77.77 | 3 | 1 |
+----+-----------+----------------+--------+----------+
but in this case i am unable to provide kamailio with CLI number routing.
Here is a part of my config file...
if (!load_gws()) {
sl_send_reply("503", "Unable to load gateways");
exit;
}
if (!next_gw()) {
sl_send_reply("503", "Unable to find a
gateway");
exit;
}
route(1);
exit;
and failover for route(1)...
failure_route[11] {
# In case of failure, send it to an alternative route:
if (t_check_status("408|404|5[0-9][0-9]")) {
if (!next_gw()) {
t_reply("503", "Service not available, no more
gateways");
exit;
}
else {
t_on_failure("11");
t_relay();
}
exit;
}
}
Anybody could help my to get out of that?
Thx,
Maciej.
Hey,
I am using a Cisco WIP310 wifi phone. Seeing as wifi is very battery
demanding, the phone goes into a standby mode. When it's in the standby
mode, it takes a few seconds to come back on.
So I send an INVITE to the phone, statefully using TM, I send out a
CANCEL before the phone returns the "180 ringing" message.
Somehow the device is answering the CANCEL before the INVITE, so the
result is that it responds to the CANCEL with "481 Call Leg/Transaction
Does Not Exist.", after that it responds to the INVITE with a "180
Ringing", the phone than rings indefinitely because the CANCEL is not
sent out again as the transaction is completed from the 481 SIP message.
I had a look at the CANCEL, there is no Route: header or tag on the To,
so it looks like it is part of a new dialog ( I believe that's what
rfc3261 says.
As far as I can tell, my Kamailio is working properly. It is
retransmitting the messages at the proper intervals, and it is passing
along the messages as it receives them.
The trouble is that the device answers the initial CANCEL before it
answers any of the retransmitted INVITEs.
Is there something that I can do in Kamailio to resolve this issue ? Is
there an option that I can set that will cause Kamailio to relay the
CANCEL only to devices that have already returned a 100 Trying or 180
Trying ?
What information do you need to know about my config? What parts of the
SIP trace do you need ?
Thanks,
David
Hello,
See transmission below. For some reason the ACK package is lost/dropped and the remote server retransmits the 200 OK status. But Kamailio does not retransmit the ACK on receiving the retransmitted OK's. Eventually the remote server gives up and pulls the plug after ~20 seconds. Is this a bug or should I look closer at my routing script? The script is for the ACK handling pretty much the same at the vanilla script delivered with the source. I'm still on version 3.0.0.
/Ole
-> Request: INVITE sip:phonenum@destination, with session description
<- Status: 100 Trying
<- Status: 180 Ringing
<- Status: 183 Session Progress, with session description
<- Status: 200 OK, with session description
-> Request: ACK sip:phonenum@destination
<- Status: 200 OK, with session description
<- Status: 200 OK, with session description
<- Status: 200 OK, with session description
<- Status: 200 OK, with session description
<- Status: 200 OK, with session description
<- Status: 200 OK, with session description
-> Request: BYE sip:phonenum@destination
-> Request: BYE sip:phonenum@destination
<- Status: 481 Call leg/transaction does not exist
Hi All,
I'm running kamailio 3.0.2.
# ----- permissions params -----
modparam("permissions", "db_url",
"mysql://openserro:openserro@localhost/openser")
#modparam("permissions", "db_mode", 1)
snip in route block:
if (!allow_source_address_group()) {
sl_send_reply("403", "Forbidden");
exit;
}
>From command line:
sip-router2:/etc/kamailio# kamctl fifo address_reload
400 Address table reload failed
debug output:
during initial kamailio startup:
0(10655) DEBUG: permissions [address.c:122]: Number of rows in address table: 4
0(10655) DEBUG: permissions [address.c:164]: Tuple <1, 10.10.12.0,
24, 0> inserted into subnet table
0(10655) DEBUG: permissions [address.c:164]: Tuple <1, 10.10.14.0,
24, 0> inserted into subnet table
0(10655) DEBUG: permissions [address.c:148]: Tuple <1, 10.10.15.97,
32> inserted into address hash table
0(10655) DEBUG: permissions [address.c:148]: Tuple <1, 10.10.15.98,
32> inserted into address hash table
0(10655) DEBUG: <core> [db_res.c:81]: freeing 4 columns
0(10655) DEBUG: <core> [db_res.c:85]: freeing RES_NAMES[0] at 0x827c158
0(10655) DEBUG: <core> [db_res.c:85]: freeing RES_NAMES[1] at 0x827c220
0(10655) DEBUG: <core> [db_res.c:85]: freeing RES_NAMES[2] at 0x827c168
0(10655) DEBUG: <core> [db_res.c:85]: freeing RES_NAMES[3] at 0x827c230
0(10655) DEBUG: <core> [db_res.c:94]: freeing result names at 0x827c250
0(10655) DEBUG: <core> [db_res.c:99]: freeing result types at 0x827c1b8
0(10655) DEBUG: <core> [db_res.c:54]: freeing 4 rows
0(10655) DEBUG: <core> [db_row.c:97]: freeing row values at 0x827c710
0(10655) DEBUG: <core> [db_row.c:97]: freeing row values at 0x827c6b8
0(10655) DEBUG: <core> [db_row.c:97]: freeing row values at 0x827c660
0(10655) DEBUG: <core> [db_row.c:97]: freeing row values at 0x827c598
0(10655) DEBUG: <core> [db_res.c:62]: freeing rows at 0x827ca10
0(10655) DEBUG: <core> [db_res.c:136]: freeing result set at 0x827c1f8
0(10655) DEBUG: <core> [db_pool.c:102]: removing connection from the pool
0(10655) DEBUG: permissions [address.c:181]: address table reloaded
successfully.
result when issuing "kamctl fifo address_reload"
3(10389) DEBUG: mi_fifo [fifo_fnc.c:489]: entered consume
3(10389) DEBUG: mi_fifo [fifo_fnc.c:489]: **** done consume
3(10389) DEBUG: mi_fifo [fifo_fnc.c:503]: done parsing the mi tree
3(10389) ERROR: permissions [address.c:82]: db_handle already exists
The address table loads fine during startup and if I reload kamailio
it will load any new addresses or subnets so I know there is no syntax
error in the database.
I can reload trusted table and pdt table without an error but address
table is not working.
Any ideas on how I can trouble shoot this further?
Thanks.
JR
--
JR Richardson
Engineering for the Masses
Hello,
our voip provider requires autentication to voip services. Trying to use
UAC module, I get "401 Unauthorized" packet, but looks like all ser based
programs have problems to parse this packet. Can somebody make a patch to
fix this?
Here is message from logs:
Jun 17 15:01:42 kamailio /usr/sbin/kamailio[1291]: ERROR: uac [auth_hdr.c:267]: parse error in <DIGEST
realm="BroadWorks",qop="auth",algorithm=MD5,nonce="BroadWorksXgajlo4shTqsrkgdBW"> around 0
And ngrep sniffed packet:
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP 100.100.242.20;branch=z9hG4bK119f.8a41a626.0.
Via: SIP/2.0/UDP 100.100.16.77;branch=z9hG4bK119f.7cc235e.0.
Via: SIP/2.0/UDP 100.100.10.10;branch=z9hG4bK8ec5c892A88F71C9.
From: "Ondrej Jan" <sip:556807505@as.vvn.t-com.sk>;tag=89D71D23-32F3D9BC.
To: <sip:0248213335@as.vvn.t-com.sk;user=phone>;tag=1621075049-1276779704129.
CSeq: 2 INVITE.
Call-ID: 41c7437-58259a9d-d157be06(a)100.100.10.10.
WWW-Authenticate: DIGEST realm="BroadWorks",qop="auth",algorithm=MD5,nonce="BroadWorksXgajlo4shTqsrkgdBW".
Content-Length: 0.
I tryed to look at sources, but this "C" code is too complicated for me. :-(
SAL
Hi,
I have recently installed a kamailio server with release 3.0.2.
I would like to use the kamilio as a redirect server that would recieve REGISTER messages from users and query a proprietary database that holds users information - if the users are registered to the service it would redirect the user to the registrar. I need it for security reasons which I can't fully explain.
Now, I am using the avpops module. I have been able to make it work using the following configuration:
modparam("avpops","db_url","mysql://user:pass@localhost/mysql")
modparam("avpops","avp_table","proptable")
modparam("avpops","db_scheme","scheme0:username_col=sipUsername;value_col=sipDomainName;table=proptable")
----------
if (is_method("REGISTER"))
{
if (avp_db_load("$fu/username","$avp(s:CONSTANT_DOMAIN)/$scheme0"))
{
append_branch("sip:registrarIP");
sl_send_reply("302","Test Redirect");
}
else
{
sl_send_reply("404","Test Not found");
}
--------------
The thing is that I don't need to match the string CENTREX against the domain- it is something I added because I couldn't find another way to do it. I would like to match only the username. I tried wildcards or leaving it empty but it didn't work. I tried not to use the scheme and instead use the table it self but again it didn't work.
Is it possible? Do you know a better to do it?
Thanks,
Yaron.
Hello,
I try to use the PERL module in kamailio v3 for some research due to my thesis.
I'm using debian lenny, kamailio_3.0.0 and perl_5.10.0.
1.) The Problem
Starting Kamailio via "./kamctl start" drops the general error JUST when I try to load the PERL module:
ERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio start failed
2.) The search for errors
I got the following errors (and warnings) in DEBUG mode by starting "kamailio -d" for debugging:
[...]
0(10776) DEBUG: <core> [sr_module.c:382]: load_module: trying to load </opt/kamailio-3.0.0/lib/kamailio/modules_k/perl.so>
0(10776) WARNING: <core> [sr_module.c:445]: /opt/kamailio-3.0.0/lib/kamailio/modules_k/perl.so: exports dlflags interface is deprecated and it will not be supported in newer versions; consider using mod_register() instead 0(10776)
[...]
0(10778) ERROR: perl [perl.c:330]: insufficient module parameters. Module not loaded.
0(10778) ERROR: <core> [sr_module.c:874]: init_mod(): Error while initializing module perl
3.) What I did before...
3.1) Compiled Kamailio
I compiled Kamailio 3.0.0 using the following commands, where $1 is the target:
make prefix=$1/ include_modules="db_mysql tls perl" cfg
make Q=1 all
make install
#make prefix=$1/ TLS=1
#make prefix=$1/ TLS=1 modules
#make prefix=$1/ TLS=1 install
#make prefix=$1/ include_modules="db_mysql" modules
#make prefix=$1/ include_modules="db_mysql" install
3.2) Set the environment variables as described in
http://kamailio.org/docs/modules/stable/modules_k/perl.html#id2920768
You need to set the environment variables PERLLDOPTS, PERLCCOPTS and TYPEMAP to values similar to the output of
PERLLDOPTS: perl -MExtUtils::Embed -e ldopts
PERLCCOPTS: perl -MExtUtils::Embed -e ccopts
TYPEMAP: echo "`perl -MConfig -e 'print $Config{installprivlib}'`/ExtUtils/typemap"
3.3) Trying to load the perl-module via kamailio.cfg
loadmodule "perl.so"
Can you PLEASE help me to solve the problem!
Thank you very much...
Cheers Nicolas
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01