Hello,
I've noticed that the output format of xlog() changes from 5.3 to
5.4-nightly.
v5.3 xlog():
Feb 13 11:56:35 csbc01 csbc[27333]: NOTICE: {1 24727 REGISTER
b1d374f6-9b8c53ff(a)A.B.C.D} <script>: [log] auth successful
v5.4-nightly xlog():
Feb 13 11:56:35 csbc01 csbc[27333]: NOTICE: {1 24727 REGISTER
b1d374f6-9b8c53ff(a)A.B.C.D} <script>: xlog_helper(): [log] auth successful
Is there a way to avoid adding the extra "*xlog_helper():*" string? We have
a lot of scripts that parse the K logs for different reasons and I would
like to avoid having to update them all to match the new format.
I've tried adding *modparam("xlog", "prefix", "")* but it only affects the
"<script>:" part and not the "xlog_helper():" part.
Thanks,
Joel.
Hi,
According to https://kamailio.org/docs/modules/5.3.x/modules/dispatcher.html#dispatcher.…, ds_is_from_list should accept an integer variable for the group id parameter. The following simple example doesn¹t work however:
$var(foo) = 5;
ds_is_from_list($var(foo));
Kamailio logs ³function ds_is_from_list: parameter 1 is not constant². Is this a bug or have I misinterpreted the documentation somehow?
Thanks in advance,
Björn Bylander
Hi all
Over coffee we’ve been discussing the uniqueness and safety of call-id this morning. Lots of things like RTPEngine recording use call-id to generate filenames (yes it does escape them first :-). Not to mention dialog tracking (also uses from/to tags) etc.
Which got us thinking. As call-id is determined by the first SIP packet that normally comes from a UA, should we care if this UA was broken or worse malicious?
What would happen if they were repeated? For example we may struggle to determine a recordings owner in RTPEngine (file name format is callid+random.wav).
For security should we be rejecting requests where we’ve seen the call-id before?
All theoretical over coffee, as it was that or start working!
Just wondering what peoples thoughts were?
Cheers
Mark
Dear Community,
I have setup ACCDB module to save missed / failed and successful calls.
My issue is that i am getting duplicated entries for INVITE / BYE in acc
database table.
For example:
id;method;from_tag;to_tag;callid;sip_code;sip_reason;time;src_ip;dst_user;dst_domain;src_user;src_domain;cdr_id
231838;INVITE;21-7FC1D85;1914472180948750;KKyIdaaJceAu7pzN(a)172.16.0.35;200;OK;2020-02-11
19:16:28;22.33.44.55;nlb124#78019989897056;11.11.11.11;asterisk;172.16.0.35;0
231839;INVITE;21-7FC1D85;1914472180948750;KKyIdaaJceAu7pzN(a)172.16.0.35;200;OK;2020-02-11
19:16:28;22.33.44.55;nlb124#78019989897056;11.11.11.11;asterisk;172.16.0.35;0
231840;INVITE;21-7FC1D85;1914472180948750;KKyIdaaJceAu7pzN(a)172.16.0.35;200;OK;2020-02-11
19:16:28;22.33.44.55;nlb124#78019989897056;11.11.11.11;asterisk;172.16.0.35;0
231841;BYE;21-7FC1D85;1914472180948750;KKyIdaaJceAu7pzN(a)172.16.0.35;200;OK;2020-02-11
19:16:36;22.33.44.55;;190.196.153.130;asterisk;172.16.0.35;0
231842;BYE;21-7FC1D85;1914472180948750;KKyIdaaJceAu7pzN(a)172.16.0.35;200;OK;2020-02-11
19:16:36;22.33.44.55;;190.196.153.130;asterisk;172.16.0.35;0
231844;BYE;21-7FC1D85;1914472180948750;KKyIdaaJceAu7pzN(a)172.16.0.35;200;OK;2020-02-11
19:16:36;22.33.44.55;;190.196.153.130;asterisk;172.16.0.35;0
Following way:
# ----- acc params -----
/* what special events should be accounted ? */
modparam("acc", "early_media", 0)
modparam("acc", "report_ack", 0)
modparam("acc", "report_cancels", 0)
/* by default ww do not adjust the direct of the sequential requests.
* if you enable this parameter, be sure the enable "append_fromtag"
* in "rr" module */
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
modparam("acc", "log_flag", FLT_ACC)
modparam("acc", "log_missed_flag", FLT_ACCMISSED)
modparam("acc", "log_extra",
"src_user=$fU;src_domain=$fd;src_ip=$si;"
"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
/* enhanced DB accounting */
#!ifdef WITH_ACCDB
modparam("acc", "db_flag", FLT_ACC)
modparam("acc", "db_missed_flag", FLT_ACCMISSED)
modparam("acc", "db_url", DBURL)
#modparam("acc", "db_extra",
# "src_user=$fU;src_domain=$fd;src_ip=$si;"
# "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
modparam("acc", "db_extra",
"src_user=$fU;src_domain=$fd;dst_user=$rU;dst_domain=$rd;src_ip=$si")
# our lines
modparam("acc", "cdrs_table", "acc_cdrs")
modparam("acc", "cdr_on_failed", 1)
#!endif
Then in routing config i set setflag(FLT_ACC FLT_ACCMISSED FLT_ACCFAILED in
several places.
My question is - each setflag cause an entry to be saved in DB?
How can i debug and resolve the issue of duplicates.
I am trying to use a CDR script found somewhere on siremis sites to do the
accounting but it's making trouble because due to duplicates in acc table i
am getting cdrs unique key violations.
Secondary question is - if a BYE is not received / lost is there any way to
send a check triggered by kamailio to each caller and callee side to check
if dialog is still active.
I would not like to use session timers (as endpoints need to support it).
Best regards,
Tom
Hi All
Looking for the best way to achieve mapping from requested uri to actual uri in presence subscription.
The scenario I’ve been presented with is that there is a direct relation between extension number and sip user but they are not the same thing.
So for example;
Extension 10 is mapped to SIP user sip-SomethingLong
Extension 11 is mapped to SIP user sip-SomethingEvenLonger
When extension 10 subscribes to 11 we end up with something like this;
From: “Extension 10" <sip:sip-SomethingLong@ourpbx.com:5060>;tag=12345678
To: <sip:11@ourpbx.com:5060>;tag=987654321-c8bd
I *think* what I need to end up with in presence db is;
presently_uri = sip:sip-SomethingEvenLonger@ourpbx.com
to_user = 10
(Is that right?)
However I can’t see a standard way to achieve this. Manage_subscribe will let me override the watcher uri but not the watched.
Anyone see a simple way to achieve this?
Thanks
Mark
Hello all,
I would like to use rtpengine's media playback capabilities in an early
media scenario. The use case is as follows:
* Kamailio receives an incoming INVITE
* During INVITE processing, kamailio config script determines that an early
media message should be played back and then the call should fail with 4xx
* To that effect, Kamailio sends out a locally-generated 183 Progress and
instructs rtpengine to playback an audio file
* After the audio file has finished playing, kamailio responds with 4xx to
the INVITE
Is this possible at all? Thanks!
BR,
George
Hi there,
After below even route is triggered, Kamailio crashes with the following in
logs:
Feb 12 08:03:59 kamailio[24671]: INFO: <script>: Received HTTP/RPC request
from IP=127.0.0.1
Feb 12 08:03:59 kamailio[24671]: WARNING: <script>: Contact
myusername(a)sip.mydomain.net has expired
Feb 12 08:03:59 kamailio[24671]: INFO: drouting [drouting.c:483]:
rpc_reload(): RPC command received!
Feb 12 08:03:59 kamailio[24675]: CRITICAL: <core> [core/pass_fd.c:277]:
receive_fd(): EOF on 59
Feb 12 08:03:59 kamailio[24614]: ALERT: <core> [main.c:745]: handle_sigs():
child process 24671 exited by a signal 11
Feb 12 08:03:59 kamailio[24614]: ALERT: <core> [main.c:748]: handle_sigs():
core was not generated
Feb 12 08:03:59 kamailio[24614]: INFO: <core> [main.c:770]: handle_sigs():
terminating due to SIGCHLD
Feb 12 08:03:59 kamailio[24675]: INFO: <core> [main.c:825]: sig_usr():
signal 15 received
event_route[usrloc:contact-expired] {
xlog("L_WARN", "Contact $ulc(exp=>aor) has expired\n");
# Remove the sip: from the front of the Received URI
$var(exp_received) = $(ulc(exp=>received){s.substr,4,0});
sql_query("db", "UPDATE `dr_gateways` SET address = '127.0.0.1' WHERE
address = '$var(exp_received)'", "rz");
sql_result_free("rz");
jsonrpc_exec('{"jsonrpc": "2.0", "method": "drouting.reload", "id": 1}');
}
If I comment out the sql and jsonrpc_exec lines above - crash does not
happen.
Let me know if core dump is needed.
Thanks,
--Sergiu
Dear Community,
I would like to use rtpengine but had a very hard time to do the
compilation under ubuntu 16.04 and 18.04.
On Ubuntu 18.04 after already compiled the rtpengine i was unable to
install the deb packages.
Many different errors occurred.
I finally tried to install RTP engine on debian 10 and i was able to
install it.
I am thinking of 2 use scenarios:
- handling many concurrent calls like using rtpproxy for normall traffic
- make WebRTC to legacy RTP transcoding (convert WebRTC SDP to legacy SDP
to use with non webrtc compliant sip server)
For the first scenario i imagine that it would be far better to run
in-kernel mode because of performance.
For the second scenario i think userspace daemon should be fine ( i expect
not much traffic maximum 50-100 calls).
However my question is what is the correct order of installing the deb
packages.
Which packages do i really need.
For running rtpengine in docker could i use Debian 10 OS and compile
rtpengine and install just "
ngcp-rtpengine-daemon_6.2.0.0+0~mr6.2.0.0_amd64.deb" ? (the in this case
the host running docker can be any linux distribution?)
If i would like to run rtpengine in docker in kernel mode - is it possible
or i need to use same linux distribution in host and docker container
(because of the kernel match?)
Best regards,
Tom
Hi,
I stumbled upon an interop problem with a carrier. We have the
following scenario:
Gateway --> Loadbalancer --> Carrier
The loadbalancer generates a Via header for each request. But since it
is stateless, the Via tag is generated for each request. As a
consequence, the Via tag in the ACK differs from the one in the
INVITE. And one carrier doesn't handle those ACKs if the Via tag
differs.
Is there a way to force the creation of a "deterministic" Via branch
tag? For example, building it from a hash over call-id and from-tag or
something like that?
Thanks in advance
Sebastian
--
Sebastian Damm
Voice Engineer
__________________________________________
sipgate GmbH