Dear,
then could I use to retrieve the user from location then set the ruri ?
$var(uri1)="sip:9919995@192.168.1.41";
> lookup("location","$var(uri1)");
>
> $uac_req(ruri)=$ru;
>
Best Regards
*Youssef *
Dear,
When using : sudo kamctl address reload
sipsecure@kamailio:/$ sudo kamctl address reload
[sudo] password for sipsecure:
{
"jsonrpc": "2.0",
"result": "Reload OK",
"id": 73482
}
I looked for the command I could use in kamailio.cfg
route[JSON_ADDRESS_RELOAD]{
xlog("MY_SEVERITY"," RPC REQUEST : RELOAD ADDRESS TABLE");
jsonrpc_exec('{"jsonrpc": "2.0","method": "permissions.addressReload"}');
exit;
}
Now I am able to call a rpc command from the code ;-)
Best Regards
--
Youssef
Hello all,
I have a [SIP client] <-> Kamailio <-> Asterisk installation. Sip clients are both WebRTC and Android app. WebRTC connects via 443 while Android app connects VIA TLS at port 5061. WebRTC client uses jsSIP library. My Kamailio version is 5.5.3 (x86_64/linux)
I had been using asterisk directly to terminate WebRTC clients previously and was using the qualify feature to periodically send OPTIONS packet to all connected clients as a keep alive mechanism. This allowed the client to detect any loss of connectivity and reconnect back to server if there is any loss of connectivity.
After moving to Kamailio I am looking for a similar feature, where Kamailio sends OPTIONS (or any other packets) periodically to the WebRTC clients. My attempts so far hasn't been a success.
I am aware of couple of options for keepliave in kamailio:
1. nat_keeplaive()
I have some what naively copied the example from nat_keepalive() documentation into route[NATDETECT] but that is not working.
route[NATDETECT] {
force_rport();
#!ifdef WITH_WEBSOCKETS
if (nat_uac_test(64)) {
if (is_method("REGISTER")) {
fix_nated_register();
} else {
if (!add_contact_alias()) {
sl_send_reply("400", "Bad Request");
exit;
}
}
setflag(FLT_NATS);
return;
}
#!endif
if (nat_uac_test(19)) {
if (is_method("REGISTER")) {
fix_nated_register();
}
fix_contact();
}
setflag(FLT_NATS);
if ((method=="REGISTER" || method=="SUBSCRIBE" ||
(method=="INVITE" && !has_totag())) && client_nat_test("3"))
{
nat_keepalive();
}
return;
}
2. keepalive module
This looks like what I want, but I am not sure how to add a new WebRTC connection to the list of endpoints for pinging.
This is the handler for xhttp:request, should the ka_add_destination be added here?
event_route[xhttp:request] {
set_reply_close();
set_reply_no_connect();
if ($Rp != MY_WS_PORT
#!ifdef WITH_TLS
&& $Rp != MY_WSS_PORT
#!endif
) {
xlog("L_WARN", "HTTP request received on $Rp\n");
xhttp_reply("403", "Forbidden", "", "");
exit;
}
if ($hdr(Upgrade)=~"websocket" && $hdr(Connection)=~"Upgrade" && $rm=~"GET") {
if ($hdr(Host) == $null || !is_myself("sip:" + $hdr(Host))) {
xhttp_reply("403", "Forbidden", "", "");
exit;
}
if (ws_handle_handshake())
{
exit;
}
}
xhttp_reply("404", "Not Found", "", "");
}
My search so far has not returned any other means to send options packets to WebRTC clients. Been banging my head around this for couple of days, and any help will be much appreciated.
X.
Hello,
I have two Kamailio nodes. Couple of days of ago I enabled dmq to
replicate dialogs between these two Kamailio nodes. Now that the dmq
is enabled, we are seeing lot of warning and notice messages on
kamailio logs related to the dialog module. Is there something I have
missed when configuring dlg_manage & dmq replication that might cause
this? No calls have been affected negatively by this though.
Kamailio 1 node prints lot of this:
Mar 4 08:20:25 /usr/sbin/kamailio[14316]: WARNING: dialog
[dlg_handlers.c:1328]: dlg_onroute(): unable to find dialog for ACK
with route param 'a5d.ebf1' [3418:8126] and call-id
'SDiu98001-dd9c12fea650b9d1408dd672a2c51c9f-v300g00020'
Mar 4 08:20:28 /usr/sbin/kamailio[14313]: WARNING: dialog
[dlg_handlers.c:1328]: dlg_onroute(): unable to find dialog for BYE
with route param 'a5d.ebf1' [3418:8126] and call-id
'SDiu98001-dd9c12fea650b9d1408dd672a2c51c9f-v300g00020'
Mar 4 08:21:56 /usr/sbin/kamailio[14315]: WARNING: dialog
[dlg_handlers.c:1328]: dlg_onroute(): unable to find dialog for ACK
with route param '689.f2f1' [2438:7983] and call-id
'SD8o63c01-47972a87ee1fd8791ddf27b650badcba-v300g00010'
Kamailio 2 node prints lot of this:
Mar 4 08:20:29 /usr/sbin/kamailio[8005]: NOTICE: dialog
[dlg_hash.c:242]: dlg_clean_run(): dialog in early state is too old
(0x7fe07b84e980 ref 1)
Mar 4 08:20:29 /usr/sbin/kamailio[8005]: NOTICE: dialog
[dlg_hash.c:242]: dlg_clean_run(): dialog in early state is too old
(0x7fe07bb03360 ref 1)
Mar 4 08:21:59 /usr/sbin/kamailio[8005]: NOTICE: dialog
[dlg_hash.c:242]: dlg_clean_run(): dialog in early state is too old
(0x7fe07b528300 ref 1)
(Version: kamailio 5.5.3 (x86_64/linux) 473cef on both kamailio nodes)
[root@kamailio-1]# kamcmd dmq.list_nodes
{
host: 172.19.194.140
port: 5060
proto: *
resolved_ip: 172.19.194.140
status: active
last_notification: 0
local: 0
}
{
host: 172.19.194.132
port: 5060
proto: *
resolved_ip: 172.19.194.132
status: active
last_notification: 0
local: 1
}
[root@kamailio-2]# kamcmd dmq.list_nodes
{
host: 172.19.194.132
port: 5060
proto: *
resolved_ip: 172.19.194.132
status: active
last_notification: 0
local: 0
}
{
host: 172.19.194.140
port: 5060
proto: *
resolved_ip: 172.19.194.140
status: active
last_notification: 0
local: 1
}
### On Kamailio 1: ###
#!define DMQ_LOCAL_ADDR "sip:172.19.194.132:5060"
#!define DMQ_PEER_ADDR "sip:172.19.194.140:5060"
### On Kamailio 2: ###
#!define DMQ_LOCAL_ADDR "sip:172.19.194.140:5060"
#!define DMQ_PEER_ADDR "sip:172.19.194.132:5060"
### On Kamailio 1 & 2:###
modparam("dmq", "server_address", DMQ_LOCAL_ADDR)
modparam("dmq", "notification_address", DMQ_PEER_ADDR)
modparam("dialog", "profiles_with_value", "total_dialogs")
modparam("dialog", "enable_dmq", 1)
route[INITIAL] {
...located at the bottom of the initial route...
if(is_method("INVITE") && !has_totag()) {
dlg_manage();
}
}
Cheers,
Olli
Hi all,
I have a little question.
I tried SMS over IMS on my smartphones with docker_open5gs (using Kamailio
and Open5GS), and the multibyte message (Japanese) was garbled at the
recipient smartphone.
docker_open5gs URL: https://github.com/herlesupreeth/docker_open5gs
Also, docker_open5gs uses Kamailio v5.3.
I would be very glad if you could tell me about Kamailio's support for
multi-byte SMS.
Best regards,
--Shigeru