Hello All,
I have two kamailio servers and shared the database between two kamailio.
version: kamailio 5.5.6 (x86_64/linux) .
I have used AWS network load balancer. domain pointed to AWS network load balancer IP address,AWS Network Load Balancer (NLB) to distribute incoming requests to kamailio servers. I have two users in same domain(dev.domain.com).
1. 801(a)dev.domain.com --> Registered on kamailio 1
2. 802(a)dev.domain.com --> Registered on kamailio 2
Two call invites have been received, one for extension 801 and another for extension 802. These call invites will reach kamailio Server 1.
kamailio Lookup the users and send call invite to both the devices. 801 registered user will get a ring because it is registered from kamailio 1.
but 802 will not get a ring because it's register from kamailio 2.
I can able see kamailio send call invite to the both registered devices using sngrep. but it not reach to the 802 device. there i no firewalls so far.
also i have took 802 Registered device IP phone logs but there is no Call Invite reach to the 802 device.
I have also tried by using "dmq" and "dmq_usrloc" module but the same behavior.
what could be the reason? It will be appreciable if anyone help to resolve the issue.
Thank you in advance!
Pratik Svaliya.
Hi,
I am building a configuration script where for some traffic flows
parallel forking will be needed, and in this case I need to go beyond
the default max limit of the max amount of branches.
Apart from this specific case the traffic load that kamailio will need
to handle is very low, let's say just one second here and there with up
to 5 concurrent calls at most.
This limit is as far as I understand set here:
usr/local/src/kamailio-5.6/kamailio/src/core/config.h
And the default limit is:
#define MAX_BRANCHES_LIMIT 32 /*!< limit of maximum
number of branches per transaction */
Here are the questions I have related to this:
1) If I increase the value of this constant in config.h, how high is it
reasonable to set this value and still have a stable system?
2) If I increase MAX_BRANCHES_LIMIT beyond 32, are there also other
parameters that needs to be changed for the system to be able to cope,
and if so whichparameters?
Regards,
Lars
Hi Matteo
I have used http_async_client and http_client in both Native & KEMI to good affect for handling SUBSCRIBE & NOTIFY flows however did have a few issues with formatting which took a bit of work to get right.
Just to note, something you may want to test. Initially I set about my task using http client within Python (aiohttp and ayncio) and stepped in and out of it from various points in the logic depending on the config I was using at the time. Under load this proved to be a bottle neck and failed load testing. The best options under load were using http_async_client or http_client modules which offered significantly better performance.
In the end we took a different approach of using Kafka Module as that had even better performance but that was a decision taken our side not through any fault of the http_async_client or http_client modules
Lewis
Mission Labs Limited is registered in England, company number 10040088. Trading Office: The Old Milk Depot, Bacup Rd, Rossendale, BB4 7FE. Registered office: The Scalpel, 18th Floor 52 Lime Street, London, EC3M 7AF. Email confidentiality notice: This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. Please consider the environment before you print this email.
Hi List
I'm attempting to add a header to a reply message on failure.
Situation:
Registrar => Core => (dispatcher list) => Various IC
I would like to know on the registrar, which of the dispatcher groups
failed.
What I attempted sofar:
failure_route[DISPATCH_FAILURE]
{
append_to_reply("X-RR: (append reply) Final Dispatch Failure $avp(dispgroup):$avp(trunkname)\r\n");
append_hf("X-RR: (append hf) Final Dispatch Failure $avp(dispgroup):$avp(trunkname)\r\n");
$avp(rstatus) = t_get_status_code();
$avp(rtext) = $T_rpl($rr);
$avp(rtext) = "REMOTE REPLY: " + $T_rpl($rr);
t_send_reply("$avp(rstatus)", "$avp(rtext)");
}
I only get status text is getting through to my reply. I would much prefer to add a header which I could then extract on the registrar. Am I missing something which could prevent addition of a header in a reply?
Mit freundlichen Grüssen
-Benoît Panizzon-
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________
Hello all :)
I'm struggling to add two headers to an http client request, but cannot
find a proper way to do it.
The headers are Authorization and Content-Type.
The first try is with http_client module, beside undocumented, is possible
to add multiple headers separating them with "\r\n". What I see is the
correct Authorization header, and two Content-Type headers, one with my
content type the other with x-www-form-urlencoded, which no one sets ?
Second try is with http_async_client which supports multiple headers, but
since I'm calling it from an xhttp event route, there's no transaction and
request cannot be suspended, so I cannot get results before sending out
xhttp response...
Any hint?
br,
Mat
Hi List
I wonder if some of the devs could look at the dialog code and maybe
confirm my observation of this supposed Bug in Kamailio 5.6
Situation:
Two Kamailio, dialog counters synced via DMQ and each node using a
local DB as dialog backend.
Goal is to count channel usage per customer.
modparam("dialog", "db_mode", 1 )
modparam("dialog", "enable_dmq", 1)
modparam("dialog", "h_id_start", -1) # Use server_id
modparam("dialog", "h_id_step", 2)
modparam("dialog", "profiles_with_value", "custcallcounter")
If 'JohnDoe' is involved in a call, I do:
set_dlg_profile("custcallcounter","JohnDoe");
To check how many calls are busy by JohnDoe I do:
get_profile_size("custcallcounter","JohnDoe","$var(channel_use)");
Picture this situation:
JohnDoe is initiating a first call via Node1:
Node1 created the dialogue and variables, writes them to the database
and replicates the dialog vars to Node2 => IN MEMORY
Nothing about the running dialog is being written to the Database on
Node2, but get_profile_size returns the count on Node2.
So while the first call aka dialog is running via Node1, JohnDoe is
initiating a second call, this time via Node2.
Node2 creates the dialog and writes this to the database. Then the
profile with Name 'JohnDoe' is INCREASED on Node2.
This is when I suddenly find the dialog_vars on the Node2 database
containing information about the dialog started on Node1. So I guess
writing to a dialog counter triggers the dialog_vars being written to
the Database.
When JohnDoe is ending it's first call, then the dialog and dialog_vars
are cleaned out of the database on Node1, but NOT on Node2
What I fear happens next: They dialog_vars remaining on the Database of
Node 2 accumulate more and more, making the database slower. When a
call happens to re use the same hash id and entry, things start going
really badly.
Could I be right?
--
Mit freundlichen Grüssen
-Benoît Panizzon- @ HomeOffice und normal erreichbar
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________
Hello,
Is it possible to put a kind of license for Kamailio, in a way that it works for 1 week for example, and after that it will not process new requests?
Regards,
The client uses the TLS protocol registered and TCP Connection established . There is a problem now, sending message KSR.uac.uac_req_send() from the kamilio server to client failed sometimes,and the error is as follows:
“2023-09-04T17:22:01.515763+08:00 (3429) ERROR: tm [../../core/forward.h:292]: msg_send_buffer(): tcp_send failed
2023-09-04T17:22:01.515763+08:00 (3429) ERROR: tm [uac.c:678]: send_prepared_request_impl(): Attempt to send to precreated request failed ”. meantime, the client sending message to Kamalio server succeded, and the register status and tcp connection is normal.
After 30s, obtained the $uac_req(evcode) from the event_route[uac:reply] is 408.After this error appears, all the messages sent to this client are 408.
"
2023-08-29T03:48:43.738152+08:00 (3349) NOTICE: <script>: ===uac reply received, callid = 0B6ECB534AE24281AED9BBBC56B140A6`yangwang2`1693252093, code is: 408
2023-08-29T03:48:43.738825+08:00 (3349) NOTICE: <script>: ===uac reply received, callid = 0B6ECB534AE24281AED9BBBC56B140A6`yangwang2`1693252093, code is: 408
"
But from other information, the TCP connection is normal. Because from Kamailio to querying this user's Location, it has not changed all day. The client sends messages is also normal. That is, the user's registration and sending messages can receive 200 OK.
We use netstat commands to view the user's TCP connection information on the client and server, and the connection status is also normal.The status of the corresponding port of the TCP connection is ESTABLISHED.
client:
netstat -ano | findstr 49957
"172. 17. 47.125:49957 XXX.96.XXX.XXX:5061 ESTABLISHED 10516"
server:
"tcp 0 0 10.11.xx.xx:5061 xxx.xxx.xxx.xxx:49957 ESTABLISHED 3467/kamailio"
This client is normal after logging in, and the problem that occurs after a period of use (maybe some hours), and once it occurs, it fails until the user creates a new connection and logs back in. Not all users will appear.
Why is this the case? The socket connection is fine, but uac_req_send () get an ERROR?
I found a problem from the log file. Is it caused by duplicate callids pushed to the same user at the same second?
Looking forward to your answer, thank you very much
Script information that may be required
kamailio.cfg : tm mode
# ----- tm params -----
# auto-discard branches from previous serial forking leg
modparam("tm", "failure_reply_mode", 3)
# default retransmission timeout: 30sec
modparam("tm", "fr_timer", 30000)
# default invite retransmission timeout after 1xx: 120sec
modparam("tm", "fr_inv_timer", 120000)
modparam("tm", "auto_inv_100", 1)
kamalio.lua uac_req_send()
" --uac_req_send
KSR.pv.sets("$uac_req(hdrs)", hdrs)
KSR.pv.sets("$uac_req(method)", "MESSAGE")
KSR.pv.sets("$uac_req(ruri)", "sip:" .. to .. "@" .. KAM_DOMAIN)
KSR.pv.sets("$uac_req(furi)", "sip:" .. from .. "@" .. KAM_DOMAIN)
KSR.pv.sets("$uac_req(turi)", "sip:" .. to .. "@" .. KAM_DOMAIN)
KSR.pv.seti("$uac_req(evroute)", 1)
KSR.pv.sets("$uac_req(body)", content)
local ouri = (row.received ~= "" and row.received) or row.contact
KSR.pv.sets("$uac_req(ouri)", ouri)
local callid = rows[i].clientid .. "`" .. rows[i].username .. "`" .. os.time()
KSR.pv.sets("$uac_req(callid)", callid)
KSR.uac.uac_req_send()
Hello,
Im gathering ideas about routing based on caller number to multiple peers and -lets say- subscribers.
As far as i know we can route the calls with LCR based on prefix or the whole number to the LCR gateways which are specified in the LCR module gateway table.
This is working very well with public IP based "peers". We can route calls to these gateways.
But what can we do if we have to route to a "peer" which is behind NAT. Basically they have to REGISTER as a subscriber, but we cannot add a subscriber to the LCR gateway table, beacuse LCR module needs a directly reachable IP address with a fixed port.
Does anyone have any ideas on how to handle these mixed type peers?
Or maybe we have to add the fixed IP peers which are not REGISTERing to the usrloc database somehow and then we can do a lookup location based on $rU.
To make myself clear, it would be nice if we can handle those 2 types of our peers unifromly in terms of SIP routing, thats why im looking for a "unified" solution.
Thanks for your suggestions.
With kind regards,
Zoltan