I understand, to get the cdr you should have created the dialog before
replying.
Cheers,
Federico
On Fri, 14 Jun 2019, 17:05 Pejic, Miroslav, <miroslav.pejic(a)cloud.timenet.it>
wrote:
> [image: image.png]
>
> The call doesn't even begin, I immediately block it. :)
>
> Il giorno ven 14 giu 2019 alle ore 16:59 Pejic, Miroslav <
> miroslav.pejic(a)cloud.timenet.it> ha scritto:
>
>> Hi Federico,
>>
>> i tryied also with `modparam("acc", "cdr_on_failed", 1)`
>> but in my case the call is not saved at all on `acc_cdrs`,
>> with the second method i mentioned works :)
>> Thanks
>> Miro
>>
>> Il giorno ven 14 giu 2019 alle ore 16:14 Federico Cabiddu <
>> federico.cabiddu(a)gmail.com> ha scritto:
>>
>>> Hi,
>>> dialog CDR for failed calls can be generated enabling
>>>
>>> http://www.kamailio.org/docs/modules/devel/modules/acc.html#acc.p.cdr_on_fa…
>>>
>>> It has been some time since I last tested it, but it still should work :)
>>>
>>> Cheers,
>>>
>>> Federico
>>>
>>> On Fri, Jun 14, 2019 at 3:25 PM Daniel-Constantin Mierla <
>>> miconda(a)gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> it should be ok also with 2) if it gives what you want. Kamailio is
>>>> just writing to acc_cdrs, if you have extra columns, it should not be
>>>> affected.
>>>>
>>>> Cheers,
>>>> Daniel
>>>> On 14.06.19 14:16, Pejic, Miroslav wrote:
>>>>
>>>> Hi Daniel :)
>>>>
>>>> i tryied 2 methods to save it
>>>>
>>>> 1) i created a new table on kamailio_router called `acc`
>>>>
>>>> from `utils/kamctl/mysql/acc-create.sql`
>>>>
>>>> ```
>>>> CREATE TABLE `acc` (
>>>> `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
>>>> `method` VARCHAR(16) DEFAULT '' NOT NULL,
>>>> `from_tag` VARCHAR(128) DEFAULT '' NOT NULL,
>>>> `to_tag` VARCHAR(128) DEFAULT '' NOT NULL,
>>>> `callid` VARCHAR(255) DEFAULT '' NOT NULL,
>>>> `sip_code` VARCHAR(3) DEFAULT '' NOT NULL,
>>>> `sip_reason` VARCHAR(128) DEFAULT '' NOT NULL,
>>>> `time` DATETIME NOT NULL
>>>> );
>>>> CREATE INDEX callid_idx ON acc (`callid`);
>>>> ```
>>>> then
>>>>
>>>> ```
>>>> route[IS_CALLER_BLACKLISTED] {
>>>>
>>>> python_exec("check_caller_blacklisted");
>>>>
>>>> if ($var(callerBlacklisted) == 1){
>>>>
>>>> t_send_reply("403", "Forbidden");
>>>>
>>>> acc_db_request("403 Forbidden", "acc");
>>>>
>>>> exit;
>>>>
>>>> }
>>>>
>>>> ```
>>>>
>>>> in `acc` i have now calls that were not answered with 200ok :)
>>>>
>>>>
>>>> 2) add new fields on exsisting acc_cdrs table used to store cdrs
>>>>
>>>> ```
>>>> ALTER TABLE `acc_cdrs` ADD COLUMN `from_tag` varchar(128) DEFAULT NULL
>>>> AFTER `dst_domain`;
>>>> ALTER TABLE `acc_cdrs` ADD COLUMN `to_tag` VARCHAR(128) DEFAULT NULL
>>>> AFTER `from_tag`;
>>>> ALTER TABLE `acc_cdrs` ADD COLUMN `sip_code` VARCHAR(3) DEFAULT NULL
>>>> AFTER `to_tag`;
>>>> ALTER TABLE `acc_cdrs` ADD COLUMN `sip_reason` varchar(128) DEFAULT
>>>> NULL AFTER `sip_code`;
>>>> ALTER TABLE `acc_cdrs` ADD COLUMN `time` datetime DEFAULT NULL AFTER
>>>> `sip_reason`;
>>>> ```
>>>>
>>>> ```
>>>> route[IS_CALLER_BLACKLISTED] {
>>>>
>>>> python_exec("check_caller_blacklisted");
>>>>
>>>> if ($var(callerBlacklisted) == 1){
>>>>
>>>> t_send_reply("403", "Forbidden");
>>>>
>>>> acc_db_request("403 Forbidden", "acc_cdrs");
>>>>
>>>> exit;
>>>>
>>>> }
>>>>
>>>> ```
>>>>
>>>> In this way i have both stored calls that were not answered with 200ok
>>>> and that were answered with 200ok.
>>>> The idea is to have all in one table `acc_cdrs`.
>>>>
>>>> Can be ok also the second solution?
>>>>
>>>> Thank you very much!
>>>> Miro
>>>>
>>>> Il giorno ven 14 giu 2019 alle ore 09:06 Daniel-Constantin Mierla <
>>>> miconda(a)gmail.com> ha scritto:
>>>>
>>>>> Hello,
>>>>>
>>>>> I don't think that you can get a dialog-based CDR for calls that were
>>>>> not answered with 200ok. But you can get a record in acc table, by storing
>>>>> failed transaction record (see the mod params for acc and failed
>>>>> transaction flag or use acc_db_request()).
>>>>>
>>>>> Cheers,
>>>>> Daniel
>>>>> On 13.06.19 22:45, Pejic, Miroslav wrote:
>>>>>
>>>>> Hi :)
>>>>>
>>>>>
>>>>> I'm trying to save a failed call in the kamailio_router.acc_cdrs
>>>>> database
>>>>>
>>>>> after sending the 403 Forbidden by router, using the module acc, if is
>>>>> it possible?
>>>>>
>>>>>
>>>>> https://www.kamailio.org/docs/modules/5.2.x/modules/acc.html
>>>>>
>>>>>
>>>>> Something like this:
>>>>>
>>>>>
>>>>> route[IS_CALLER_BLACKLISTED] {
>>>>>
>>>>>
>>>>> python_exec("check_caller_blacklisted");
>>>>>
>>>>>
>>>>> if ($var(callerBlacklisted) == 1){
>>>>>
>>>>>
>>>>> t_send_reply("403", "Forbidden");
>>>>>
>>>>>
>>>>> IT’S POSSIBLE HERE SAVE A CALL ON KAMAILIO_ROUTER.ACC_CDRS?
>>>>>
>>>>>
>>>>>
>>>>> exit;
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>> Thanks in advance!
>>>>>
>>>>> Miro
>>>>>
>>>>> _______________________________________________
>>>>> Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>>
>>>>> --
>>>>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
>>>>>
>>>>> --
>>>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
>>>>
>>>> _______________________________________________
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users(a)lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>
Hi!
Is there any way to get which timer on transaction actually expired?
Scenario is following:
INVITE - 180 - 200 OK - (restransmissions 250 msec starts) - pause 15 sec - ACK.
In INVITE i'm setting
t_on_reply("MY_REPLY")
But in around 10 sec after first 200 OK (and 12 sec after INVITE) I'm getting in logs
DEBUG: tm [h_table.c:133]: free_cell_helper(): freeing transaction 0x7fb632d77090 from timer.c:689
and on next 200 OK I'm never getting into onreply_route[MY_REPLY] again.
Nowhere in the code or config I have explicit set any of timers with 10 or 12 seconds value. Most of them are default.
So, can I somehow get which timer expired exactly?
PS: If any, pause in 15 sec for a reason to emulate this issue.
Regards, Igor
Hello,
I am new to Kamailio and I am using Kamailio 5.2. When trying to the load
the XHTTP module, event route not found error is thrown and XHTTP is module
is not getting loaded. I am trying to use JSONRPC module through HTTP
transport for RPC calls. Using XMLRPC, things work fine.
DEBUG: <core> [core/sr_module.c:896]: init_mod(): xhttp
ERROR: xhttp [xhttp_mod.c:136]: mod_init(): failed to find
event_route[xhttp:request]
ERROR: <core> [core/sr_module.c:898]: init_mod(): Error while initializing
module xhttp (/usr/lib/kamailio/modules/xhttp.so)
ERROR: error while initializing modules
I have added below to Kamailio.cfg file:
loadmodule "xhttp.so"
event_route[xhttp:request] {
if(src_ip!=127.0.0.1) {
xhttp_reply("403", "Forbidden", "text/html",
"<html><body>Not allowed from $si</body></html>");
exit;
}
if ($hu =~ "^/RPC") {
jsonrpc_dispatch();
} else {
xhttp_reply("200", "OK", "text/html",
"<html><body>Wrong URL $hu</body></html>");
}
return;
}
Any help in this regard.
Thanks,
Dhruva
We have configured Kamailio IMS (P, I, S-CSCF) to use a single realm with the same NETWORKNAME and trying to make a call between bob and alice.
We are getting S-CSCF replies “Forbidden – Domain not served” in two scenarios:
1. When bob calls alice, the INVITE went from P->S->I->S and the destination S-CSCF responded this error
2. During SIP registration in responding to SUBSCRIBE (endpoint still can register even with this reply, so we proceeded with making call)
In quick search we found that in scscf/kamailio.cfg route{ } implementation there is a case when this error is generated:
# Terminating
if (uri == myself || uri =~ "tel:.*") {
if (!term_impu_registered("location")) {
xlog("L_DBG", "We need to do an UNREG server SAR assignemnt");
assign_server_unreg("UNREG_SAR_REPLY", "location", "term");
exit;
}
} else {
sl_send_reply("403","Forbidden - Domain not served");
exit();
}
route(term);
break;
What is this error designed for? Also in general are we supposed to rework the routing code in Kamailio.cfg (P, S, I-CSCF)?
Thanks for any suggestions in advance.
Yin
Hi,
Heads up... I suspect the Kamailio 5.2.x RPM files for CentOS 7 were
recently updated June 10th and are now no longer accepted by a standard yum
install...
*Repository file in /etc/yum.repos.d/:*
[home_kamailio_v5.2.x-rpms]
name=RPM Packages for Kamailio v5.2.x (CentOS_7)
type=rpm-md
baseurl=
http://download.opensuse.org/repositories/home:/kamailio:/v5.2.x-rpms/CentO…
gpgcheck=1
gpgkey=
http://download.opensuse.org/repositories/home:/kamailio:/v5.2.x-rpms/CentO…
enabled=1
*Operating System Version:*
CentOS Linux release 7.6.1810 (Core)
(Fresh image -- varying cloud providers)
*Command to install:*
yum install kamailio
*Resulting error message:*
kamailio-5.2.3-4.el7.centos.x8 FAILED
http://download.opensuse.org/repositories/home%3A/kamailio%3A/v5.2.x-rpms/C…:
[Errno 14] HTTPS Error 416 - Requested Range Not Satisfiable
Trying other mirror.
Error downloading packages:
kamailio-5.2.3-4.el7.centos.x86_64: [Errno 256] No more mirrors to try.
*Troubleshooting:*
I verified the IP address for the opensuse URL with three different
Internet providers and tested the installation on servers in different
cloud providers geolocated in both Canada and United States and received
the exact same results in all cases.
--
Joshua Riffle
*DevOps Lead & Duke of the Dial Tone*
We Are Skyetel and You Are Awesome.
p: (360) 843-9903 o: (360) 986-5200
s: http://www.skyetel.com e: josh(a)skyetel.com
Hello,
What does this CRITICAL error mean?
Jun 11 05:48:13 debian8 /usr/local/sbin/kamailio[8468]: {1 1 INVITE
Njg0MzNhMzJhOTY3MzQ3NmNlNWY0ODkzMTJmNTM1ZTk.} CRITICAL: <core>
[core/mem/q_malloc.c:486]: qm_free(): BUG: bad pointer 0xa3c188 (out
of memory block!) called from core: core/data_lump.c: free_lump(466) -
aborting
I got it when i make new call during debugging new module in Kamailio?
In module we have to change some message's body with data_lump.
I asked relaed issue (strange behaviour while developing new module)
in Kamailio developer forum <sr-dev(a)lists.kamailio.org>
With Best Regards.
--
--Mojtaba Esfandiari.S
Hi!
Just to confirm, is event route [dialog:end] not called on fr_inv_timer expiry?
Cause it's called on call busy (486) and reject (whatever 6xx). So, what's the idea of not calling it on timeout? Or I'm missing something?
Kamailio 5.2
Thanks!
Regards, Igor.
Hello,
I was wondering if there are any best practices for authenticating
websocket connection establishment inside the xhttp event route?
Thanks and regards,
Grant
Hi All,
In our setup running kamailio (alpine image) in stateless mode and have following TCP config set. After client registers to the backend see two TCP connections created - one towards the client and the other towards the backendserver. If there's a abrupt network disconnect either at the client side or at the backend side, do not see TCP reset happening from kamailio as per the config. Per below config expected after 120seconds( = [tcp_keepidle] + ( [tcp_keepintvl * tcp_keepcnt] ) instead it keeps resending TCP keepalive packets at varying intervals for varying duration length(like 6mins, 14mins..) before resetting the TCP connections. Also want to mention that we are not using TCPOPS module here.
I am trying to achieve consistent duration for TCP reset in kamailio. Could you please point me if I have missed anything here?
Setup:
Client ---- Kamailio (stateless mode) ---- Backend server
TCP Config:
tcp_connection_lifetime = 3600
tcp_accept_aliases = no
tcp_async = yes
tcp_connect_timeout = 10
tcp_crlf_ping = yes
tcp_keepalive = yes
tcp_keepcnt = 3
tcp_keepidle = 30
tcp_keepintvl = 30 # Total 2 mins - 30+(30*3)=120 sec
tcp_linger2 = 30
tcp_rd_buf_size = 65536
tcp_send_timeout = 10
thanks,
raj