Hi,
I have been running a couple of Asterisk honey pots to get a better
understanding of the tools and methods potential hackers are using to
exploit SIP servers.
I have observed many attacks from the 'sipcli' user agent that don't send
ACKs.
At this stage I'm not sure what they're trying to achieve, whether it's a
successful call to one of their test numbers, or maybe they will brute
force anything that returns a 401 later, or maybe they're waiting for a 18X
response.
Below are three typical scenarios-
------ INVITE ------ >
<--- 100 Trying ---
<----- 200 OK -----
<----- 200 OK -----
<----- 200 OK -----
( No ACK)
------ INVITE ------ >
<-------- 503 --------
<-------- 503 --------
<-------- 503 --------
( No ACK)
------ INVITE ------ >
<-------- 401 --------
<-------- 401 --------
<-------- 401 --------
( No ACK)
Please could anyone point me in the right direction to detect these non
completed calls with a missing ACK in Kamailio? I am unsure on the
terminology I should be using to search the online documentation.
Thanks
Hello,
based on some of the plans for Kamailio 5.0
(https://www.kamailio.org/wiki/devel/kamailio-5.0-design), I started the
implementation for the support to allow writing the active routing logic
at runtime (respectively what are now the routing blocks) in other
embedded languages than the native kamailio.cfg interpreter. Of course,
besides a lot more extensive set of functions and expressions coming
with the well established scripting languages, this way will allow
reloading the logic without kamailio restart.
I already committed the foundation for it, currently the request_route{}
and reply_route{} can be implemented in Lua, relying on app_lua module.
Lua was selected for first experiments given that I have some past
experience with it, but other languages such as Perl, Python will
hopefully follow soon, once the framework gets to a stable design.
I wrote some initial docuentation on the wiki:
- https://www.kamailio.org/wiki/devel/config-engines
Would be helpful if people with experience on the other supported
embedded languages will join the effort to design the framework to suit
those languages, as well as other developers and community members to
start exporting C functions.
Also, there are some other things to decide on, listed in the to-do
section, where suggestions/assistance are appreciated:
- https://www.kamailio.org/wiki/devel/config-engines#to-do
Many of them probably will be approached during the planned IRC devel
meeting next week:
- https://www.kamailio.org/wiki/devel/irc-meetings/2016a
Any feedback is welcome!
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com
Hi,
Working with CNXCC for quite some time now with success. Though running
into the following problem. Running Kamailio 4.4 (Debian Wheezy) from
the Kamailio repository.
Setting up CNXCC with a dialog start event route, a dialog end event
route and a cnxcc:shutdown event route. In the start event I set some
variables in $var_dlg, because I will need them later on in the dialog,
could be the end event, or the shutdown event.
Now the strange thing is, that in the shutdown event, when CNXCC runs
out of credit for instance, I no longer have access to the $var_dlg
pool. All of the variables have been lost. Another strange thing is, if
I cut off the call with CNXCC after just 1 second, the variables all are
still available. But after 5 seconds cutoff, all variables are lost.
On another system, running a 4.2 Kamailio with a CNXCC ported from 4.1,
this still works fine. I've also tested this with Kamailio 4.2 and 4.3,
with the same CNXCC code from 4.4.
Any insight would be greatly appriciated!
Cheers,
Dirk
I build kamailio from latest 4.4 git source and got crash at start:
(gdb) where
#0 0x0000000000449af8 in add_interfaces (
if_name=0x7f0e770106e8 "192.98.102.10", family=0, port=13880, proto=1978,
ai_l=0x1277600) at socket_info.c:1210
#1 0x000000000044ad77 in fix_socket_list (list=0x5, type_flags=0xffffffff)
at socket_info.c:1406
#2 0x000000000044de70 in fix_all_socket_lists () at socket_info.c:1807
#3 0x000000000041b535 in main (argc=0, argv=0x7fff8cfaf1e8) at main.c:2390
-- Juha
Hi!
I am a newbie and I need help understanding how to use the java module with Kamailio. I am trying to create a basic java application that will print the SIP message type being processed by Kamailio.
I read the app_java module but can't still figure it out. Any help or reference will be greatly appreciated.
Thanks
Sent from Mail for Windows 10
Im getting this error using USERLOCDB
Apr 7 22:11:56 kamailio-int /usr/local/sbin/kamailio[29717]: ERROR:
db_mysql [km_dbase.c:128]: db_mysql_submit_query(): driver error on query:
Duplicate entry '0--1' for key 'connection_idx' (1062)
Apr 7 22:11:56 kamailio-int /usr/local/sbin/kamailio[29717]: ERROR: <core>
[db_query.c:235]: db_do_insert_cmd(): error while submitting query
Apr 7 22:11:56 kamailio-int /usr/local/sbin/kamailio[29717]: ERROR: usrloc
[ucontact.c:684]: db_insert_ucontact(): inserting contact in db failed xxxx
(uloc-5706bebd-7415-3)
Apr 7 22:11:56 kamailio-int /usr/local/sbin/kamailio[29717]: ERROR: usrloc
[urecord.c:591]: insert_ucontact(): failed to insert in database
Apr 7 22:11:56 kamailio-int /usr/local/sbin/kamailio[29717]: ERROR:
registrar [save.c:522]: insert_contacts(): failed to insert contact
My config
# ----- usrloc params -----
/* enable DB persistency for location entries */
#!ifdef WITH_USRLOCDB
modparam("usrloc", "db_url", DBURL)
modparam("usrloc", "timer_interval", 60)
modparam("usrloc", "db_mode", 1)
modparam("usrloc", "db_timer_clean", 1)
modparam("usrloc", "use_domain", MULTIDOMAIN)
modparam("usrloc", "db_ops_ruid", 1)
modparam("usrloc", "db_check_update", 1)
#!endif
I have been using it without any problems in other installations but in a
new one with 4. KAMAILIO im getting this error. I can see registrations on
kamctl ul show but seems that option 1 is not working . Option 2 does not
update registrations from that device.
Thanks
Dear SIP-experts and DNS-SRV gurus;
I have some questions to the deployers of SER/Kamailio and
best current practice for multiple SIP-servers with SRV-records
and authentication. This is not a question about Kamailio itself
but rather experience with deployment of it in the field.
The current usecase is:
1. Multiple SIP-servers are deployed for the same domain
2. The DNS is configured with SRV-records for load balancing,
example: (lets call the domain "example.com")
$ host -t SRV _sip._udp.example.com_sip._udp.example.com has SRV record 20 0 5080 alpha1.example.com.
_sip._udp.example.com has SRV record 20 0 5080 alpha2.example.com.
3. when a SIP client registers, it resolves the domain using RFC3263 [1]
and the first REGISTER request is sent to SIP-Server #1
4. SIP-server #1 replies with 401 containing the authentication challenge
5. The SIP Client adds the authentication header to the REGISTER
request and re-sends it, but this time also using RFC 3263, and due
to DNS rotation the request is sent to SIP-Server #2
6. Now, because the SIP-Servers are configured with _different_
secrets in the "auth" module [2], the REGISTER request
fails with authentication error.
Now, I know that it is common for SIP user-agents to send both requests
to the same SIP-server instance. Baresip [3] is not doing that, it does
a new RFC 3263 lookup for all requests (except e2e ACK/CANCEL).
so here are my questions:
- What is common practice in the field, to configure auth module
with the same "secret" or different "secret" values?
- Do you know if there is any reference to IETF documents about how
this should be handled? RFC 3263 says that every request should be
resolved, except:
"The procedures here MUST be done exactly once per transaction, where
transaction is as defined in [1]. That is, once a SIP server has
successfully been contacted (success is defined below), all
retransmissions of the SIP request and the ACK for non-2xx SIP
responses to INVITE MUST be sent to the same host. Furthermore, a
CANCEL for a particular SIP request MUST be sent to the same SIP
server that the SIP request was delivered to."
- What is common practice for SIP user-agents to do in this case?
/alfred
[1] https://tools.ietf.org/html/rfc3263#section-4.4
[2] http://www.kamailio.org/docs/modules/3.4.x/modules/auth.html#auth.secret
[3] https://github.com/alfredh/baresip/issues/39
Hello,
The weekly VoIP Users Conference (VUC) #588 moderated by Randy Resnick
will host a session for Kamailio Updates. Everyone from community is
invited to join and actively participate to discussions. There are many
ways to connect, from SIP to classic PSTN dial in as well as listening
or watching live streams on the web.
The live session will start on Friday, April 8, at 18:00 Berlin timezone
(17:00 London, 12:00EDT).
More details about the session are available at:
- https://www.kamailio.org/w/2016/04/vuc-588-kamailio-updates/
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com