Hello, we have faced an issue which appears when TOPOH module is enabled, call is made from WebRTC client, then transferred by callee.
We have WebRTC client behind load balancer. We make call to softphone from WebRTC, call from softphone is transferred to external number using Asterisk.
When call is hanged up on external number side, it doesn't hangs up on WebRTC client side.
If TOPOH is not enabled, this issue doesn't occur.
We have the following TOPOH-related sections of kamailio.cfg:
<...>
#!ifdef WITH_TOPOH
loadmodule "topoh.so"
#!endif
<...>
<...>
#!ifdef WITH_TOPOH
modparam("topoh", "mask_key", "xxxxxxxxxxxxxxxx")
modparam("topoh", "mask_ip", "10.0.0.1")
modparam("topoh", "mask_callid", 0)
modparam("topoh", "sanity_checks", 1)
modparam("topoh", "uparam_prefix", "")
modparam("topoh", "vparam_prefix", "")
modparam("topoh", "callid_prefix", "1337")
#!endif
<...>
<...>
#!ifdef WITH_DIALOG
modparam("dialog", "db_url", DBURL)
modparam("dialog", "db_mode", 1)
modparam("dialog", "db_fetch_rows", 800)
modparam("dialog", "track_cseq_updates", 1)
modparam("dialog", "ka_interval", 30)
modparam("dialog", "ka_timer", 30)
modparam("dialog", "send_bye", 0)
modparam("dialog", "dlg_filter_mode", 1)
#!ifdef WITH_TOPOH
modparam("dialog", "lreq_callee_headers", "TH: dlh\r\n")
#!endif
#!endif
<...>
<...>
#!ifdef WITH_DISPATCHER
event_route[dispatcher:dst-up] {
sql_query("ds_dburl", "select description from dispatcher where destination='$ru'", "ds_dbresult");
xlog("L_WARN", "Destination up: $ru, found name: $dbr(ds_dbresult=>[0,0])\n");
prom_gauge_set("trunk_reachability", "1", "$ru", "$dbr(ds_dbresult=>[0,0])");
}
event_route[dispatcher:dst-down] {
sql_query("ds_dburl", "select description from dispatcher where destination='$ru'", "ds_dbresult");
xlog("L_WARN", "Destination down: $ru, found name: $dbr(ds_dbresult=>[0,0])\n");
prom_gauge_set("trunk_reachability", "0", "$ru", "$dbr(ds_dbresult=>[0,0])");
}
#!endif
#!ifdef WITH_TOPOH
event_route[topoh:msg-sending] {
if(is_reply() and $rs=="302") {
drop;
}
}
#!endif
(can provide the full config, if needed)
We are receiving the following errors:
On transfer:
https://pastebin.com/H3FQ4Kpj
On hangup from external number side:
https://pastebin.com/wgfRzGbd
On hangup from WebRTC client side:
https://pastebin.com/sE0yhBae
There are also differences in SIP traffic when TOPOH is disabled and when it is enabled. With TOPOH enabled, apparently, ACK from Asterisk is not reaching kamailio:
asterisk INVITE -> kamailio -> WebRTC
WebRTC 200 -> kamailio -> asterisk
asterisk ACK -> kamailio -> -> ->
(SIP flows attached - topoh_on.csv, topoh_off.csv)
kamailio -v
version: kamailio 5.6.1 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, 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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
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: unknown
compiled on 09:11:15 Nov 15 2022 with gcc 9.3.0
We have dockerized kamailio running on Ubuntu 16.04.3 LTS
Docker version 18.03.1-ce, build 9ee9f40
Please advise where to start looking.
Hello,
It's off-topic, but it was several times discussed here on the list.
It seems that the upcoming 18.17 and 20.2 asterisk version seems to properly support path headers. From the announcement:
* [ASTERISK-30100<https://issues.asterisk.org/jira/browse/ASTERISK-30100>] -
res_pjsip: Path is ignored on INVITE to endpoint
(Reported by Yury Kirsanov)
This bug has been many years open. have not tried it yet, but it looks promising.
Cheers,
Henning
--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>
Hello everyone,
I am following up on my previous email regarding printing Global Parameter values and logging JSONRPC requests over UDP in Kamailio. I understand that everyone might be busy, but I would greatly appreciate any guidance or suggestions you can provide on these topics.
To recap my questions:
1)Is there a way to print the Global Parameter values, such as debug, children, flags, etc., within the Kamailio configuration file, to ensure they have been changed?
2°How can I log in Kamailio that it has received a JSONRPC request over UDP? I have been successful in logging this information when using HTTP and JSONRPC but am unsure how to do it with UDP.
Any input or advice would be truly valuable. Thank you in advance for your time and assistance.
Best.
Hi,
what can be the reason why usrloc module sometimes can read from database, sometimes not?
Normal operation looks ok, the location table is kept up to date. The problem seems to be related with RPC (kamcmd or jsonrpc). For example,
kamcmd ul.dump # ok
kamcmd ul.lookup location 6351*1 # ok
kamcmd ul.db_users location # error: 500 - Failed to use table
Error 500 correlates with syslog entry: ERROR: <core> [db.c:481]: db_use_table(): invalid connection parameter
Who connects where? In my understanding usrloc via core to mysql. I suppose RPC calls do not fail if usrloc can operate on kamailio memory, does that make sense? If so, what usrloc parameter can I tweak to fix error 500 ? I don't find any usrloc parameter regarding db connection.
(Opening another mysql session as user kamailio is no problem, so we re not running out of connections.)
Thanks in advance!
Volker
[cid:fb71bb9b-ad4f-4110-824b-d6805406bf6a]
Volker Denneberg
Development
Telefon: +49 241 980 986 41
Web: www.m3connect.de<https://mx.scientific.de/owa/redir.aspx?C=RW1TSCipXQC6K0Yw1m69CGqyTwJHXjiiN…>
E-Mail: v.denneberg(a)m3connect.de<https://mx.scientific.de/owa/redir.aspx?C=BjBXIUrD2WCryLRZ2IrAAwEu0b0W0ciUY…>
m3connect GmbH | Pascalstr.18 | 52076 Aachen | DE/Germany | Amtsgericht Aachen | HRB 8773 | USt.- ID: DE219 664 658 | Geschäftsführer/CEO: Emilio Dragas
Hi
We have two registrars.
Today I observed a CPE doing this:
CPE REGISTER (no auth) => Registrar 1 => 407 Challenge NONCE A
CPE REGISTER (auth to NONCE A => Registrar 2 => 407 Challenge NONCE B
CPE REGISTER (auth to NONCE B => Registrar 1 => 407 Challenge NONCE A
and so on.
Time on both registrars is in sync (I tought NONCE was based on time)
Is there a way to sync the NONCE so that both would accept
authentication based on the same NONCE?
Mit freundlichen Grüssen
-Benoît Panizzon-
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________
Dear everyone,
I am wondering if there is a way to print the Global Parameter values such as debug, children, flags, etc. just to make sure that they have been changed. I am aware that I can use the `kamcmd cfg.get core debug` command to check the value of the debug parameter for example, but I am wondering if there is a way to do this in the configuration file of Kamailio.
Additionally, I would like to know if there is a way to print in the log of Kamailio that it received a JSONRPC request over UDP. I have been able to print some logs when using HTTP and JSONRPC to know that the server has received a JSONRPC request, but I am unsure how to do this when using UDP.
I would greatly appreciate it if someone could provide some guidance.
Thank you in advance for your time and assistance.
Best regards.
Hello,
Thank you very much! I've used your suggestion to accomplish some amazing things. However, I'm having an issue when calling the procedures over jsonrpc with http. I've noticed that the number of "200" responses gets incremented by 2, which is not the case when using the `*kamcmd*` tool. I suspect that this may be due to jsonrpc using *http/https*, which iscausing Kamailio to treat it as a "200" http responses code as "200" SIP codes. Could you advise on how to avoid this issue?
Is there any further configuration that needs to be done?
Best regards.
Hello everyone,
I'm trying to store the call statistics in my Kamailio server. I'm using SQLite just to understand what type of information i can store.
I'm using the dialog module with the classic parameters:
enable_stats => 1
dlg_flag => 4
hash_size => 4096
db_url => sqlite:///usr/local/etc/kamailio/kamailio.sqlite
db_mode => 1
I'm able to open the DB but everything is empty, am i using the wrong modules? or i didn't configure the server well?
The goal is to store CALL CDR in the DB, so that i can see who called & how many times etc