Hi All,
I have a strange issue, I have set the module parameter for nathelper's
force_socket to a specfic ip/port, however, when I perform a sip trace I
can see that all locally generated options messages are not sent from
the socket defined in the modules parameters.
I am not setting $fs anywhere in the script, so I am not over-writing
it. Do any of the other module parameters have a bearing on if nathelper
uses the force_socket parameter?
My current nathelper settings are:
modparam("nathelper", "received_avp", "$avp(RECEIVED)")
modparam("nathelper", "natping_interval", 20)
modparam("nathelper", "natping_processes", 4)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_from", "sip:keepalive@domain.com")
modparam("nathelper", "sipping_method", "OPTIONS")
modparam("nathelper", "sipping_bflag", NAT_BFLAG)
modparam("nathelper", "force_socket", "1.2.3.4:5060")
I am using kamailio v4.3.1:
# kamailio -V
version: kamailio 4.3.1 (x86_64/linux) f38e67
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
F_MALLOC, DBG_F_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT,
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST,
HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: f38e67
compiled on 18:15:23 Jul 20 2015 with gcc 4.4.7
Thanks
Hi,
I am newbie to kamailio world and we would like to deploy Kamailio based
IMS platform. Can any body share the link or Step by step procedure(user
Guide) to deploy Kamailio IMS.
Regards,
Ramya
Hello,
We're testing kamailio 4.3.4 with two kamailio's communicating with each other. One of them is a gateway with rtpengine at the carrier side, the other is a basic sip router.
When calling a destination and cancelling the INVITE a 487 is received from the carrier and directly ACK'd by the first kamailio and in turn is forwarded to the second.
But the 487 response received by the 2nd kamailio doesn't have a Via header which results in kamailio printing the error: receive_msg(): no via found in reply.
Any ideas why the forwarded 487 doesn't contain a Via header and how to fix this?
Note: IP's are changed.
Carrier: 10.0.0.1
Kamailio 1: 10.14.0.1
Kamailio 2: 10.14.0.2
U 10.0.0.1:5060 -> 10.14.0.1:5060
SIP/2.0 487 Request Cancelled.
Via: SIP/2.0/UDP 10.14.0.1;branch=z9hG4bK8e28.642c68037d059634308d4be8fe3f0cdc.0.
From: "+31612345678" <sip:+31612345678@10.14.0.3:5060>;tag=109ac722.
To: <sip:003112345678@10.14.0.3:5060>;tag=sbcsipuas_1_C22196_20160314080307791_b59sb10.
Call-ID: 78100MjY3OGExZmMyODU2MzAyMzM5ODA3MmNhMDdlMzg0MzU.
Contact: <sip:10.0.0.1:5060>.
CSeq: 2 INVITE.
Server: sbc_5.
Content-Length: 0.
.
#
U 10.14.0.1:5060 -> 10.0.0.1:5060
ACK sip:003112345678@10.0.0.1:5060 SIP/2.0.
Via: SIP/2.0/UDP 10.14.0.1;branch=z9hG4bK8e28.642c68037d059634308d4be8fe3f0cdc.0.
Max-Forwards: 67.
To: <sip:003112345678@10.14.0.3:5060>;tag=sbcsipuas_1_C22196_20160314080307791_b59sb10.
From: "+31612345678"<sip:+31612345678@10.14.0.3:5060>;tag=109ac722.
Call-ID: 78100MjY3OGExZmMyODU2MzAyMzM5ODA3MmNhMDdlMzg0MzU.
CSeq: 2 ACK.
Content-Length: 0.
.
#
U 10.14.0.1:5060 -> 10.14.0.2:5060
SIP/2.0 487 Request Cancelled.
From: "+31612345678" <sip:+31612345678@10.14.0.3:5060>;tag=109ac722.
To: <sip:003112345678@10.14.0.3:5060>;tag=sbcsipuas_1_C22196_20160314080307791_b59sb10.
Call-ID: 78100MjY3OGExZmMyODU2MzAyMzM5ODA3MmNhMDdlMzg0MzU.
Contact: <sip:10.0.0.1:5060>.
CSeq: 2 INVITE.
Server: sbc_5.
Content-Length: 0.
Hello,
I plan to add some rate limiting in the Kamailio. I'm already using Pike to rate limit based on the source IP.
But in this case, i want to do the rate limiting per customer(regardless of the source IP), I can identify the customer based on a custom
header in the INVITE, idea is to limit the customer to 'x' number of requests per second.
Nitesh
Hi,
I have two SIP servers, *A* and *B*, connected each other though a OPENVPN
tunnel. The server *B* needs to t_relay() every SIP message containing the
method MESSAGE to the server *A* but these messages never reach destination.
I have tested the tunnel connectivity and works fine. I wrote a Perl script
(located in *B*) that sends SIP MESSAGES to Kamailio (located in *A*) trying
to figure out what is happening but these messages are received by *A* and
processed correctly but when *B* does the same from Kamailio, it is never
received.
Here is the route part of kamailio.cfg in *B*:
Observation: ($rU == "1004") result is *true*
*
if(is_method("MESSAGE"))
{
if($rU == "1004")
{
xlog("L_INFO","En 1004");
rewritehost("10.8.0.1");
if (!t_relay())
xlog("L_INFO","MIO Error en t_relay");
t_reply("200", "Ok");
xlog("L_INFO","MIO despues rewrite");
exit;
}
.....*
The perl script that WORKS:
*$msg = 'MESSAGE sip:1004@192.168.1.2:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.2
From: "2002" <sip:2002@192.168.1.2 <sip%3A2002(a)192.168.1.2>>;tag=1837944796
To: <sip:1004@192.168.1.2 <sip%3A1004(a)192.168.1.2>>
Call-ID: 19722852989(a)192.168.1.2
CSeq: 15773 MESSAGE
Contact: <sip:2002@**PublicIP-protected**:5060>
Max-Forwards: 29
User-Agent: DBL
Content-Type: text/plain
Content-Length: 34
+595981[protected]
hello from kamailio
';
use IO::Socket;
my $sock = IO::Socket::INET->new( Proto=>'udp',
PeerHost=>'192.168.2.102',
PeerPort=>'5060');
print "Sending msg $msg\n";
$sock->send($msg) or die "error sending $!\n";
*Please help!
Thanks in advance.
Carlos.
Hi all,
I'm trying to use the Redis database for authentication and later for accounting. I installed Redis on the server, I compiled Kamailio with ndb_redis and the module exists.
When I try to start Kamailio I get following errors:
0(16737) ERROR: <core> [db.c:203]: db_bind_mod(): Module db_redis not found. Missing loadmodule?
0(16737) ERROR: auth_db [auth_db_mod.c:175]: mod_init(): unable to bind to a database driver
0(16737) ERROR: <core> [core/sr_module.c:968]: init_mod(): Error while initializing module auth_db (/usr/local/lib64/kamailio/modules/auth_db.so)
ERROR: error while initializing modules
Bellow are the relevant parts from config files.
Is there any example of kamailio.cfg with Redis configuration and commands for authentication and accounting?
Please help me to use Kamailio with Redis.
Thank youRegardsMarko
kamctlrc
---------
DBENGINE=DBTEXT
kamailio.cfg
-------------
#!define WITH_REDIS
#!define WITH_AUTH
#!ifdef WITH_REDIS
#!define DBURL "redis://localhost:6379/"
#!endif
#!ifdef WITH_AUTH
loadmodule "auth.so"
loadmodule "auth_db.so"
#!endif
#!ifdef WITH_REDIS
loadmodule "ndb_redis.so"
#!endif
# ----- ndb_redis params -----
modparam("ndb_redis", "server", "name=srv1;addr=127.0.0.1;port=6379;db=1")
# ----- auth_db params -----
#!ifdef WITH_AUTH
modparam("auth_db", "db_url", DBURL)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "load_credentials", "")
modparam("auth_db", "use_domain", MULTIDOMAIN)
#!endif
| | Virenfrei. www.avast.com |
Hello,
I have an issue with the behavior of ds_select_dst() method in case of
using algorithm 8 (dispatch based on priority). In case both destinations
are available, they are used alternatively, instead of always using the one
with the highest priority.
By searching through the mailing list I found that the lower the priority
number, the higher the priority (1 is first, 2 is second, etc.).
Based on this, I set the following in dispatcher.list:
7 sip:10.126.54.51:5060;transport=sctp 9 1
7 sip:10.126.55.51:5060;transport=sctp 9 2
After running "kamcmd dispatcher.reload" and "kamcmd dispatcher.list", I
have the confirmation that the priorities are correctly set:
SET: {
ID: 7
TARGETS: {
DEST: {
URI: sip:10.126.55.51:5060
;transport=sctp
FLAGS: AP
PRIORITY: 2
}
DEST: {
URI: sip:10.126.54.51:5060
;transport=sctp
FLAGS: AP
PRIORITY: 1
}
}
}
The dispatcher settings from kamailio.cfg is the following:
modparam("dispatcher", "list_file", "/etc/kamailio/dispatcher.list")
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "ds_ping_interval", 10)
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_ping_from", "sip:kamailio@sdp-t-lb2")
modparam("dispatcher", "ds_probing_mode", 3)
modparam("dispatcher", "dst_avp", "$avp(AVP_DST)")
modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)")
modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)")
modparam("dispatcher", "sock_avp", "$avp(AVP_SOCK)")
And the code which should do the displatch is the following:
if (ds_is_from_list(7, 3, "$ru")) {
remove_hf("Route");
if(!ds_select_dst("7", "8")) {
send_reply("404", "No destination");
exit;
}
}
With the settings above, I was expecting to always have the messages
delivered to 10.126.54.51. Instead, they are dispathed to 10.126.54.51 and
10.126.55.51 alternatively.
Thanks a lot,
Cristian
Hi all.
Have a problem with radius authorization.
I'm using auth_radius.so
modparams, only path to client file:
modparam("auth_radius", "radius_config",
"/etc/radiusclient/radiusclient.conf")
Freeradius installed and is working properly, radtest authentication from
kamailio host succeed .
How authorization block looks like:
if (!is_present_hf("Authorization")) {
xlog("L_NOTICE", "----- Athorization HF is not found - passing the
challenge -----\n");
if (nat_uac_test("2")) {
force_rport();
}
www_challenge("$fd", "1");
exit;
if (!radius_www_authorize("$fd","$fU")) {
if (nat_uac_test("2")) {
force_rport();
}
xlog("L_NOTICE", "----- Registeration $au@$ar ($fU) from $si:$sp Rejected.
Code: $rc -----\n");
sl_send_reply("401","Unauthorized");
exit;
Radius log is filled by rows like:
Auth: [digest] Cleartext-Password or Digest-HA1 is required for
authentication.
Tried to use radius_www_authorize without $fU - didn't change anything.
Tried to use www_challenge without qop - didn't change anything.
So, this solution is quite simple, but I have a fail while digest
authentication.
Any ideas?
--
--
BR, Donat Zenichev
Wnet VoIP team
Tel: +380(44) 5-900-808
http://wnet.ua
Hi
I am using the topos module when bridging 2 networks with Kamailio.
The INVITE/200OK part of the transaction is working fine (i.e. the Contact
on both sides matches correctly the corresponding network).
However when the ACK is sent into Kamailio, instead of realising the next
hop is myself and skipping it, Kamailio is sending the ACK directly to
itself as a packet, causing the call setup to break.
Does anyone have any advice for this situation?
Hi
I'm looking to check if what I'm trying to configure is feasible .
UA -> WAN(X.X.X.X) -> Kamailio(LAN 192.X.X.148) -> internal PBX(LAN
192.X.X.131)
I have a WN IP forwarded to and internal Kamailio server which is sitting in
front of an asterisk server. SIP requests are sent to asterisk from Kamailio
via dispatcher .
SIP client can register via WAN and Kamailio to asterisk , I have rtpenine
configured as below.
/usr/sbin/rtpengine --interface=192.X.X.148!X.X.X.X --listen-ng=7722
--timeout=60 --silent-timeout=3600
--pidfile=/var/run/ngcp-rtpengine-daemon.pid --table=0 --log-level=6
--log-facility=local7 --log-facility-rtcp=local7 --homer=192.168.200.5:9060
--homer-protocol=udp --homer-id=2002
But SIP SDP when sent to asterisk is still show the WAN IP of the Sip client
in the SDP offer that goes to asterisk , ive tried adding parameter
"via-branch=" and "auto-bridge" to rtpengine_offer but they don't seem to
make a difference , is there anyone way I can force the SDP offer that goes
to the backend PBX to use the IP of Kamailio server that rtpengine is
running on rather that the WAN IP that I'm advertising(X.X.X.X) ?
Example SIP SDP from WAN client to asterisk
INVITE sip:*97@sip.domain.com;transport=UDP SIP/2.0
Via: SIP/2.0/UDP
Client-IP:29345;branch=z9hG4bK-524287-1---e38082af1f110ad1;rport
Max-Forwards: 70
Contact: <sip:21@Client-IP:29345;transport=UDP> To:
<sip:*97@sip.domain.com;transport=UDP>
From: <sip:21@sip.domain.com;transport=UDP>;tag=e637343b
Call-ID: jvqeIB9f48_OGcTq0UxP7w..
CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE,
OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Zoiper rv2.8.40
o=Z
0 0 IN IP4 Client-IP
s=Z
c=IN IP4 Client-IP
t=0 0
m=audio 29344 RTP/AVP 8 0 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
and SDP that Kamailio sends to asterisk
INVITE sip:*97@sip.domain.com;transport=UDP SIP/2.0
Record-Route: <sip:192.X.X.148;lr>
Via: SIP/2.0/UDP
192.X.X.148;branch=z9hG4bKd924.bcc4248735b53e9cf783c87c81dfee28.0
Via: SIP/2.0/UDP
Client-IP:29345;received=Client-IP;branch=z9hG4bK-524287-1---e38082af1f110ad
1;rport=29345 Max-Forwards: 69
Contact: <sip:21@Client-IP:29345;transport=UDP> To:
<sip:*97@sip.domain.com;transport=UDP>
From: <sip:21@sip.domain.com;transport=UDP>;tag=e637343b
Call-ID: jvqeIB9f48_OGcTq0UxP7w..
CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE,
OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp User-Agent: Zoiper rv2.8.40
Path: <sip:192.X.X.148;lr;received=sip:Client-IP:29345>
v=0
o=Z 0 0 IN IP4 Client-IP
s=Z c=IN IP4 X.X.X.X
t=0 0
m=audio 32550 RTP/AVP 8 0 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
a=rtcp:32551
a=ice-ufrag:Dwd23Dem
a=ice-pwd:9Itp6Cq7lkYJxMkeDeA1I2kkzw
a=candidate:KZyzUR5lXJJpt1Et 1 UDP 2130706431 X.X.X.X 32550 typ host
a=candidate:KZyzUR5lXJJpt1Et 2 UDP 2130706430 X.X.X.X 32551 typ host
Gerry Kernan
Infinity IT | 17 The Mall | Beacon Court | Sandyford |
Dublin D18 E3C8 | Ireland
Tel: +353 - (0)1 - 293 0090 | E-Mail:
<mailto:gerry.kernan@infinityit.ie> gerry.kernan(a)infinityit.ie
Managed IT Services Infinity IT - <http://www.infinityit.ie/>
www.infinityit.ie
IP Telephony Asterisk Consulting -
<http://www.asteriskconsulting.com> www.asteriskconsulting.com
Contact Centre Total Interact -
<http://www.totalinteract.com> www.totalinteract.com