[SR-Users] kamctl db exec

2011-02-24 Thread 侯旭光
Hello

How to use kamctl db exec query  function?

My SQL_ENGINE is MySQL

How to write the command line when I want to do the query select *
from acc with kamctl db tool?

thanks

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio 3.0.4: dispatcher module request

2011-02-24 Thread Klaus Feichtinger
Hello list,

I have a question to the dispatcher module in Kamailio version 3.0.4.

In my integration I use this module for distributing calls to a set of
gateways (with the round robin algorithm). Sometimes a gateway does not
react or send back a negative response. In that case I use the function
'ds_mark_dst(p)' in the failure_route and mark the current destination
with the flag 'probing'. I have set the threshhold value for probing mode
to '10'. This means that a gateway is effectively set to probing mode only
when it was marked with the flag 'probing' for 10 times. However,
sometimes a gateway is sending back a negative response for e.g. 5 times
and is afterwards working fine - without any problems. A few hours later
(e.g.) it is sending a negative reply again for one time. This means: the
counter for the probing_flags is increasing every time when the function
ds_mark_dst(p) is executed (in case that the process was not restarted
in the meantime!). So the problem is, that the counter is reaching the
threshhold value at any time and at that moment the gateway is set to
probing mode. Even if the gateway has sent a negative reply for only one
time (at that moment) - but according the history the proging_flag was set
several times.

What I miss in this module is a function to _reset_ that flag counter from
a REPLY_ROUTE. Note: I have to reset the counter, because the gateway does
not yet SIP OPTIONS requests and therefore it is set to 'probing' all time
until it is manually set back to active via MI command or after a process
restart. According the README file (and practical experience) the function
ds_mark_dst() is executable only within the failure_route. However, when I
want to set the flag (a) for the current destination I will do it within
a reply_route, but not in the failure_route (because I have received a
positive response and not a negative one). From my point of view it does
not make sense setting the 'active' flag for a destination from within a
FAILURE route.

Does anybody have an idea, how the 'flag-counter' could be reset (from
within the script)? I do not want to use a MI command.

configuration excerpt:

