Hello,
I have Kamailio installed as SIP redirect for an SBC to make routing decisions.
I'm using SQLOps module with postgresql 11.5 where I have multiple tables containing each around 6M record of routing codes:
Code options
392342 sup1|sup2|sup3
Where code field is of prefix_range data type and has a gist index.
I'm sending traffic of 300 CPS to SBC which is forwarding it to Kamailio, and Kamailio respond with 300 multiple choice with the routing decision.
In normal cases, everything is going smoothly where Kamailio repsonds up to 50 ms.
But during the process of loading data to the routing tables, Kamailio response to SBC is dramatically delayed , where for some calls it takes up to 7 seconds to respond.
Noting that during this process the data are loaded to staging tables and not to live tables used by Kamailio.
Kamailio is installed on a VM with 32GB RAM and 16 vcores.
Following configuration is used in Kamailio:
fork=yes
children=10
following are the customized parameters in postgresql.conf
max_connections = 100
shared_buffers = 8GB
effective_cache_size = 24GB
maintenance_work_mem = 2GB
checkpoint_completion_target = 0.7
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 5242kB
min_wal_size = 1GB
max_wal_size = 2GB
max_worker_processes = 16
max_parallel_workers_per_gather = 8
max_parallel_workers = 16
Following is the routing logic I'm using:
route{
if (is_method("INVITE")) {
$var(inc) = $(ct{param.value,tgrp});
xlog("L_INFO","CONTACT : $var(inc)" );
xlog("L_INFO","from number : $rU" );
if($var(inc)!=0)
route(customer);
route(block);
}
}
route[customer]
{
sql_query("cb", "select caid from customeridentification where trunk='$var(inc)'", "ra");
$var(cid)=$dbr(ra=>[0,0]);
sql_result_free("ra");
xlog("L_INFO","cid: $var(cid) \n");
sql_query("cb", "select routetablename from carrieraccount where caid=$var(cid)", "ra");
$var(tid)=$dbr(ra=>[0,0]);
sql_result_free("ra");
if($var(cid)!=0)
route(query);
else
route(block);
}
route[query]
{
#sql_query("cb", "select supplierid from route_$var(cid) where prefix @>'$rU' order by prefix limit 1", "ra");
sql_query("cb", "select get_routing('$var(tid)','$rU')", "ra");
$var(sup)=$dbr(ra=>[0,0]);
sql_result_free("ra");
xlog("L_INFO","supplieris: $var(sup) \n");
#$var(x)=$(var(sup){s.replace,|,}{s.len})/4;
$var(a)=$(var(sup){s.len});
$var(z)=$(var(sup){s.replace,|,});
$var(b)=$(var(z){s.len});
$var(suplen)=$var(a) - $var(b);
if($var(sup)!=0)
route(send);
else
route(block);
}
route[send]
{
xlog("L_INFO","Inside Send \n");
$var(i)=0;
append_to_reply("Contact:");
while($var(i)<$var(suplen) + 1)
{
$var(s)=$(var(sup){s.select,$var(i),|});
$var(s)=$(var(s){s.select,0,;});
append_to_reply("<sip:$rU;tgrp=$(var(s){s.ltrim})@ xxx.xxx.xxx.xxx:5060;user=phone>");
if($var(i)<$var(suplen)) append_to_reply(",");
$var(i)=$var(i)+1;
}
append_to_reply("\r\n");
sl_send_reply("300","Multiple Choices");
exit;
}
route[block]
{
xlog("L_INFO","INSIDE BLOCK" );
append_to_reply("Contact:<sip:$rU;tgrp=999999@xxx.xxx.xxx.xxx:5060;user=phone>\r\n");
sl_send_reply("300","Multiple Choices");
exit;
}
How can we enhance the Kamailio response in case of load on the postgresql server.
Regards,
Ali Taher
Hi everyone,
I am trying to use xhttp_prom and there are some issues that i want to share with you.
Metric Naming:
I get warning at prometheus side like as follows,
WARN[0659] append failed err="no token found" source="scrape.go:648" target="{__address__="192.168.42.1:9080", __metrics_path__="/metrics", __scheme__="http", instance="192.168.42.1:9080", job="vmm"}"
With respect to prometheus documentation, metric names need to fullfill following naming requirement -> "It must match the regex [a-zA-Z_:][a-zA-Z0-9_:]*" (source: https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels)
However, kamailio gives unmatch outputs as follows because they have '-' char, (related discussion: https://github.com/prometheus/prometheus/issues/3154 )
* kamailio_usrloc_location-contacts 0 1576046310669
* kamailio_usrloc_location-expires 0 1576046310669
* kamailio_usrloc_location-users 0 1576046310669
whit that naming, prometheus can not parse values of any metrics.
Documentation:
Example 1.1. Set xhttp_prom_buf_size parameter
...
modparam("xhttp", "xhttp_prom_buf_size", 1024)
...
For that example, it should be as follows,
...
modparam("xhttp_prom", "xhttp_prom_buf_size", 1024)
...
[http://www.turkcell.com.tr/downloads/bireysel/img/Tcelldis.gif] <http://turkcell.li/iyaani>
Bu elektronik posta ve onunla iletilen butun dosyalar sadece gondericisi tarafindan almasi amaclanan yetkili gercek ya da tuzel kisinin kullanimi icindir. Eger soz konusu yetkili alici degilseniz bu elektronik postanin icerigini aciklamaniz, kopyalamaniz, yonlendirmeniz ve kullanmaniz kesinlikle yasaktir ve bu elektronik postayi derhal silmeniz gerekmektedir.
TURKCELL bu mesajin icerdigi bilgilerin do?rulu?u veya eksiksiz oldugu konusunda herhangi bir garanti vermemektedir. Bu nedenle bu bilgilerin ne sekilde olursa olsun iceriginden, iletilmesinden, alinmasindan ve saklanmasindan sorumlu degildir. Bu mesajdaki gorusler yalnizca gonderen kisiye aittir ve TURKCELLin goruslerini yansitmayabilir
Bu e-posta bilinen butun bilgisayar viruslerine karsi taranmistir.
________________________________
This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient you are hereby notified that any dissemination, forwarding, copying or use of any of the information is strictly prohibited, and the e-mail should immediately be deleted.
TURKCELL makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained therein or for the information transmission, reception, storage or use of such in any way whatsoever. The opinions expressed in this message belong to sender alone and may not necessarily reflect the opinions of TURKCELL.
This e-mail has been scanned for all known computer viruses.
Hello,
I have Kamailio installed as SIP redirect for an SBC to make routing decisions.
I'm using SQLOps module with postgresql 11.5 where I have multiple tables containing each around 6M record of routing codes:
Code options
-----------------------
392342 sup1|sup2|sup3
Where code field is of prefix_range data type and has a gist index.
I'm sending traffic of 300 CPS to SBC which is forwarding it to Kamailio, and Kamailio respond with 300 multiple choice with the routing decision.
In normal cases, everything is going smoothly where Kamailio repsonds up to 50 ms.
But during the process of loading data to the routing tables, Kamailio response to SBC is dramatically delayed , where for some calls it takes up to 7 seconds to respond.
Noting that during this process the data are loaded to staging tables and not to live tables used by Kamailio.
Kamailio is installed on a VM with 32GB RAM and 16 vcores.
Following configuration is used in Kamailio:
fork=yes
children=10
following are the customized parameters in postgresql.conf
max_connections = 100
shared_buffers = 8GB
effective_cache_size = 24GB
maintenance_work_mem = 2GB
checkpoint_completion_target = 0.7
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 5242kB
min_wal_size = 1GB
max_wal_size = 2GB
max_worker_processes = 16
max_parallel_workers_per_gather = 8
max_parallel_workers = 16
Hello,
i'm looking into kamalio (btw: thanks to asipto for the great book) and
i hope someone can push me in the right direction. I have a
question/problem with some lines in the default config (kamailio.cfg)
around line 754:
...
if (is_method("REGISTER") || from_uri==myself) {
# authenticate requests
if (!auth_check("$fd", "subscriber", "1")) {
auth_challenge("$fd", "0");
exit;
}
...
auth_check() and auth_challenge doesn't work, but i've provided the
correct credentials. When i replace "$fd" with domain "voip.XXXXXX.de"
it works. This domain is also defined as alias in the config and all sip
messages i send to the server have a correct from header with this domain.
First step for me would be to look whats stored in $fd, but how can i
output the content of $fd? Cause log(2, "$fd") or xlog("$fd") doesn't
work and throws errors about unknown variables.
Thanks,
Robert Lieback
Hello,
Jesus Rodrigues and Inaki Baz Castillo changed their work roles a while
ago, so they no longer deal with Kamailio and they do not expect to do
it in the near future. To keep the Management group with members
connected as much as possible with the project, Fred Posner and Victor
Seva were proposed to replace them.
For the new members in the public lists: the management group of
Kamailio is not involved in the daily development or administration of
the project -- all those are done on public mailing lists or kadmin
group (internal infrastructure administration) -- management team is
supposed to take the decisions on sensitive situations for the evolution
of the project.
Should anyone have opinions about these changes, let's discuss on
sr-users mailing list.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - April 27-29, 2020, in Berlin -- www.kamailioworld.com
Hi All,
Does this look correct? I am using Zoiper client and did multiple registration/re-registration, but I saw duplicated contacts in the database for the same user/device(alice). I was expecting to see only one. Is this a bug? How do I prevent this happening?
"select * from scscf.contact"
id contact params path received user_agent expires callid
49 sip:bob@192.168.10.201:60944;rinstance=44b4024df17bd284;transport=UDP NULL <sip:term@pcscf.mnc001.mnc001.3gppnetwork.org;lr> Zoiper rv2.10.3.2 2019-12-08 10:31:51 r7jCYp7JuVbA8QjocnouLw..
64 sip:alice@192.168.10.241:60383;rinstance=e850d3ed0605bcd3;transport=UDP NULL <sip:term@pcscf.mnc001.mnc001.3gppnetwork.org;lr> Zoiper rv2.10.3.2 2019-12-08 10:31:11 EHLOADkLUEe8d0CMpdLL9A..
142 sip:alice@192.168.10.241:60383;rinstance=bc755d87cc438890;transport=UDP NULL <sip:term@pcscf.mnc001.mnc001.3gppnetwork.org;lr> Zoiper rv2.10.3.2 2019-12-08 10:31:51 P1rBkHGUVdv7oqW3_UWQPg..
143 sip:alice@192.168.10.241:60383;rinstance=146303cf7501a125;transport=UDP NULL <sip:term@pcscf.mnc001.mnc001.3gppnetwork.org;lr> Zoiper rv2.10.3.2 2019-12-08 10:32:15 etUEoAGSM4q4e_39wFKa7w..
144 sip:alice@192.168.10.241:60383;rinstance=e0a260b7b78ecf6b;transport=UDP NULL <sip:term@pcscf.mnc001.mnc001.3gppnetwork.org;lr> Zoiper rv2.10.3.2 2019-12-08 10:32:17 WUtIYeGlBZmHD3TGklmKCQ..
145 sip:alice@192.168.10.241:60383;rinstance=2681245431c4e4e4;transport=UDP NULL <sip:term@pcscf.mnc001.mnc001.3gppnetwork.org;lr> Zoiper rv2.10.3.2 2019-12-08 10:32:19 HNZPyeO173jfscKYNOT0bw..
Thanks,
--Charles
CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient and may contain material that is proprietary, confidential, privileged or otherwise legally protected or restricted under applicable government laws. Any review, disclosure, distributing or other use without expressed permission of the sender is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies without reading, printing, or saving.
Hi All,
I am running Kamailio v5.2.4 with P/S/I-cscf instances on 3 different machines with default IMS example configurations. Kamcmd ul.dump show empty, but I can make calls... any idea what is the problem?
root@pcscf:/# kamcmd ulpcscf.status
{
Domain: location
Size: 512
AoRs: {
Stats: {
Records: 7
Max-Slots: 6
}
}
}
root@pcscf:/# kamcmd ul.dump
{
Domains: {
}
}
CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient and may contain material that is proprietary, confidential, privileged or otherwise legally protected or restricted under applicable government laws. Any review, disclosure, distributing or other use without expressed permission of the sender is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies without reading, printing, or saving.
Hi all,
Have anyone ever experienced pike module not releasing the IP after
"remove_latency" period?
We ran a load test and this is what happened to one of the two paired nodes
and I had to restart kamailio process to release it.
I'm running Kam 5.2.5
Thanks.
--
Andy Chen
Sr. Telephony Lead Engineer
achen@ <achen(a)thinkingphones.com>fuze.com
--
*Confidentiality Notice: The information contained in this e-mail and any
attachments may be confidential. If you are not an intended recipient, you
are hereby notified that any dissemination, distribution or copying of this
e-mail is strictly prohibited. If you have received this e-mail in error,
please notify the sender and permanently delete the e-mail and any
attachments immediately. You should not retain, copy or use this e-mail or
any attachment for any purpose, nor disclose all or any part of the
contents to any other person. Thank you.*
Hello:
I have two virtual machines with two kamailo domains
VM1: Domain: 172.16.16.1
Users:2000, 2001, 2002...
VM2: Domain: 172.16.16.2
Users:3000, 3001, 3002...
In each domain I can make calls. For example, user 2000 can call 2001.
User 3000 can call 3001.
How can I make calls between the two domains?
What modules do I need to load?
How to configure the kamailio.cfg file?
Thanks,
YANKO.