Hello all,
I am trying to periodically send SIP OPTIONS to all connected WebRTC clients from Kamailio. The functionality is similar to qualify=yes of Asterisk. Following are the configuration changes I have made to get this working.
#!define FLB_NATSIPPING 7
<snip/>
loadmodule "nathelper.so"
<snip/>
# ----- nathelper params -----
modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")
modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
modparam("nathelper", "…
[View More]natping_interval", 20)
modparam("nathelper", "sipping_from", "sip:pinger@kamailio.org")
<snip/>
# Handle SIP registrations
route[REGISTRAR] {
if (is_method("REGISTER")) {
xlog("L_INFO", "Processing REGISTER in route[REGISTRAR]\n");
if(isflagset(FLT_NATS)) {
setbflag(FLB_NATB);
# do SIP NAT pinging
xlog("L_INFO", "Setting FLB_NATSIPPING\n");
setbflag(FLB_NATSIPPING);
}
if (!save("location")) {
sl_reply_error();
}
xlog("L_INFO", "Successfully processed REGISTER in route[REGISTRAR]\n");
exit;
}
}
When the WebRTC client registers, I can see the log: Setting FLB_NATSIPPING, but SIP OPTIONS packets are not seen. I am checking it using the Chrome console, at client side as well as sipdump module in server side.
Do I have to do any additional configuration? I am not posting the full config file here so that its easy to focus on the relevant parts, but can do that if needed.
Thanks and regards,
X.
[View Less]
Hello,
please keep the list in CC – that others can comment as well.
Can you actually connect from the kamailio system e.g. with mysql client? If yes, as I said – I would try to debug the issue further with network analysis tools.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>
From: Paclinio <thomas.leutscher(a)gmail.com>
Sent: Monday, March 28, 2022 1:11 PM
To: Henning Westerholt <hw(a)gilawa.…
[View More]com>
Subject: Re: [SR-Users] Kamailio : kamctl address reload with HAProxy
Hello,
KAMCTL :
I've resolved the problem with kamctl that now can communicate with my remote Cluster by adding this line in kamctlrc.
// HAPROXY = 192.168.1.37
DBHOST=192.168.1.37
DBACCESSHOST=192.168.1.37
I can now add and reload new addresses with success.
KAMAILIO + HAPROXY:
But now, I've this issue when restarting kamailio.
Mar 28 10:54:39 kamailio /usr/sbin/kamailio[8416]: ERROR: permissions [address.c:233]: reload_address_db_table(): database problem - invalid record
Mar 28 10:54:39 kamailio /usr/sbin/kamailio[8416]: ERROR: permissions [permissions.c:657]: mod_init(): failed to initialize the allow_address function
Mar 28 10:54:39 kamailio /usr/sbin/kamailio[8416]: ERROR: <core> [core/sr_module.c:942]: init_mod(): Error while initializing module permissions (/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so)
My DBURL is
#!substdef "!DB_USER!kamailio!g"
#!substdef "!DB_PASS!XXXXX!g"
#!substdef "!DB_HOST!192.168.1.37!g" // HA PROXY
#!substdef "!DB_PORT!MY_PORT_DB!g"
#!substdef "!DB_NAME!kamailio!g"
#!define DBURL "mysql://DB_USER:DB_PASS@DB_HOST/DB_NAME"
KAMAILIO + REMOTE DB :
Even I using a remote database I'm getting the same issue.
I've discovered the connection between kamailio and remote database is aborded instantly after restarting kamailio.
Mar 28 11:47:30 db03srv mariadbd[874]: 2022-03-28 11:47:30 44076 [Warning] Aborted connection 44076 to db: 'kamailio' user: 'kamailio' host: '192.168.1.41' (Got an error reading communication packets)
Thank you
[Das Bild wurde vom Absender entfernt.]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campai…>
Virus-free. www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campai…>
Le dim. 27 mars 2022 à 22:52, Henning Westerholt <hw(a)gilawa.com<mailto:hw@gilawa.com>> a écrit :
Hello,
it seems the data that gets delivered to the Kamailio is corrupted. Analyse it further e.g. with a network trace, wireshark etc..
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>
From: sr-users <sr-users-bounces(a)lists.kamailio.org<mailto:sr-users-bounces@lists.kamailio.org>> On Behalf Of Paclinio
Sent: Friday, March 25, 2022 5:22 PM
To: sr-users(a)lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
Subject: [SR-Users] Kamailio : kamctl address reload with HAProxy
Dear colleagues,
I've installed a Galera cluster with a HAProxy that kamailio interacts with.
Kamailio's DBURL is linked to the proxy that will contact the databases.
Kamailio works fine except when I need to reload something from the database (Using kamctl).
When cache and database are the same I receive
sudo kamctl address reload
{
"jsonrpc": "2.0",
"result": "Reload OK",
"id": 13111
}
Now when I have something using kamctl, it still works and is replaced on all my databases.
sipsecure@kamailio:~$ sudo kamctl address add 0 192.168.48.15 32 0 Test
-e \E[37;33mINFO: execute '/sbin/kamctl address reload' to synchronize cache and database
Then when i try to reload i receive
sipsecure@kamailio:~$ sudo kamctl address reload
{
"jsonrpc": "2.0",
"error": {
"code": 500,
"message": "Reload failed."
},
"id": 13504
}
And when I'm going to read my logs to see a error, I only see that little sentence
Mar 25 17:14:40 kamailio /usr/sbin/kamailio[13343]: ERROR: permissions [address.c:233]: reload_address_db_table(): database problem - invalid record
Could I have some explanation ?
Thank you.
[Das Bild wurde vom Absender entfernt.]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campai…>
Virus-free. www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campai…>
[View Less]
Hello,
I'm inserting some headers after getting value from http_async_query. If a
call is relayed, I see them. But If I t_suspend and t_continue call (before
time out), I do not see added headers. Here is flow:
route(START)
t_newtran();
#.. prep for query
http_async_query("url","HTTP");
route(HTTP)
#.. collect and using data from query
insert_hf("$var(key): $var(value)\r\n");
t_store();
if (registered("location") {
route(RELAY);
} else {
t_suspend();
exit;
}
route(AWAKE)
…
[View More]t_continue();
I see that the branch index ($T_branch_idx) is 0 at start. 1 after http
query, +1 if there is forking or location. +1 after t_suspend. It looks
like t_continue uses a branch with index after t_suspend. I tried with
t_save_lumps() to carry over changes.
Any idea how to do this?
[View Less]
Dear colleagues,
I've installed a Galera cluster with a HAProxy that kamailio interacts
with.
Kamailio's DBURL is linked to the proxy that will contact the databases.
Kamailio works fine except when I need to reload something from the
database (Using kamctl).
When cache and database are the same I receive
sudo kamctl address reload
> {
> "jsonrpc": "2.0",
> "result": "Reload OK",
> "id": 13111
> }
Now when I have something using kamctl, it still works and is replaced …
[View More]on
all my databases.
sipsecure@kamailio:~$ sudo kamctl address add 0 192.168.48.15 32 0 Test
> -e \E[37;33mINFO: execute '/sbin/kamctl address reload' to synchronize
> cache and database
Then when i try to reload i receive
sipsecure@kamailio:~$ sudo kamctl address reload
> {
> "jsonrpc": "2.0",
> "error": {
> "code": 500,
> "message": "Reload failed."
> },
> "id": 13504
> }
And when I'm going to read my logs to see a error, I only see that little
sentence
Mar 25 17:14:40 kamailio /usr/sbin/kamailio[13343]: ERROR: permissions
> [address.c:233]: reload_address_db_table(): database problem - invalid
> record
Could I have some explanation ?
Thank you.
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campai…>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campai…>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
[View Less]
Hello,
I have a very basic Kamailio 5.4 configuration on Debian 11 with
RTPProxy 2.2 behind a firewall. It works fine with the sip client
logging into the server public ip address. However, the sip client is
not able to log in when using a dns domain name directed to that public
ip address. Is there a specific setting in the Kamailio and/or RTPProxy
config files for using a dns domain name instead of a numeric ip address?
Also, is there a Kamailio module that allows use of encrypted keys …
[View More]
instead of passwords when logging in?
Thanks for any info,
Steve
[View Less]
Hi Kamailio community
Any advise on how to archive this
sip.mydomain.comsip.mypbx.com
sip_phone =======sip/tls=======> KAMAILIO =========sip/udp=======>PBX
sip_phone should register to Kamilio with tls
Kamailio should proxy register to PBX with udp
sip_phone invites should be proxied to PBX
in sip_client setting he will point to sip.mydomain.com as his server
Regards
Hello,
I'm inserting some headers after getting value from http_async_query. If a
call is relayed, I see them. But If I t_suspend and t_continue call (before
time out), I do not see added headers. Here is flow:
route(START)
t_newtran();
#.. prep for query
http_async_query("url","HTTP");
route(HTTP)
#.. collect and using data from query
insert_hf("$var(key): $var(value)\r\n");
t_store();
if (registered("location") {
route(RELAY);
} else {
t_suspend();
exit;
}
route(AWAKE)
…
[View More]t_continue();
I see that the branch index ($T_branch_idx) is 0 at start. 1 after http
query, +1 if there is forking or location. +1 after t_suspend. It looks
like t_continue uses a branch with index after t_suspend. I tried with
t_save_lumps() to carry over changes.
Any idea how to do this?
[View Less]
Hello community,
We currently have some issues with Kamailio SCSCF forwarding a large SIP UDP INVITE packet(size around 3000bytes), it got dropped somewhere in the ethernet. I tried increase the MTU size on both sides' interface and even define it on the switch port, but still no luck.
So I am thinking to force SCSCF to send this INVITE over TCP, I followed this link: https://andersbrownworth.com/cms/264/, enabled naptr in SCSCF config and configured NAPTR and SRV DNS record, but the SCSCF …
[View More]still stop even forward it out. I think I did the DNS part right cause when I switch the NAPTR record to point to UDP it worked.
Anyone have some experience with configure SCSCF forwarding SIP through TCP?
BR,
Weiqi
[View Less]