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, I have Kamailio as SIP server and RTP server. Client is PJSIP.
I read that STUN is for non-symmetric NAT, and RTP server is for symmetric
NAT.
Supposed A calls B.
If A, B both use symmetric NAT and STUN, they cannot hear each other
If A or B use non-symmetric NAT and NOT using STUN, they cannot hear each
other.
Why is that?
I read http://tools.ietf.org/id/draft-takeda-symmetric-nat-traversal-00.txt
for Prediction Failure, is that related to this problem ?
--
Khoa Pham
HCMC University of Science
Faculty of Information Technology
Hi All,
I have build Kamailio 4.0.1 from source in CentOS 5.8(i386
architecture).I followed all instructions from
http://www.kamailio.org/wiki/install/4.0.x/git.(Though Modules_k directory
is not generated).I then edit kamailio.config file for websocket support as
described in webocket.cfg file in exmples directory.But while starting
kamailio it gives following error
ERROR: load_module: could not open module : libunistring.so.0: cannot
open shared object file: No such file or directory
0(30270) : [cfg.y:3567]: parse error in config file
/usr/local/etc/kamailio/kamailio.cfg, line 318, column 12-57: failed to
load module
I checked websocket.so file in the specified directory and it is
already there.Can you please help me what's wrong with it?
please help.
Rupayan Dutta
Hello,
First, i have 7 years experience with Asterisk, but I started a project
with Kamailio, forgive me in advance if I say silly things...! ;-)
I set up a classic Asterisk / Kamailio configuration:
sip phones -> kamailio -> asterisk -> sip trunks/pstn.
When a call comes from the PSTN side, if I configure Asterisk as follows:
[012345678]
type = friend
username = 012345678
secret = xxxxxxx
host = dynamic
fromdomain = sip.mydomain.com
fromuser = 012345678
Standard mode:
exten => 012345678, 1, Dial(SIP/012345678) -> The call is redirected on the
phone by Kamailio ! :-)
------------------------------------------------------------------------------------------------------------------------------------------------
Trunk mode:
[mytrunk]
type = friend
username = mytrunkUser
secret = xxxxxxx
host = dynamic
fromdomain = sip.mydomain.com
fromuser = mytrunkUser
exten => 012345678, 1, Dial(SIP/mytrunk/012345678) -> The call is rejected
by Kamailio....
exten => 012345679, 1, Dial(SIP/mytrunk/012345679) -> The call is rejected
by Kamailio ....
My question is how to allow the routing of multiple numbers (trunk mode) in
a SIP account with Kamailio?
Best regards,
Mickael
Hello all,
Just wondering if anyone know any tutorial on setting up HA+DRBD solution for kamailio.
Especially creating partitions, DRBD devices and mount points.
Thanks in advance,
-Sid
"May the light be with you." ______________________________________________
Siddhardha Garige
www.luminepixels.com
Hi,
I'm using 'allow_trusted()' from Permissions module without a problem in a
Kamailio 4.0 routing logic. It does just work, but the MI command
'trusted_dump' tells me that the module is not in use:
'''
server:/home/jmillan# kamctl fifo trusted_dump
500 Trusted-module not in use
'''
Doing a 'trusted_reload' does neither make any query to database to
retrieve the data.
Other MI commands of same module do work correctly. ie: 'address_reload' or
'address_dump'
Note: I have tested in a Kamailio 1.5 and the result is the same.
Regards.
--
José Luis Millán
Hi all..
I have solve the problem .
Cheers,
vivi
From: vivi [mailto:vivi.hilton@gmail.com]
Sent: Saturday, June 06, 2009 11:29 PM
To: 'users(a)lists.kamailio.org'
Subject: /usr/local/sbin/kamdbctl create error
Hi all
I have specify the wanted db type (DBENGINE=MYSQL) in the
/usr/local/etc/kamailio/kamctlrc
then I using "/usr/local/sbin/kamdbctl create" to create MySQL database,
but I got this error:
ERROR: database engine not specified, please setup one in the config script
root@acer:/usr/local/src/kamailio-1.5.0/sip-server# vim
/usr/local/etc/kamailio/kamctlrc
root@acer:/usr/local/src/kamailio-1.5.0/sip-server# /usr/local/sbin/kamdbctl
create
MySQL password for root:
INFO: test server charset
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
/usr/local/lib/kamailio/kamctl/kamdbctl.mysql: line 112: [: =: unary
operator expected
INFO: creating database openser ...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
ERROR: Creating core database and grant privileges failed!
Cheers,
vivi
Hi,
is there any way to return values from a call to python_exec function
orther than the default returned integer?
Following code generates this error:
Oct 1 09:08:23 zskio /usr/sbin/kamailio[21789]: ERROR: app_python
[python_support.c:38]: python_exec2: Unhandled exception in the Python
code:
Oct 1 09:08:23 zskio /usr/sbin/kamailio[21789]: ERROR: app_python
[python_support.c:78]: #011RuntimeError: no such function
if (!python_exec("get_provider",
$(var(clean_uri){s.prefixes}))) {
xlog("L_ERR","Can not choose a provider for $rU\n");
sl_send_reply("503","Can not choose a provider
for $rU");
exit;
}
def get_provider(self, msg, param):
# snipped code...
result = self.util.get_provider(prefixes, position, mode)
if result is not None:
LM_ERR("mode: %s position: %d result: %s" % (mode,
position, result))
# this raises error
msg.call_function('rewritehost', result['provider']['ip'])
return 1
return -1
I tried to use headers as transport but this simple code does not work:
Oct 1 09:45:31 zskio /usr/sbin/kamailio[22303]: ERROR: <script>: No header
if (!is_present_hf("X-Test-header")) {
xlog("L_ERROR", "No header\n");
}
else {
xlog("L_INFO", "Header added\n");
}
def test_set_header(self, msg):
msg.call_function('append_hf', 'X-Test-header: test\r\n')
return 1
Thanks in advance.
Hi
I am using Kamailio 4.0.1 in front of an asterisk servers farm to handle TLS with our clients and providers. The idea is to have kamailio "talking" SIP/UDP/5060 and TLS/TCP/5061 with the customers and providers and regular SIP/UDP/5060 with our internal asterisk servers.
So far at least for the customers it looks like it can work. But I have a problem, when the call is established and the called person hangs up, the BYE from the called person to the calling person is ignored. Only when the calling person hangs up first the call is terminated properly.
This is what I have been able to see:
1- Customer starts the TLS handshake/connection.
2- Kamailio authenticate it, then routes the call to the asterisk server using regular SIP/UDP/5060 but I see that it is inserting 2 Record Routes in the INVITE:
Record-Route: <sip:192.168.1.58;r2=on;lr=on>
Record-Route: <sip:192.168.1.58:5061;transport=tls;r2=on;lr=on>
3- The Contact on that INVITE to the asterisk also comes like this:
Contact: <sip:94167032@172.31.196.21:53325;transport=tls>
4- The ACK sent to the asterisk once it accepts the call (200 OK) also has those 2 Record-Routes:
Record-Route: <sip:192.168.1.58;r2=on;lr=on>
Record-Route: <sip:192.168.1.58:5061;transport=tls;r2=on;lr=on>
5- The call is established, once the called person decides to hang up the BYE looks like this:
BYE sip:94167032@172.31.196.21:53325;transport=tls SIP/2.0
Via: SIP/2.0/UDP 192.168.1.59:5060;branch=z9hG4bK40fa1c23;rport
Route: <sip:192.168.1.58;r2=on;lr=on>,<sip:192.168.1.58:5061;transport=tls;r2=on;lr=on>
Max-Forwards: 70
From: <sip:3030500@1.2.3.4>;tag=as37953869
To: "kamailio" <sip:kamailio@1.2.3.4>;tag=788cd7c892df40f3b1967112395e2ca4
Call-ID: f9fe65daf1074219be26cb0c224339f1
CSeq: 102 BYE
User-Agent: Asterisk PBX 11.3.0
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0
My kamailio TLS config is shown below:
enable_tls=yes
loadmodule "tls.so"
# ----- tls params -----
modparam("tls", "config", "/usr/local/kamailio-4.1//etc/kamailio/tls.cfg")
modparam("tls", "private_key", "./privkey.pem")
modparam("tls", "certificate", "./kamailio1_cert.pem")
modparam("tls", "ca_list", "./calist.pem")
modparam("tls", "verify_certificate", 1)
modparam("tls", "require_certificate", 1)
The TLS client that I am using is called Blink.At this point I don't know whether kamailio is sending the BYE using TLS to the customer and waiting for the 200 OK from the customer or whether kamailio does not like something in the BYE and that is why is ignoring it.
I see some encrypted packets from kamailio to the client but I don't know what is inside.
Any help would be very appreciated.
thank you
fabian
I tried to call record_route_preset() in branch route in order to add
contact specific RR headers when request is forked to more than one
contact. What happened was that I got error message:
Sep 26 17:03:47 wheezy2 /usr/sbin/sip-proxy[2436]: ERROR: rr [rr_mod.c:256]: Duble attempt to record-route
Is it really so that record routing is not a branch specific thing? Is
there a way to solve this problem?
-- Juha