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
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 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.
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
Hi,
I want to implement the call control by
1. Validating the CLI and get the credit from DB
2. Check the Rate for the dialed number
3. set the call timeout for the call duration. ( credit/rate)
4. pass the call to remote PSTN GW
Please guide me on this.
Regards,
Roy.
Dear List,
I have some strange error when using sipML5 client (over websockets)
with Kamailio 4.0 server when sending a SUBSCRIBE request.
here is my log print:
Apr 18 02:55:21 oren-ubuntu /usr/sbin/kamailio[26476]: WARNING: <core>
[msg_translator.c:2499]: TCP/TLS connection (id: 0) for WebSocket could not
be found (tcp:10.0.0.4:8080)
Apr 18 02:55:21 oren-ubuntu /usr/sbin/kamailio[26476]: ERROR: tm
[t_msgbuilder.c:1367]: assemble_via: via building failed
Apr 18 02:55:21 oren-ubuntu /usr/sbin/kamailio[26476]: ERROR: tm
[t_msgbuilder.c:1540]: build_uac_req(): Error while assembling Via
Apr 18 02:55:21 oren-ubuntu /usr/sbin/kamailio[26476]: ERROR: tm
[uac.c:338]: t_uac: Error while building message
Apr 18 02:55:21 oren-ubuntu /usr/sbin/kamailio[26476]: ERROR: presence
[notify.c:1591]: in function tmb.t_request_within
Apr 18 02:55:21 oren-ubuntu /usr/sbin/kamailio[26476]: ERROR: presence
[notify.c:1678]: sending Notify not successful
Apr 18 02:55:21 oren-ubuntu /usr/sbin/kamailio[26476]: ERROR: presence
[subscribe.c:678]: Could not send notify
Apr 18 02:55:21 oren-ubuntu /usr/sbin/kamailio[26476]: ERROR: presence
[subscribe.c:713]: occured
Apr 18 02:55:21 oren-ubuntu /usr/sbin/kamailio[26476]: ERROR: presence
[subscribe.c:994]: in update_subscription
Could anyone help here ?
I think it is only some configuration problem, but i'm not sure how to
solve it.
Hi,
We run Kamailio 3.2.3 (FLAVOUR=ser) on an embedded ARM platform in near-
default configuration.
In a duration test, we observe that at a certain moment Kamailio seems to
start ignoring all (re-)register messages, and eventually expires the
existing registrations.
We have not been able to reproduce the issue using debug-level logging
(-dddd). Info-level logging (-ddd) does reproduce the error, but does not
produce any error messages.
Configuration: ser-basic.cfg, with the following changes:
port=5060
alias=testnet
Command line:
ser -m 4 -f /etc/ser/ser-basic.cfg -n3 -l udp:eth0
Load:
Bursts of 8 (Re-)REGISTER messages that are repeated every 85 seconds. The
specified expiration time is 120 seconds.
Bursts of 9 (Re-)INVITE messages that are repeated every 45 seconds.
Note:
With this load it takes roughly 1 hour for the error to occur. Using a more
standard 3600 second expiration time Kamailio still stalls, it just takes
longer.
Does anyone have any idea how to tackle this issue?
Kind regards,
Michiel Veldkamp
Dear List,
I'd like to get help regarding my case.
I have the following script where many thanks to Daniel has helped me in
if (is_method("INVITE"))
{
if (!load_gws(1, $rU, $fu)) {
sl_send_reply("502", "Unable To lOad GatEwAyS");
exit;}
if(!next_gw()){
sl_send_reply("503", "Unable To fInD a gateWaY");
exit;}
while(next_gw()){
km_append_branch(); }
sl_send_reply("302","Moved Temporary");
exit;
}
The problem am facing is that the call is rerouting from the first gateway
to the next gateway successfully when I have two gateways. BUT when I have
three gateways, and the first two gateways are off, the call is not rerouted
to the third gateway. It keeps hitting the seconds gateway and gives request
time out at the end
Why is that?
Thanks in advance,
F Chahrour