[...]
modparam(dispatcher, db_url,
mysql://openser:openserrw@localhost/openser)
modparam(dispatcher, table_name, dispatcher)
modparam(dispatcher, dst_avp, $avp(AVP_DST))
modparam(dispatcher, grp_avp, $avp(AVP_GRP))
modparam(dispatcher, cnt_avp, $avp(AVP_CNT))
modparam(dispatcher, ds_ping_from, sip:proxy@192.168.37.87)
modparam(dispatcher, ds_probing_mode, 0)
modparam(dispatcher, ds_probing_threshhold, 10)
modparam(dispatcher, ds_ping_interval, 30)
modparam(dispatcher, flags, 2)
modparam(dispatcher, force_dst, 1)
[...]
 if (!ds_select_dst(1, 4)) {
  sl_send_reply(404, No destination (disp));
  exit;
 }
 t_on_failure(failureroute);
 t_on_reply(replyroute);
[...]
failure_route[failureroute] {
[...]
 if (t_check_status([45][08]0) || (t_branch_timeout() 
!t_branch_replied())) {
  ds_mark_dst(p);
  if (!ds_next_dst()) {
   t_reply(404, No destination (disp));
   exit;
  }
  t_on_failure(failureroute);
  t_on_reply(replyroute);
 }

[...]
}
onreply_route [replyroute] {
 if (t_check_status(180|200) {
  # nice to have..
#  ds_mark_dst(a);
 }
}

Thanks in advance!

regards,
Klaus



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio 3.0.4: dispatcher module request

2011-02-24 Thread Carsten Bock
Hi Klaus,

I used to use that function especially for the purpose of resetting
the failure-counter.
We are using the ds_set_state(r) (r as reset counter) in a
onreply-route; i will check, why i never commited that patch to the
Kamailio-Repository.
I will add this functionality to git-Trunk in the next few days;
however, since it is a new feature, i will not backport it (but i can
provide patches for 3.1).

Kind regards,
Carsten



2011/2/24 Klaus Feichtinger klaus.li...@inode.at:
 Hello list,

 I have a question to the dispatcher module in Kamailio version 3.0.4.

 In my integration I use this module for distributing calls to a set of
 gateways (with the round robin algorithm). Sometimes a gateway does not
 react or send back a negative response. In that case I use the function
 'ds_mark_dst(p)' in the failure_route and mark the current destination
 with the flag 'probing'. I have set the threshhold value for probing mode
 to '10'. This means that a gateway is effectively set to probing mode only
 when it was marked with the flag 'probing' for 10 times. However,
 sometimes a gateway is sending back a negative response for e.g. 5 times
 and is afterwards working fine - without any problems. A few hours later
 (e.g.) it is sending a negative reply again for one time. This means: the
 counter for the probing_flags is increasing every time when the function
 ds_mark_dst(p) is executed (in case that the process was not restarted
 in the meantime!). So the problem is, that the counter is reaching the
 threshhold value at any time and at that moment the gateway is set to
 probing mode. Even if the gateway has sent a negative reply for only one
 time (at that moment) - but according the history the proging_flag was set
 several times.

 What I miss in this module is a function to _reset_ that flag counter from
 a REPLY_ROUTE. Note: I have to reset the counter, because the gateway does
 not yet SIP OPTIONS requests and therefore it is set to 'probing' all time
 until it is manually set back to active via MI command or after a process
 restart. According the README file (and practical experience) the function
 ds_mark_dst() is executable only within the failure_route. However, when I
 want to set the flag (a) for the current destination I will do it within
 a reply_route, but not in the failure_route (because I have received a
 positive response and not a negative one). From my point of view it does
 not make sense setting the 'active' flag for a destination from within a
 FAILURE route.

 Does anybody have an idea, how the 'flag-counter' could be reset (from
 within the script)? I do not want to use a MI command.

 configuration excerpt:

 [...]
 modparam(dispatcher, db_url,
 mysql://openser:openserrw@localhost/openser)
 modparam(dispatcher, table_name, dispatcher)
 modparam(dispatcher, dst_avp, $avp(AVP_DST))
 modparam(dispatcher, grp_avp, $avp(AVP_GRP))
 modparam(dispatcher, cnt_avp, $avp(AVP_CNT))
 modparam(dispatcher, ds_ping_from, sip:proxy@192.168.37.87)
 modparam(dispatcher, ds_probing_mode, 0)
 modparam(dispatcher, ds_probing_threshhold, 10)
 modparam(dispatcher, ds_ping_interval, 30)
 modparam(dispatcher, flags, 2)
 modparam(dispatcher, force_dst, 1)
 [...]
     if (!ds_select_dst(1, 4)) {
          sl_send_reply(404, No destination (disp));
          exit;
     }
     t_on_failure(failureroute);
     t_on_reply(replyroute);
 [...]
 failure_route[failureroute] {
 [...]
     if (t_check_status([45][08]0) || (t_branch_timeout() 
 !t_branch_replied())) {
          ds_mark_dst(p);
          if (!ds_next_dst()) {
               t_reply(404, No destination (disp));
               exit;
          }
          t_on_failure(failureroute);
          t_on_reply(replyroute);
     }

 [...]
 }
 onreply_route [replyroute] {
     if (t_check_status(180|200) {
          # nice to have..
 #          ds_mark_dst(a);
     }
 }

 Thanks in advance!

 regards,
 Klaus



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




-- 
Carsten Bock
Schomburgstr. 80
22767 Hamburg
Germany

Mobile +49 179 2021244
Home +49 40 34927217
Büro (Verl) +49 5246 801427
Fax +49 40 34927218
mailto:cars...@bock.info

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio 3.0.4: dispatcher module request

2011-02-24 Thread Carsten Bock
Btw.:
Attached is the patch for Kamailio 1.5, which i used back then...

Carsten

2011/2/24 Klaus Feichtinger klaus.li...@inode.at:
 Hello list,

 I have a question to the dispatcher module in Kamailio version 3.0.4.

 In my integration I use this module for distributing calls to a set of
 gateways (with the round robin algorithm). Sometimes a gateway does not
 react or send back a negative response. In that case I use the function
 'ds_mark_dst(p)' in the failure_route and mark the current destination
 with the flag 'probing'. I have set the threshhold value for probing mode
 to '10'. This means that a gateway is effectively set to probing mode only
 when it was marked with the flag 'probing' for 10 times. However,
 sometimes a gateway is sending back a negative response for e.g. 5 times
 and is afterwards working fine - without any problems. A few hours later
 (e.g.) it is sending a negative reply again for one time. This means: the
 counter for the probing_flags is increasing every time when the function
 ds_mark_dst(p) is executed (in case that the process was not restarted
 in the meantime!). So the problem is, that the counter is reaching the
 threshhold value at any time and at that moment the gateway is set to
 probing mode. Even if the gateway has sent a negative reply for only one
 time (at that moment) - but according the history the proging_flag was set
 several times.

 What I miss in this module is a function to _reset_ that flag counter from
 a REPLY_ROUTE. Note: I have to reset the counter, because the gateway does
 not yet SIP OPTIONS requests and therefore it is set to 'probing' all time
 until it is manually set back to active via MI command or after a process
 restart. According the README file (and practical experience) the function
 ds_mark_dst() is executable only within the failure_route. However, when I
 want to set the flag (a) for the current destination I will do it within
 a reply_route, but not in the failure_route (because I have received a
 positive response and not a negative one). From my point of view it does
 not make sense setting the 'active' flag for a destination from within a
 FAILURE route.

 Does anybody have an idea, how the 'flag-counter' could be reset (from
 within the script)? I do not want to use a MI command.

 configuration excerpt:

 [...]
 modparam(dispatcher, db_url,
 mysql://openser:openserrw@localhost/openser)
 modparam(dispatcher, table_name, dispatcher)
 modparam(dispatcher, dst_avp, $avp(AVP_DST))
 modparam(dispatcher, grp_avp, $avp(AVP_GRP))
 modparam(dispatcher, cnt_avp, $avp(AVP_CNT))
 modparam(dispatcher, ds_ping_from, sip:proxy@192.168.37.87)
 modparam(dispatcher, ds_probing_mode, 0)
 modparam(dispatcher, ds_probing_threshhold, 10)
 modparam(dispatcher, ds_ping_interval, 30)
 modparam(dispatcher, flags, 2)
 modparam(dispatcher, force_dst, 1)
 [...]
     if (!ds_select_dst(1, 4)) {
          sl_send_reply(404, No destination (disp));
          exit;
     }
     t_on_failure(failureroute);
     t_on_reply(replyroute);
 [...]
 failure_route[failureroute] {
 [...]
     if (t_check_status([45][08]0) || (t_branch_timeout() 
 !t_branch_replied())) {
          ds_mark_dst(p);
          if (!ds_next_dst()) {
               t_reply(404, No destination (disp));
               exit;
          }
          t_on_failure(failureroute);
          t_on_reply(replyroute);
     }

 [...]
 }
 onreply_route [replyroute] {
     if (t_check_status(180|200) {
          # nice to have..
 #          ds_mark_dst(a);
     }
 }

 Thanks in advance!

 regards,
 Klaus



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




-- 
Carsten Bock
Schomburgstr. 80
22767 Hamburg
Germany

Mobile +49 179 2021244
Home +49 40 34927217
Büro (Verl) +49 5246 801427
Fax +49 40 34927218
mailto:cars...@bock.info
Index: modules/dispatcher/dispatch.c
===
--- modules/dispatcher/dispatch.c	(revision 5814)
+++ modules/dispatcher/dispatch.c	(working copy)
@@ -1347,6 +1347,8 @@
 		ret = ds_set_state(group, avp_value.s, DS_PROBING_DST, 1);
 		if (ret == 0) ret = ds_set_state(group, avp_value.s,
 DS_INACTIVE_DST, 0);
+	} else if(mode==3) {
+		ret = ds_set_state(group, avp_value.s, DS_RESET_FAIL_DST, 1);
 	} else {
 		ret = ds_set_state(group, avp_value.s, DS_INACTIVE_DST, 1);
 		if (ret == 0) ret = ds_set_state(group, avp_value.s,
@@ -1408,12 +1410,12 @@
 idx-dlist[i].failure_count = 0;
 state = ~DS_RESET_FAIL_DST;
 			}
-			
-			if(type)
-idx-dlist[i].flags |= state;
-			else
-idx-dlist[i].flags = ~state;
-
+			if (state) {			
+if(type)
+	idx-dlist[i].flags |= state;
+else
+	idx-dlist[i].flags = ~state;
+			}
 			return 0;
 		}
 		i++;
Index: modules/dispatcher/dispatcher.c

[SR-Users] Rtpproxy newbie question

2011-02-24 Thread Marc
Hi,

I installed a kamailio from the debian repository, i use the default
configuration.
The only enable the tcp and tls transport modes, and configured mysql login.

Everyting seems to be working fine.

I would need now to configure rtprpoxy, but i just cant make it work.
My goal is to force rtpproxy for all calls.


Any help is highly appreciated!!



Thank you
Marc


Rtpproxy is installed and seems to be running:

This is my rtpproxy configuration:

# Defaults for rtpproxy

# The control socket.
#CONTROL_SOCK=unix:/var/run/rtpproxy/rtpproxy.sock
# To listen on an UDP socket, uncomment this line:
CONTROL_SOCK=udp:127.0.0.1:2

LISTEN_ADDR=[external_ip]
# Additional options that are passed to the daemon.
EXTRA_OPTS=-l ${LISTEN_ADDR}
/usr/sbin#
-

It seems to be running:
---
/etc/init.d# ./rtpproxy start
Starting RTP relay: rtpproxy.
/etc/init.d# netstat -an|grep 2
udp0  0 127.0.0.1:2 0.0.0.0:*
/etc/init.d#

-



Here is my kamailio configuration, default as is installed:

---


#!KAMAILIO
#
# Kamailio (OpenSER) SIP Server v3.1 - default configuration script
# - web: http://www.kamailio.org
# - git: http://sip-router.org
#
# Direct your questions about this file to: sr-users@lists.sip-router.org
# # Refer to the Core CookBook at http://www.kamailio.org/dokuwiki/doku.php
# for an explanation of possible statements, functions and parameters.
#
# Several features can be enabled using '#!define WITH_FEATURE' directives:
#
# *** To run in debug mode: 
# - define WITH_DEBUG
#
# *** To enable mysql: 
# - define WITH_MYSQL
#
# *** To enable authentication execute:
# - enable mysql
# - define WITH_AUTH
# - add users using 'kamctl'
#
# *** To enable IP authentication execute:
# - enable mysql
# - enable authentication
# - define WITH_IPAUTH
# - add IP addresses with group id '1' to 'address' table
#
# *** To enable persistent user location execute:
# - enable mysql
# - define WITH_USRLOCDB
#
# *** To enable presence server execute:
# - enable mysql
# - define WITH_PRESENCE
#
# *** To enable nat traversal execute:
# - define WITH_NAT
# - install RTPProxy: http://www.rtpproxy.org
# - start RTPProxy:
#rtpproxy -l _your_public_ip_ -s udp:localhost:7722
#
# *** To enable PSTN gateway routing execute:
# - define WITH_PSTN
# - set the value of pstn.gw_ip
# - check route[PSTN] for regexp routing condition
#
# *** To enable database aliases lookup execute:
# - enable mysql
# - define WITH_ALIASDB
#
# *** To enable multi-domain support execute:
# - enable mysql
# - define WITH_MULTIDOMAIN
#
# *** To enable TLS support execute:
# - adjust CFGDIR/tls.cfg as needed
# - define WITH_TLS
#
# *** To enable XMLRPC support execute:
# - define WITH_XMLRPC
# - adjust route[XMLRPC] for access policy
#
# *** To enable anti-flood detection execute:
# - adjust pike and htable=ipban settings as needed (default is
#   block if more than 16 requests in 2 seconds and ban for 300 seconds)
# - define WITH_ANTIFLOOD
#
# *** To enhance accounting execute:
# - enable mysql
# - define WITH_ACCDB
# - add following columns to database
#!ifdef ACCDB_COMMENT
  ALTER TABLE acc ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT '';
  ALTER TABLE acc ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT '';
  ALTER TABLE acc ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT '';
  ALTER TABLE acc ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT '';
  ALTER TABLE acc ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';
  ALTER TABLE missed_calls ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT
'';
  ALTER TABLE missed_calls ADD COLUMN src_domain VARCHAR(128) NOT NULL
DEFAULT '';
  ALTER TABLE missed_calls ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT
'';
  ALTER TABLE missed_calls ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT
'';
  ALTER TABLE missed_calls ADD COLUMN dst_domain VARCHAR(128) NOT NULL
DEFAULT ''; #!endif

### Defined Values #

# *** Value defines - IDs used later in config #!ifdef WITH_MYSQL # -
database URL - used to connect to database server by modules such
#   as: auth_db, acc, usrloc, a.s.o.
#!define mysql:[my_mysql_db_config]
mysql://openser:openserrw@localhost/openser
#!endif
#!ifdef WITH_MULTIDOMAIN
# - the value for 'use_domain' parameters #!define MULTIDOMAIN 1 #!else
#!define MULTIDOMAIN 0 #!endif

# - flags
#   FLT_ - per transaction (message) flags
#   FLB_ - per branch flags
#!define FLT_ACC 1
#!define FLT_ACCMISSED 2
#!define FLT_ACCFAILED 3
#!define FLT_NATS 5
#!define FLB_NATB 6
#!define FLB_NATSIPPING 7

### Global Parameters #

#!ifdef WITH_DEBUG
debug=2
log_stderror=no
#!else
debug=2
log_stderror=no
#!endif

memdbg=5
memlog=5

log_facility=LOG_DAEMON

fork=yes
children=4

/* uncomment the next line to disable TCP (default 

[SR-Users] tcp_persistent_flag

2011-02-24 Thread Bruno Bresciani
Hi,

there is in kamailio 3.1.2 some exported parameter that work as
tcp_persistent_flag paramenter? I want to keep alive the connections TCP/TLS
as long as the register contact is valid.


Best Regards
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio 3.0.4: dispatcher module request

2011-02-24 Thread Klaus Feichtinger
thanks Carsten for your information. So I'm not the first one who wishes
this functionality :-) I'm looking forward to using this function in the
new release.

Does this mean that in Kamailio 3.0.4 no possibility is given for
automatically changing the state of a destination from 'nearly-probing' to
'active'? Could the state being changed manually only?

regards
Klaus

P.S. I think we have to speed up implementation of SIP OPTIONS support in
the gateway - this would reset the state from probing to active.

 Hi Klaus,

 I used to use that function especially for the purpose of resetting the
 failure-counter.
 We are using the ds_set_state(r) (r as reset counter) in a
 onreply-route; i will check, why i never commited that patch to the
 Kamailio-Repository.
 I will add this functionality to git-Trunk in the next few days;
 however, since it is a new feature, i will not backport it (but i can
 provide patches for 3.1).

 Kind regards,
 Carsten



 2011/2/24 Klaus Feichtinger klaus.li...@inode.at:
 Hello list,

 I have a question to the dispatcher module in Kamailio version 3.0.4.

 In my integration I use this module for distributing calls to a set of
 gateways (with the round robin algorithm). Sometimes a gateway does
 not react or send back a negative response. In that case I use the
 function 'ds_mark_dst(p)' in the failure_route and mark the current
 destination with the flag 'probing'. I have set the threshhold value
 for probing mode to '10'. This means that a gateway is effectively set
 to probing mode only when it was marked with the flag 'probing' for 10
 times. However, sometimes a gateway is sending back a negative
 response for e.g. 5 times and is afterwards working fine - without any
 problems. A few hours later (e.g.) it is sending a negative reply
 again for one time. This means: the counter for the probing_flags is
 increasing every time when the function ds_mark_dst(p) is executed
 (in case that the process was not restarted in the meantime!). So the
 problem is, that the counter is reaching the threshhold value at any
 time and at that moment the gateway is set to probing mode. Even if
 the gateway has sent a negative reply for only one time (at that
 moment) - but according the history the proging_flag was set several
 times.

 What I miss in this module is a function to _reset_ that flag counter
 from a REPLY_ROUTE. Note: I have to reset the counter, because the
 gateway does not yet SIP OPTIONS requests and therefore it is set to
 'probing' all time until it is manually set back to active via MI
 command or after a process restart. According the README file (and
 practical experience) the function ds_mark_dst() is executable only
 within the failure_route. However, when I want to set the flag (a)
 for the current destination I will do it within a reply_route, but not
 in the failure_route (because I have received a positive response and
 not a negative one). From my point of view it does not make sense
 setting the 'active' flag for a destination from within a FAILURE
 route.

 Does anybody have an idea, how the 'flag-counter' could be reset (from
 within the script)? I do not want to use a MI command.

 configuration excerpt:

 [...]
 modparam(dispatcher, db_url,
 mysql://openser:openserrw@localhost/openser)
 modparam(dispatcher, table_name, dispatcher)
 modparam(dispatcher, dst_avp, $avp(AVP_DST))
 modparam(dispatcher, grp_avp, $avp(AVP_GRP))
 modparam(dispatcher, cnt_avp, $avp(AVP_CNT))
 modparam(dispatcher, ds_ping_from, sip:proxy@192.168.37.87)
 modparam(dispatcher, ds_probing_mode, 0)
 modparam(dispatcher, ds_probing_threshhold, 10)
 modparam(dispatcher, ds_ping_interval, 30)
 modparam(dispatcher, flags, 2)
 modparam(dispatcher, force_dst, 1)
 [...]
     if (!ds_select_dst(1, 4)) {
          sl_send_reply(404, No destination (disp));
          exit;
     }
     t_on_failure(failureroute);
     t_on_reply(replyroute);
 [...]
 failure_route[failureroute] {
 [...]
     if (t_check_status([45][08]0) || (t_branch_timeout() 
 !t_branch_replied())) {
          ds_mark_dst(p);
          if (!ds_next_dst()) {
               t_reply(404, No destination (disp));
               exit;
          }
          t_on_failure(failureroute);
          t_on_reply(replyroute);
     }

 [...]
 }
 onreply_route [replyroute] {
     if (t_check_status(180|200) {
          # nice to have..
 #          ds_mark_dst(a);
     }
 }

 Thanks in advance!

 regards,
 Klaus



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
 list sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




 --
 Carsten Bock
 Schomburgstr. 80
 22767 Hamburg
 Germany

 Mobile +49 179 2021244
 Home +49 40 34927217
 Büro (Verl) +49 5246 801427
 Fax +49 40 34927218
 mailto:cars...@bock.info




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

[SR-Users] NAT Traversal

2011-02-24 Thread Spinov Evgeniy
Hello, all.

Using nathelper + rtpproxy for subj. Kamailio has public and private
network interfaces. Asterisk is only private. RTP Proxy is working in
bridge mode and relaying traffic from UAC to Asterisks.

Everything is working fine, except one configuration. When the client is
behind router ( a specific one, I do not have an access there to
check ), and this UAC is making a call to other public extension, which
is behind router, then RTP Proxy is relaying traffic to the caller,
using another UDP port, then the packets arrive.

For instance: 
UAC 1 - UAC 2

PUBLIC_IP:10  KAMAILIO_IP:
KAMAILIO_IP:5678  PUBLIC_IP:12

While for the UAC 2 it looks like:

PUBLIC_IP:20  KAMAILIO_IP:6767
KAMAILIO_IP:4564  PUBLIC_IP:20

The source and destination UDP ports are the same. As result, I can hear
UAC 1 and he cannot hear me. 

In case of we have UAC 3, which is behind other router, call is working
fine with same configuration.

It's routers fault you can say, but in the same configuration ( I mean
network, not kamailio ) it worked, but when RTPProxy was not in bridge
mode and Kamailio and Asterisks were in public network. Reinvites are
not allowed in both cases. 

The question is, why the source and destination UDP ports are different?
Using STUN in first case, cause without it, private IP written in
contacts and as result, traffic relayed from Kamailio is incorrect,
cause heading to private network which is unreachable.

Any ideas where to dig?


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Calls are killed during kamailio restart

2011-02-24 Thread Efelin Novak
Hi,

I'd like to ask whether my situation is normal. During kamailio restart
calls are dropped from mediaproxy. Those two programs are connected using
kamailio.sock. Why RTP strem is dropped when SIP proxy is restarted? I would
expect just undelivered BYE or something.

Thanks for answer,

Efelin
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] no private memory left after mi mt_reload command

2011-02-24 Thread Henning Westerholt
On Wednesday 23 February 2011, Javier Gallart wrote:
 I've upgraded to 3.1.2 and compiled with the  DEFS+= -DMI_SYSTEM_MALLOC
 option. Looking good so far. Any thoughts about my second question, that
 is, how to be aware from the scripts if the any problems has arisen in the
 mi command?

Hi Javier,

there are several ways how to monitor this condition:

* create a check that grep in the log file for the error msg
* check the output of kamctl fifo get_statistics all for the memory 
   informations 
* do a OPTIONS ping to the server that is replied statefully (thus allocates 
   memory) and check this
* and probably the best, just check the return value of the mtree reload FIFO 
   cmd?

Cheers,

Henning

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Lcr Command Disabled

2011-02-24 Thread Amit Nepal

 -- command 'lcr' - manage least cost routes (lcr)

 lcr show_gws... show database gateways
 lcr show_routes show database routes
 lcr dump_gws... show in memory gateways
 lcr dump_routes show in memory routes
 lcr reload  reload lcr gateways and routes
 lcr eval_weights .. evaluates probability for given GW's weights

but when i issue #kamctl lcr show_gws  , it says command disabled.

Thank You
Amit Nepal
Systems Administrator
Phoenix Internet
Phone: 602-385-0731
   602-234-0917#112
http://www.phoenixinternet.net


On 2/23/2011 7:39 PM, Juha Heinanen wrote:

Amit Nepal writes:


kamctl lcr reload
ERROR: command disabled--

i don't know what version of kamailio you are using, but in 3.1, give
'help' to see lcr (and other) commands.

-- juha




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamctl db exec

2011-02-24 Thread Henning Westerholt
On Thursday 24 February 2011, 侯旭光 wrote:
 How to use kamctl db exec query  function?
 
 My SQL_ENGINE is MySQL
 
 How to write the command line when I want to do the query select *
 from acc with kamctl db tool?

Hi 侯旭光,

i must admit that i never used this feature. If you've shell access to the 
server, what about just using the standard mysql shell client mysql instead?

 http://dev.mysql.com/doc/refman/5.5/en/mysql.html

Cheers,

Henning

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] pipelimit db schema

2011-02-24 Thread Henning Westerholt
On Wednesday 23 February 2011, thrillerbee wrote:
 I found the answer to my most recent question (my timer interval was set
 too long). Can someone answer this one?
 
 Is there a fifo command available to reload pipelimit config from db?
 something like 'kamctl fifo pl_reload'?

Hi thrillerbee,

if its not in the documentation, then probably not. You can get all available 
commands at runtime by executing 

kamctl fifo which

on the server.

Cheers,

Henning

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] postgres in Kamailio 3.1.2

2011-02-24 Thread Bruno Bresciani
Hi,

I configure the Kamailio 3.1.2 with postgres but I cann't start. In the log
file is generated the following error:

**

ERROR: load_module: could not open module
/home2/local/kamailio/lib/kamailio/modules/db_
postgres.so: /home2/local/kamailio/lib/kamailio/modules/db_postgres.so:
undefined symbol: PQdescribePrepared


Why this error is generated?


Best Regards
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] dialplan regex confusion

2011-02-24 Thread thrillerbee
I'm using the following in dialplan:

id | dpid | pr | match_op |   match_exp|
match_len |  subst_exp   | repl_exp |
   attrs
+--++--++---+--+--+--
 3 |3 |  0 |1 | ^30\d{3}#\+?1?[2-9]\d{2}[2-9]\d{6}$|
0 | ^(30\d{3}#)(\+?1?)([2-9]\d{2}[2-9]\d{6}$)| \11\3| normalize
prefixed domestic

A R-URI goes in as 30001#12345678910
It comes out as 30001#*\1*12345678910

Can someone help me understand why? I'd expect to be exactly what it was
originally but for some reason '\1' is thrown in the middle...

Thanks,
Ryan
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] dialplan regex confusion

2011-02-24 Thread Juha Heinanen
thrillerbee writes:

 A R-URI goes in as 30001#12345678910
 It comes out as 30001#*\1*12345678910
 
 Can someone help me understand why? I'd expect to be exactly what it was
 originally but for some reason '\1' is thrown in the middle...

this is the same issue that i have reported and created bug report on
the tracker.

-=- juha

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Lcr Command Disabled

2011-02-24 Thread Amit Nepal

Hi Juha,
 I am using kamailio 3.1.2.

Thank You
Amit Nepal
Systems Administrator
Phoenix Internet
Phone: 602-385-0731
   602-234-0917#112
http://www.phoenixinternet.net


On 2/24/2011 2:16 PM, Juha Heinanen wrote:

Amit Nepal writes:


but when i issue #kamctl lcr show_gws  , it says command disabled.

perhaps it is disabled in the version of kamailio you are using.
upgrade to a newer one or use xmlrpc.

-- juha




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dialplan regex confusion

2011-02-24 Thread thrillerbee
Thanks. I see it now.
http://sip-router.org/tracker/index.php?do=detailstask_id=115

On Thu, Feb 24, 2011 at 3:19 PM, Juha Heinanen j...@tutpro.com wrote:

 thrillerbee writes:

  A R-URI goes in as 30001#12345678910
  It comes out as 30001#*\1*12345678910
 
  Can someone help me understand why? I'd expect to be exactly what it was
  originally but for some reason '\1' is thrown in the middle...

 this is the same issue that i have reported and created bug report on
 the tracker.

 -=- juha

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] tcp_persistent_flag

2011-02-24 Thread Klaus Darilion

Bruno Bresciani wrote:

Hi,

there is in kamailio 3.1.2 some exported parameter that work as 
tcp_persistent_flag paramenter? I want to keep alive the connections 
TCP/TLS as long as the register contact is valid.


IIRC, no. Just set a max expiration time for registration and use a bit 
bigger value for TCP lifetime.


regards
klaus



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] postgres in Kamailio 3.1.2

2011-02-24 Thread Klaus Darilion

Bruno Bresciani wrote:

Hi,

I configure the Kamailio 3.1.2 with postgres but I cann't start. In the 
log file is generated the following error:


//

ERROR: load_module: could not open module 
/home2/local/kamailio/lib/kamailio/modules/db_
postgres.so: /home2/local/kamailio/lib/kamailio/modules/db_postgres.so: 
undefined symbol: PQdescribePrepared


Have you built Kamailio yourself? Looks like db_postgres.so can not find 
the postgresql libraries, or it was built with a different library version.


Maybe ldd can give you some details:

  ldd /home2/local/kamailio/lib/kamailio/modules/db_postgres.so

regards
Klaus


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Lcr Command Disabled

2011-02-24 Thread Juha Heinanen
Amit Nepal writes:

   I am using kamailio 3.1.2.

i don't use myself kamctl. i use sip router ctl that i call myself
sip-proxy_ctl and its help tells me about lcr commands.  perhaps someone
else is able to tell you, what this command is called by default.

-- juha

root@rautu:~# sip-proxy_ctl help
cfg.commit
cfg.diff
cfg.get
cfg.help
cfg.list
cfg.rollback
cfg.set_delayed_int
cfg.set_delayed_string
cfg.set_now_int
cfg.set_now_string
core.arg
core.echo
core.flags
core.info
core.kill
core.printi
core.prints
core.ps
core.pwd
core.sctp_info
core.sctp_options
core.shmmem
core.tcp_info
core.tcp_options
core.udp4_raw_info
core.uptime
core.version
ctl.connections
ctl.listen
ctl.who
dns.add_a
dns.add_
dns.add_srv
dns.debug
dns.debug_all
dns.delete_a
dns.delete_
dns.delete_all
dns.delete_all_force
dns.delete_cname
dns.delete_ebl
dns.delete_naptr
dns.delete_ptr
dns.delete_srv
dns.delete_txt
dns.lookup
dns.mem_info
dns.view
domain.dump
domain.reload
dst_blacklist.add
dst_blacklist.debug
dst_blacklist.delete_all
dst_blacklist.mem_info
dst_blacklist.view
htable.dump
lcr.dump_gws
lcr.dump_rules
lcr.reload
mi
mi_dg
mi_fifo
mi_xmlrpc
sl.stats
system.listMethods
system.methodHelp
system.methodSignature
tls.info
tls.list
tls.options
tls.reload
tm.cancel
tm.hash_stats
tm.reply
tm.stats
tm.t_uac_start
tm.t_uac_wait
ul.dump
alias: ps
alias: list
alias: ls
alias: server
alias: serversion
alias: who
alias: listen
alias: dns_mem_info
alias: dns_debug
alias: dns_debug_all
alias: dst_blacklist_mem_info
alias: dst_blacklist_debug
builtin: ?
builtin: help
builtin: version
builtin: quit
builtin: exit
builtin: warranty
builtin: license

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Segfault in Kamailio 1-3-4 to 1.5.5

2011-02-24 Thread Andrew O. Zhukov

In continue of letters:
Kamailio 1.5.5 No TLS Segmentation Fault
After upgrade from openser 1.3.4 to kamailio 1.5.5 the same crash set

Can someone from developers provide me commercial support to fix this 
bug in malloc module.


If so, contact me directly.


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users