hello everyone, i am trying to parse the xml from the message body: get_body_part("application/pidf+xml", "$var(pbody)"); and i am getting the following in my pbody var: Content-Disposition: render;handling=optionalContent-ID: <sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org><?xml version="1.0"?><presence xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10" xmlns:gml="http://www.opengis.net/gml" xmlns:gs="http://www.opengis.net/pidflo/1.0" xmlns:con="urn:ietf:params:xml:ns:geopriv:conf" entity="sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org"><dm:device id="Wifi"><gp:geopriv><gp:location-info><gs:Circle srsName="urn:ogc:def:crs:EPSG::5524"><gml:pos>31.204359 -44.512358</gml:pos><gs:radius uom="urn:ogc:def:uom:EPSG::8190">10.578000</gs:radius></gs:Circle><con:confidence pdf="normal">92</con:confidence></gp:location-info><gp:method>DBH_HELO</gp:method><gp:usage-rules/></gp:geopriv><dm:timestamp>2022-04-05T19:16:34Z</dm:timestamp></dm:device></presence> how can i escape the first two lines in order to get the xml part of the content? thanks in advance,Art
Hi
I am trying to use the jannson_get function to pull field "secret" from
the below json:
{"3":{"options":{"secret":"mybigsecret"}}}
This works is I use jansson_get("3.options.secret".....
However, I need to know the value of "3" in order to use it. I have
tried all the variations on path I can find, but none apart from using
the actual root value work for me.
How can I either:
1. Construct a PATH which will pick this up, or
2. Obtain this root value ("3" in my example)
I have tried testing using https://jsonpath.com/ and a path of
"$..secret" and "$..options.secret" works there, but not in jansson
kamailio module.
Any assistance much appreciated.
Thanks
--
-Barry
Dear Expert Kamailio,
I use this tutorial kamctl to make kamailio and other sip server
communicated
https://manpages.ubuntu.com/manpages/xenial/man8/kamctl.8.html
but, i cannot found further tutorial how use kamctl.
Could you please share, the detail/further tutorial and example of kamctl
usage..
Since i always found error/failure during execute some command from the
link, here captured:
(1).
# kamctl cr dump
-e \E[37;31mERROR: Error opening Kamailio's FIFO
/var/run/kamailio/kamailio_rpc.fifo
-e \E[37;31mERROR: Make sure you have loaded the jsonrpcs module and set
FIFO transport parameters
(2).
# kamctl lcr show_gws
-e \E[37;31mERROR: command disabled
(3).
# kamctl lcr reload
-e \E[37;31mERROR: command disabled
(4).
# kamctl ping 192.168.31.50
{
"jsonrpc": "2.0",
"error": {
"code": 400,
"message": "Invalid request uri \"192.168.31.50\""
},
"id": 76608
}
(5).
# kamctl cr reload
{
"jsonrpc": "2.0",
"error": {
"code": 500,
"message": "Method Not Found"
},
"id": 76659
}
Warm Regards,
>
Hi there,
I've two kamailio servers sharing dlg vars between them and I've noticed
that during high call load (~50-70 CPS) the kamailio that is processing all
the calls and sharing the dialogs with the other kamailio, stops processing
SIP.
If I set the parameter enable_dmq to 0 I cannot replicate the issue so I
assume that it's related to dialog replication through DMQ.
*Kamailio version: *5.4.7 - I've tested with recent versions but the issue
remains
*Configurations of Kamailio_1:*
# ----- dialog params -----
modparam("dialog", "dlg_flag", FLD_DLG)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "enable_dmq", 1)
modparam("dialog", "h_id_start", 1000)
modparam("dialog", "h_id_step", 6000)
# ----- dmq params -----
modparam("dmq", "server_address", "sip:INTERNAL_INSTANCE_IP:5060")
modparam("dmq", "notification_address", "DMQ_NOTIFICATION_ADDRESS")
modparam("dmq", "multi_notify", 1)
modparam("dmq", "ping_interval", 10)
modparam("dmq", "num_workers",4)
*Configurations of Kamailio_2:*
# ----- dialog params -----
modparam("dialog", "dlg_flag", FLD_DLG)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "enable_dmq", 1)
modparam("dialog", "h_id_start", 5000)
modparam("dialog", "h_id_step", 6000)
# ----- dmq params -----
modparam("dmq", "server_address", "sip:INTERNAL_INSTANCE_IP:5060")
modparam("dmq", "notification_address", "DMQ_NOTIFICATION_ADDRESS")
modparam("dmq", "multi_notify", 1)
modparam("dmq", "ping_interval", 10)
modparam("dmq", "num_workers",4)
In this link you can find the kamctl trap
<https://textbin.net/quykw71nyl>output
after kamailio stop processing SIP.
Thank you
Best Regards
--
Cumprimentos
José Seabra
Hi!
I was able to successfully use the auth_ephemeral module on my environment:
Kamailio > Asterisk > ARI
I ran into a problem with ARI, where Asterisk wouldn't send the complete
from URI to ARI program, just the first part (timestamp), and the most
important part (the username) isn't forwarded.
For example:
Kamailio username: 1649106119:1001
Asterisk only forwards 1649106119 to ARI, which makes it impossible for me
to track the user.
So I planned on using the deprecated username_format from Auth Ephemeral
module:
https://kamailio.org/docs/modules/4.1.x/modules/auth_ephemeral.html#auth_ep…
By switching the timestamp with the username, my problems would be fixed.
After setting the variable, and trying to register on Kamailio with
username 1001:1649106119, I get an error message: SIP/2.0 400 Bad From URI
Am I doing something wrong?
Thanks!
Hello,
please keep the list in CC, that others can comment as well.
Beside from the obvious (improving the performance of the lua API call), you could use indeed asynchronous processing. If you just use the lua code to emit the REST request, using a native http client module would be probably also faster as doing it over lua.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>
From: Giovanni Jose <gio.jose(a)gmail.com>
Sent: Wednesday, March 30, 2022 5:17 PM
To: Henning Westerholt <hw(a)gilawa.com>
Subject: Re: [SR-Users] More than TCP 800 concurrent calls, slows Kamailio (LUA FILE API REQUESTS)
Hello Henning, Thanks so much for the fast response
I just commented the loop and I was hitting the backend and it's slow anyway maybe it's because, for this type of implementation when the destination of the call is decided by the API backend, I need to use the http_async_client module? I am noticing that for high volume calls kamailio slows the traffic and shows errors because there's a delay that is been added when the backend responds for every call.
On Tue, Mar 29, 2022 at 11:53 PM Henning Westerholt <hw(a)gilawa.com<mailto:hw@gilawa.com>> wrote:
Hello,
why are you sleeping for 1s in the loop? This will cause Kamailio to block processing. I also do not see any stop condition on the loop, so it will loop until the limit.
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 Giovanni Jose
Sent: Tuesday, March 29, 2022 9:46 PM
To: sr-users(a)lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
Subject: [SR-Users] More than TCP 800 concurrent calls, slows Kamailio (LUA FILE API REQUESTS)
Hello Guys I am having this issue where kamailio is receiving requests from SIPp (we are currently testing the platform and doing QA) but if we do more than 800 concurrent calls kamailio starts failing and slowing the requests, The scenario is the following:
I am sending 5000 calls at 100 CPS on TCP and I am having this route in the configuration file:
# Handle the calls to api
route[CALL_API] {
xlog("L_NOTICE"," Call request $var(call_request) method: $rm \n");
$var(loop_true)=1;
while ($var(loop_true)) {
if(!lua_run("call_request","$var(call_request)","$sht(token=>new_token)")) {
xlog("L_NOTICE", "SCRIPT: failed to execute lua function!\n");
}
if ($var(loop_true)){
sleep("1");
}
}
xlog("L_NOTICE", "SCRIPT: Sucess to execute lua function!\n");
}
So I am executing a LUA script for the requests and the API response will tell the destination of the call.
At 800 concurrent calls, I can notice SLOWLINESS in the SIPp testing tool, and then I will start receiving 408 timeouts.
This sounds like a load issue or something because I believe there's a time that it's been added every time we hit the backend and wait for the response.
any help will be appreciated
Regards
Gio
Hi
I am trying to use the jannson_get function to pull field "secret" from
the below json:
{"3":{"options":{"secret":"mybigsecret"}}}
This works is I use jansson_get("3.options.secret".....
However, I need to know the value of "3" in order to use it. I have
tried all the variations on path I can find, but none apart from using
the actual root value work for me.
How can I either:
1. Construct a PATH which will pick this up, or
2. Obtain this root value ("3" in my example)
I have tried testing using https://jsonpath.com/ and a path of
"$..secret" and "$..options.secret" works there, but not in jansson
kamailio module.
Any assistance much appreciated.
Thanks
--
-Barry
Host is up and responding to ping but not to http requests.
Riccardo
--
--
NOTICE: This electronic mail transmission may contain confidential
information and is intended only for the person(s) named. Any use, copying,
or disclosure by any other person is strictly prohibited. If you have
received this transmission in error, please notify the sender via e-mail.