Thanks Charles.
Yes that helps. My design is flawed I think. I am trying to use both a shared DB (through Galera clustered MariaDB) and DMQ.
The benefits of the shared DB are that I can have the same static tables like dispatcher etc but was hoping to be able to move most of my dyamic data logic to DMQ.
It is replicating some of the presence data through DMQ because the secondary server is trying to update presence data from users interacting with the primary server.
I my need to move to separate DBs for each server then it seems.
regards
Paul
Hi there
My config is a primary:secondary DNS srv failover Kamailio 5.2 setup using DMQ for syncing Location, Presence, HTable etc.
For Presence db_mode set to 0 on both servers.
This works fine on the primary server but on the secondary server I get repeated mysql deadlock errors. I seem to be missing a config setting to turn off db_mode fully for presence but I cant see where. Error seems to occur on message-summary updates from master that are being replicated to slave via DMQ.
Mar 08 13:52:39 /usr/sbin/kamailio[17493]: ERROR: <core> [db_query.c:181]: db_do_raw_query(): error while submitting query
Mar 08 13:52:39 /usr/sbin/kamailio[17493]: ERROR: db_mysql [km_dbase.c:714]: db_mysql_end_transaction(): executing raw_query
Mar 08 13:52:39 /usr/sbin/kamailio[17493]: ERROR: presence [presentity.c:1299]: update_presentity(): in end_transaction
Mar 08 13:52:40 /usr/sbin/kamailio[17493]: ERROR: db_mysql [km_dbase.c:128]: db_mysql_submit_query(): driver error on query: Deadlock found when trying to get lock; try restarting transaction (1213)
I am using the following presence related modules
loadmodule "presence.so"
loadmodule "presence_mwi.so"
loadmodule "presence_xml.so"
loadmodule "pua.so"
loadmodule "rls.so"
loadmodule "xcap_server.so"
loadmodule "xcap_client.so"
params are set as below
loadmodule "presence.so"
loadmodule "presence_mwi.so"
loadmodule "presence_xml.so"
loadmodule "pua.so"
loadmodule "rls.so"
loadmodule "xcap_server.so"
loadmodule "xcap_client.so"
params are set as below with PRESENCEDBMODE set to 0 on both servers.
#!ifdef WITH_PRESENCE
# ----- presence params -----
modparam("presence", "db_url", DBURL)
modparam("presence", "db_update_period", 5)
modparam("presence", "server_address", "sip:myserver.com")
modparam("presence", "subs_db_mode", PRESENCEDBMODE)
modparam("presence", "send_fast_notify", 1)
modparam("presence", "timeout_rm_subs", 0)
modparam("presence", "db_table_lock_type", 0)
modparam("presence", "notifier_processes", 3)
modparam("presence", "local_log_level", 3)
modparam("presence", "publ_cache", 1)
#!ifdef WITH_DMQ
modparam("presence", "enable_dmq", 1)
#!else
modparam("presence", "enable_dmq", 0)
#!endif
#!ifdef WITH_BUDDY
# ----- presence_xml params -----
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "passive_mode", 1)
modparam("presence_xml", "integrated_xcap_server", 1)
modparam("presence_xml", "xcap_server", "https://xcap.myserver.com/xcap-root")
modparam("presence_xml", "force_dummy_presence", 1)
modparam("pua", "db_url", DBURL)
modparam("pua", "db_mode", PRESENCEDBMODE)
modparam("pua", "db_table_lock_write", 0)
modparam("pua", "check_remote_contact", 0)
modparam("rls", "db_url", DBURL)
modparam("rls", "db_mode", PRESENCEDBMODE)
modparam("rls", "notifier_processes", 2)
modparam("rls", "integrated_xcap_server", 1)
modparam("rls", "xcap_root", "https://xcap.myserver.com/xcap-root")
modparam("rls", "server_address", "sip:rls@myserver.com")
modparam("rls", "outbound_proxy", "sip:myserver.com")
modparam("rls", "disable_remote_presence", 0)
modparam("rls", "max_backend_subs", 1000)
modparam("rls", "to_presence_code", 10)
modparam("rls", "rls_event", "presence")
modparam("rls", "rls_event", "presence.winfo")
modparam("xcap_server", "db_url", DBURL)
modparam("xcap_server", "directory_scheme", -1)
modparam("xcap_server", "xcap_root", "/xcap-root/")
modparam("xcap_client", "db_url", DBURL)
modparam("xcap_client", "query_period", 50)
Any ideas?
thanks
Paul
Hi,
I am aware the Kamailio itself as well as the native C modules are licensed
under the GPL.
What is the licensing situation with the Kamailio routing scripts, both
native and via KEMI?
Regards,
Wei Li
--
*Wei Li Jiang*
*Senior Design Engineer*
*Tait Communications*
*DDI:* 64 3 3570747
*Email:* weili.jiang(a)taitradio.com
*www.taitradio.com <http://www.taitradio.com>*
--
This Communication is Confidential. We only send and receive email on the
basis of the terms set out at www.taitradio.com/email_disclaimer
<http://www.taitradio.com/email_disclaimer>
Hi All,
I'm getting the ERROR message "invalid cseq for aor" on my registrar nodes
that sit behind my load balancers.
My LB's take REGISTER messages, perform all the AUTH, and post AUTH, the
messages are forwarded to my registrar nodes, and are then saved.
what im finding is messages similar to this :
ERROR: registrar [save.c:599]: test_max_contacts(): invalid cseq for aor
<BLAH>
I believe everything is functioning as expected, AOR's are saved and
retrieved etc.
but at a minimum, this message is filling my logs with messages that look
scary!
( my ops team should not be expected to ignore ERROR Level log messages )
--
Sincerely
Jay
Hello!
I have Kamailio v4.4 and use (historical) the next param setting to disable
sanity check:
modparam("sanity", "default_checks", 0)
I see that this value 0 is not described in module documentation, but looks
like this modparam behaves in another way on Kamailio v5.
So my question is how to disable sanity checking in modparam?
--
BR,
Denys Pozniak
Dear List,
I am having a problem where log_prefix is missing on acc_cdr log row
when call is canceled.
Here is an example of two lines of acc_cdr log file, first one is
completed normally and second one is canceled before 200 OK:
Mar 6 12:04:48 edge3 kamailio[27669]: NOTICE: {2 1 BYE
23d4e04c0c79ff6950accbd1706b91b1(a)example.com} acc [acc_cdr.c:367]:
log_write_cdr(): start_time=1551873885.018; end_time=1551873888.379;
duration=3.361;
Mar 6 12:03:40 edge3 kamailio[27707]: NOTICE: acc [acc_cdr.c:367]:
log_write_cdr(): start_time=1551873809.148; end_time=1551873809.148;
duration=0;
I tried to take a debug on this matter and noticed that log_prefix is
lost at this point:
Mar 6 13:54:25 edge3 kamailio[10665]: DEBUG: {1 102 INVITE
6917f51f0955bd8b3a1aa62361a473ce(a)example.com} tm [t_lookup.c:1019]:
t_check_msg(): msg (0x7f1a889a8a30) id=0 global id=0 T start=0x7f1a8899b450
Mar 6 13:54:25 edge3 kamailio[10665]: DEBUG: {1 102 INVITE
6917f51f0955bd8b3a1aa62361a473ce(a)example.com} tm [t_lookup.c:1092]:
t_check_msg(): T (0x7f1a8899b450) already found for msg (0x7f1a889a8a30)!
Mar 6 13:54:25 edge3 kamailio[10665]: DEBUG: {1 102 INVITE
6917f51f0955bd8b3a1aa62361a473ce(a)example.com} dialog [dlg_var.c:97]:
cb_dlg_locals_reset(): resetting the local dialog shortcuts on script
callback: 2147483650
Mar 6 13:54:25 edge3 kamailio[10665]: DEBUG: tm [t_reply.c:1806]:
relay_reply(): branch=0, save=0, relay=0 icode=0 msg status=487
Mar 6 13:54:25 edge3 kamailio[10665]: DEBUG: <core>
[core/msg_translator.c:2288]: generate_res_buf_from_sip_res(): old size:
483, new size: 399
On normal call the prefix stays in intact:
Mar 6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE
03cd8f3464d42b7b01966e6b1154eedc(a)example.com} tm [t_lookup.c:1088]:
t_check_msg(): msg (0x7f1a95baad10) id=2 global id=2 T end=0x7f1a8899f8f0
Mar 6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE
03cd8f3464d42b7b01966e6b1154eedc(a)example.com} tm [t_reply.c:2237]:
reply_received(): org. status uas=0, uac[0]=0 local=0 is_invite=0)
Mar 6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE
03cd8f3464d42b7b01966e6b1154eedc(a)example.com} tm [t_reply.c:1263]:
t_should_relay_response(): ->>>>>>>>> T_code=0, new_code=200
Mar 6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE
03cd8f3464d42b7b01966e6b1154eedc(a)example.com} tm [t_reply.c:1806]:
relay_reply(): branch=0, save=0, relay=0 icode=0 msg status=200
Mar 6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE
03cd8f3464d42b7b01966e6b1154eedc(a)example.com} <core>
[core/msg_translator.c:2288]: generate_res_buf_from_sip_res(): old size:
491, new size: 407
The problem exists at least in the following version:
version: kamailio 5.2.0 (x86_64/linux) c5216b
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, 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_URI_SIZE 1024,
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: c5216b
compiled on 13:05:00 Jan 7 2019 with gcc 6.3.
Best Regards,
Joonas Keskitalo
Hey there,
I'm wondering if any is able to help me. Trying to figure out how one might send OPTIONS request (ie the keepalive module) for registrations originating from the uac module? Have managed to figure out tcp keep alives but for some reason my connection is being closed even though they are sending, so hoping to try sending OPTIONS and see if that does it. It looks like the keepalive module only has an internal api doesn't actually expose the method to enable keepalives on individual TCP connections. Any help would be greatly appreciated!
Hi all!
got a Kamailio doing load balancing to multiple Asterisk boxes. Kamailio is
connected to a carrier's SIP trunk, and distributes calls to Asterisk.
Receiving calls from carrier's SIP trunk works perfectly: kamailio will use
dispatcher module to distribute calls between Asterisk boxes. No problems!
Kamailio is also connected to the WWW, receiving calls from any authorized
IP (whitelisted in Firewall).
The problem is that if I get a call from the WWW and a from whitelisted IP,
kamailio does not detect any INVITE (note that the IP address is not
registered).
here is the SIP Request (IPs are obfuscated)
INVITE sip:+351234567890@10.19.139.66 SIP/2.0
Record-Route: <sip:11.22.33.44:5060
;r2=on;transport=udp;ftag=11592086_6772d868_135fa74b-2c83-4d5f-9882-4125b131c703;l
Record-Route: <sip:222.33.44.55:5060
;r2=on;transport=udp;ftag=11592086_6772d868_135fa74b-2c83-4d5f-9882-4125b131c703r>
CSeq: 1 INVITE
From: <sip:+351999999999@somewhere.com
>;tag=11592086_6772d868_135fa74b-2c83-4d5f-9882-4125b131c703
To: <sip:+351234567890@10.19.139.66>
Max-Forwards: 65
P-Asserted-Identity: "+351999999999" <sip:+351999999999@sip.somewhere.com>
Date: Tue, 05 Mar 2019 15:55:24 GMT
Min-SE: 120
Call-ID: 799ee9a8cd02e066e2811d8052759715(a)0.0.0.0
Via: SIP/2.0/UDP 11.22.33.44:5060;branch=z9hG4bK6b36.f67ca7e4.0
Via: SIP/2.0/UDP 222.33.44.55:5060
;branch=z9hG4bK135fa74b-2c83-4d5f-9882-4125b131c703_6772d868_106-113479085018764135
Contact: "+351999999999" <sip:+351999999999@222.33.44.55:5060;transport=udp>
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE
User-Agent: SomeSIPGateway
Content-Type: application/sdp
X-SIPGW-CallSid: CA6a5691a75bb7b915c09c7931e253f542
Content-Length: 262
v=0
o=root 1219665045 1219665045 IN IP4 55.66.77.88
s=SomeSIPGateway
c=IN IP4 55.66.77.88
t=0 0
m=audio 14326 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
SIP Messages using SNGrep:
11.22.33.44:5060 10.19.139.66:5060
----------+--------- ----------+---------
15:55:25.980727 | INVITE (SDP) |
+0.596007 | --------------------------> |
15:55:26.576734 | INVITE (SDP) |
+1.003393 | ------------------------>>> |
15:55:27.580127 | INVITE (SDP) |
+1.978513 | ------------------------>>> |
15:55:29.558640 | INVITE (SDP) |
| ------------------------>>> |
I've checked that Kamailio is listennig to all interfaces (OK) and to port
5060 (OK).
As we can see above, SNGrep shows the incoming message to Kamailio
(10.19.139.66) but it gets stuck there as there are no other messages.
Kamailio.log doesn't show anything too, just like if the request (INVITE)
is not recognizes a a SIP message.
all other use cases work fine :
- from SIP Carrier's trunk OK
- from registered SIP user OK
- from registered SIP Trunk ok
only from a not registered SIP trunk I get this behaviour....
Any clue?
Thanks in advance,
*Sérgio *
www.voip.pt
Hello list!
I am trying to troubleshoot an issue we are having where we sometimes see an ACK in response to a 200 OK (SDP) come from the a different IP address to the rest of dialogue. The client ignore the traffic from the different IP and the call set up fails.
Kamailio is multihomed on two IPs and this client is registered with the first IP address.
I have done some searching on this and seen a few others with the issue, it seems like it's the ACK in the loose_route() section of WITHINDLG in the default kamailio.cfg file. I tried the force_send_socket solution one other person suggested but this caused issues with other kinds of dialogues, perhaps I did it incorrectly?
Thanks for your time
Boden
Here is my attempt to solve the issue and config snippets
mhomed=1
# ----- rr params -----
# set next param to 1 to add value to ;lr param (helps with some UAs)
modparam("rr", "enable_full_lr", 1)
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 1)
# Handle requests within SIP dialogs
route[WITHINDLG] {
if (!has_totag()) return;
# sequential request within a dialog should
# take the path determined by record-routing
if (loose_route()) {
route(DLGURI);
# this is the attempt to use the right IP
if ($(route_uri{uri.host}) == VRRP_IP) {
force_send_socket(VRRP_IP);
} else if ($(route_uri{uri.host}) == KAM01_IP) {
force_send_socket(KAM01_IP);
}
if (is_method("BYE")) {
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
} else if (is_method("ACK")) {
# ACK is forwarded statelessly
route(NATMANAGE);
} else if (is_method("NOTIFY")) {
# Add Record-Route for in-dialog NOTIFY as per RFC 6665.
record_route();
}
route(RELAY);
exit;
}
if (is_method("SUBSCRIBE") && uri == myself) {
# in-dialog subscribe requests
route(PRESENCE);
exit;
}
if (is_method("ACK")) {
if (t_check_trans()) {
# no loose-route, but stateful ACK;
# must be an ACK after a 487
# or e.g. 404 from upstream server
route(RELAY);
exit;
} else {
# ACK without matching transaction ... ignore and discard
exit;
}
}
sl_send_reply("404", "Not here");
exit;
}
For example (please excuse formatting)
xxx.xx.xxx.97:5060 xxx.xx.xxx.96:5060 yyy.yyy.102.96:58308 xxx.xx.xxx.27:5060
----------w--------- ----------w--------- ----------w--------- ----------w---------
x INVITE (SDP) x x x
x --------------------------> x x x
x 100 trying -- your call is x x x
x <-------------------------- x x x
x x INVITE (SDP) x x
x x --------------------------> x x
x x 100 Trying x x
x x <-------------------------- x x
x x 180 Ringing x x
x x <-------------------------- x x
x 180 Ringing x x x
x <-------------------------- x x x
x x 200 OK (SDP) x x
x x <-------------------------- x x
x 200 OK (SDP) x x x
x <-------------------------- x x x
x ACK x x x
x --------------------------> x x x
x x x ACK x
x x x <-------------------------- x
x x 200 OK (SDP) x x
x x <<<------------------------ x x
Are there any known compatibility issues with kamctl and mysql 8.0.x?
Getting access denied when executing kamctl command. Kamcmd just hangs when executed.
Kamctlrc is setup proper and connection can be made direct from shell to database using the same credentials.
-dan