Hello,
A kamailio.org server maintenance work will be done today at 18:00 CEST.
There will be some minutes of downtime (should be less than 5') of the
following main services: website (including the wiki) and mailing lists.
Regards,
Oriol.
Hi there,
I've added a simple black list that rejects incoming requests (REGISTER and
INVITE) containing certain text in the message body. Source IP addresses of
the rejected requests are going to be banned and added to the ban list:
route
> {
> ...
>
>
> $var(ban_list_key) = $si + ":" + $sp;
> if ($sht(ip_ban_list=>$var(ban_list_key)) != $null) {
> xlog("L_INFO", "$var(log_fmt_tag) The incoming $rm request
> from: $fU, si: $si, sp: $sp was rejected. The source host is temporarily
> banned.");
> sl_send_reply("400", "Bad request");
> exit;
> }
>
> ...
>
> if (method=="REGISTER" || method=="INVITE") {
> sht_iterator_start("i1", "black_list");
> while(sht_iterator_next("i1")) {
> $var(term_is_in_wl) = 0;
> $var(collision_idx) = 0;
> while($sht(white_list=>$fU[$var(collision_idx)]) != $null
> ) {
> if($shtitval(i1) ==
> $sht(white_list=>$fU[$var(collision_idx)])) {
> $var(term_is_in_wl) = 1;
> break;
> }
> $var(collision_idx) = $var(collision_idx) + 1;
> }
> if ($var(term_is_in_wl) == 0) {
> if ( $mb =~ $shtitval(i1) ) {
> # found a term from the black list. access denied.
> xlog("L_INFO", "$var(log_fmt_tag) The incoming $rm
> request from: $fU, si: $si, sp: $sp was rejected. SIP message body contains
> a term from the black list - $shtitval(i1)");
> # add device to banlist
> $var(ban_info) = "" + $Ts + "_" + $shtitval(i1);
> $sht(ip_ban_list=>$var(ban_list_key)) =
> $var(ban_info);
> xlog("L_INFO", "$var(log_fmt_tag) The source host
> $si:$sp was banned for 1 hour.");
> sht_iterator_end("i1");
> sl_send_reply("400", "Bad request");
> exit;
> }
> }
> }
> sht_iterator_end("i1");
> }
> ...
> }
All works fine with UPD, but using TCP, kamailio ceases to accept any
requests. Please take a look, what do I wrong.
Thanks,
Andrey
I am currently setup with Kamailio 5.1 on an AWS t2.micro as a SIP300 LCR solution with a http_query call to an external resource (c# .NetCore app for LRN dip and MySQL Route choices) to get the contacts string, tag it to the Contact header an send 300.
Its been a while since I have performance tested on SIP and It was SIPp.
- Is http_query a bad choice for performance. Is KEMI better?
- Are there any better free apps than SIPp?
- Has anyone got cps stats for a SIP300 only Kamailio instance on AWS
- Is AWS a bad choice for prime time LCR. Any gory stories?
KD
Hallo there,
we are a Broadcasting Network with about 50 Stations and try to establish our own SIP Network for high quality Audio over IP with Bitrates of 192-256 kbit for transmitting an accurate stereo signal.
Since we encountered problems with connections via mobile Networks we set up our SIP Server as RTP Proxy which resolved all those multiple NAT issues. But on the other hand we pay for that with a higher jitter rate. The question is, if anyone has experience if this issue maybe can be solved by running the Sip Server on a standalone hardware plugged into network Port on our Hardware Firewall, instead of a virtual Machine running on VM with virtual switches and so on. The current SIP Server has a Public IP Address, but all the Traffic runs thru Firewall, VPN, Hardware Switches and Virtual Switches. What you think?
Thanks a Lot
Nice regards
Gerhard Pinter
Greetings,
I'm doing some work with the AUTH routes and modules, and sometimes i get a
"403 Not relaying" answer when the INVITE has a parameter in the R-URI.
That parameter was not included in the REGISTER.
I think it's this part of the code that throws this reply :
# if caller is not local subscriber, then check if it calls
# a local destination, otherwise deny, not an open relay here
if (from_uri!=myself && uri!=myself) {
sl_send_reply("403","Not relaying");
exit;
}
Does a different or new parameter in the R-URI trigger the "uri!=myself" ?
if so, can I set it up to check R-URI but not check the parameters?
Thanks
I apologize for asking unit questions today and decided to just present the big picture and address what I am trying to get @ holistically.
I want to implement a custom LCR only solution on kamailio. INVITE in 300 out. Nothing else. I expect awesome cps stats that makes we lean towards kamailio rather than throwing up a home grown SIP server and worrying about performance.
I have the guts of the LCR logic down pat, but todays its manual. In my process I do the following :
- Check LRN of the requested user. I use dig doing a ENUM call.
- Use the requesting user and LRN of requested user to mediate call type. Local or Interstate using LRN check via ENUM call (above) and LCAD data lookup. I use sql query.
- Mediate call type Intrastate or International if not Local or Interstate using LERG lookup. SQL query too.
- dip into database with requesting user and call type and get N lists by costs ascending. SQL query.
- Construct Contact info in db or kamailio.
- Send 300 reply will contact having the various routes.
I can automate 2 through 6 using Kamailio. Basically xquery with supplied data and deal with the Contact header with data received. 404 or default route if no data received.
I cannot handle the ENUM in kamailio or mysql. The provider does not provide SIP redirect.
What are my options, besides changing LRN providers?
KD
Whats the best route to implement a basic 300 Multiple Choices response engine. INVITE in 300 Multiple Choices out with choices in the response. I have a logic to generate my list choices, so a basic process would be better.
H
Hi all,
Issued two pull requests.
Any comment welcome, in particular, whether it will be taken for master branch......
https://github.com/kamailio/kamailio/pull/1538https://github.com/kamailio/kamailio/pull/1539
Kr
Christoph
The information contained in this e-mail message is privileged and confidential and is for the exclusive use of the addressee. The person who receives this message and who is not the addressee, one of his employees or an agent entitled to hand it over to the addressee, is informed that he may not use, disclose or reproduce the contents thereof, and is kindly asked to notify the sender and delete the e-mail immediately.