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.
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
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
Hello List.
The last weekend our kamailio process crashed with this error :
Jun 24 06:55:08 pxh /usr/local/sbin/kamailio[10661]: : <core>
[pass_fd.c:293]: ERROR: receive_fd: EOF on 29
Jun 24 06:55:08 pxh /usr/local/sbin/kamailio[10542]: ALERT: <core>
[main.c:751]: child process 10601 exited by a signal 11
Jun 24 06:55:08 pxh /usr/local/sbin/kamailio[10542]: ALERT: <core>
[main.c:754]: core was generated
Jun 24 06:55:08 pxh /usr/local/sbin/kamailio[10542]: INFO: <core>
[main.c:766]: INFO: terminating due to SIGCHLD
Can someone tell me what seems to be the problem here?
We’re using :
version: kamailio 3.2.2 (x86_64/linux) 98ba92-dirty
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
DBG_QM_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 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 98ba92 -dirty
compiled on 12:45:36 Feb 2 2012 with gcc 4.4.6
And this is the bt full from gdb
Core was generated by `/usr/local/sbin/kamailio -m 1024'.
Program terminated with signal 11, Segmentation fault.
#0 mi_profile_list (cmd_tree=<value optimized out>, param=<value optimized
out>) at dlg_profile.c:789
789 if ( mi_print_dlg( rpl,
ph->dlg, 0)!=0 )
Missing separate debuginfos, use: debuginfo-install
filesystem-2.4.30-2.1.el6.x86_64 glibc-2.12-1.25.el6_1.3.x86_64
keyutils-libs-1.4-1.el6.x86_64 krb5-libs-1.9-9.el6_1.2.x86_64
libcom_err-1.41.12-7.el6.x86_64 libselinux-2.0.94-5.el6.x86_64
mysql-libs-5.1.52-1.el6_0.1.x86_64 nss-softokn-freebl-3.12.7-1.1.el6.x86_64
openssl-1.0.0-20.el6_2.1.x86_64 pcre-7.8-3.1.el6.x86_64
zlib-1.2.3-26.el6.x86_64
(gdb) bt full
#0 mi_profile_list (cmd_tree=<value optimized out>, param=<value optimized
out>) at dlg_profile.c:789
node = <value optimized out>
rpl_tree = 0x20a6790
rpl = 0x20a67b0
profile = 0x7fe99a2dda00
ph = 0x0
profile_name = <value optimized out>
value = <value optimized out>
i = <value optimized out>
#1 0x00007fe9dce287b1 in run_mi_cmd (fifo_stream=<value optimized out>) at
../../lib/kmi/mi.h:77
No locals.
#2 mi_fifo_server (fifo_stream=<value optimized out>) at fifo_fnc.c:509
mi_cmd = 0x208f8f0
mi_rpl = <value optimized out>
hdl = 0x0
line_len = 41
file_sep = 0x2039017 ""
command = 0x7fe9dfdbdef9 "profile_list_dlgs"
file = 0x7fe9dfd98d78 "/tmp/openser_receiver_27809"
f = 0x2039018
reply_stream = 0x20b0980
#3 0x00007fe9dce2a640 in fifo_process (rank=<value optimized out>) at
mi_fifo.c:247
fifo_stream = 0x209a0b0
#4 0x00007fe9dce2a9de in mi_child_init (rank=0) at mi_fifo.c:211
pid = <value optimized out>
#5 0x00000000004dba41 in init_mod_child (m=0x7fe9dfc6ba10, rank=0) at
sr_module.c:886
No locals.
#6 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6bd08, rank=0) at
sr_module.c:883
No locals.
#7 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6c248, rank=0) at
sr_module.c:883
No locals.
#8 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6c748, rank=0) at
sr_module.c:883
No locals.
#9 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6d288, rank=0) at
sr_module.c:883
No locals.
#10 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6d928, rank=0) at
sr_module.c:883
No locals.
#11 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6dee0, rank=0) at
sr_module.c:883
No locals.
#12 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6e1f0, rank=0) at
sr_module.c:883
No locals.
#13 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6e5d0, rank=0) at
sr_module.c:883
No locals.
#14 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6e830, rank=0) at
sr_module.c:883
No locals.
#15 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6ebd0, rank=0) at
sr_module.c:883
No locals.
#16 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6f220, rank=0) at
sr_module.c:883
No locals.
#17 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6f648, rank=0) at
sr_module.c:883
No locals.
#18 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6fa60, rank=0) at
sr_module.c:883
No locals.
#19 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc6fe40, rank=0) at
sr_module.c:883
No locals.
#20 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc702c0, rank=0) at
sr_module.c:883
No locals.
#21 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc70ae8, rank=0) at
sr_module.c:883
No locals.
---Type <return> to continue, or q <return> to quit---
#22 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc70e18, rank=0) at
sr_module.c:883
No locals.
#23 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc71100, rank=0) at
sr_module.c:883
No locals.
#24 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc716c0, rank=0) at
sr_module.c:883
No locals.
#25 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc71df0, rank=0) at
sr_module.c:883
No locals.
#26 0x00000000004db9c4 in init_mod_child (m=0x7fe9dfc723c0, rank=0) at
sr_module.c:883
No locals.
#27 0x000000000046077d in main_loop () at main.c:1661
i = <value optimized out>
pid = <value optimized out>
si = 0x0
si_desc = "udp receiver child=15 sock=64.76.154.35:5060", '\000'
<repeats 20 times>, "\003", '\000' <repeats 15 times>,
"\030\325\a\232\351\177\000\000\001\000\000\000\002", '\000' <repeats 11
times>,
"\001\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000)\000\000\000\000\000\000"
#28 0x0000000000461f13 in main (argc=<value optimized out>,
argv=0x7fff2f2b2848) at main.c:2475
cfg_stream = <value optimized out>
c = <value optimized out>
r = <value optimized out>
tmp = 0x7fff2f2b3f76 ""
tmp_len = 0
options = 0x5a3178
":f:cm:M:dVhEb:l:L:n:vrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:"
ret = -1
seed = 1850310455
rfd = <value optimized out>
debug_save = <value optimized out>
debug_flag = <value optimized out>
dont_fork_cnt = <value optimized out>
n_lst = <value optimized out>
p = <value optimized out>
(gdb)
Regards,
Ricardo.-
Dear Sir,
I am using kamailio 1.5.0, having installed and configured as given on the
kamailio site
<http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-1.5.x-from-svn>
on my PC having Centos operating system. I have configured the config files
kamailio.cfg, kamctlrc accordingly as given on site.
when I start the kamailio using kamctl start command. it gives the error
message like
*[root@localhost ~]# kamctl start
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
INFO: Starting Kamailio :
ERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio start
failed
*please* *help me out to solve this problem and suggest me where I am
wrong. * *I have configured kamalio so many times it gives me the same kind
of error message.
*
*
-
With Regards,
Dinesh Kumar Gautam
Noida,
+919911838275
Hi,
Kamailio is running fine, but when I try run again by command line without
killing the previous, the kamailio_fifo is removed and functions fifo in
kamctl doen't work anymore. Why when I try running kamailio when already
exist one, it remove de file kamailio_fifo?
I can't find the part of source code that file kamailio_fifo is removed...
Someone knows?
Best Regards