Hi.
Assume I have phones in private network 10.0.0.0/24.
There is no NAT server in this network, no default
gateway, no way to outside world (except SER). The
only server phones "know" about is SER.
SER has 2 NIC's one in 10.0.0.0/24 network ip
10.0.0.17 and other in "real" word 201.0.X.X/24. There
are some phones (or may be SIP servers) in "real"
world.
I want to force rtpproxy for outside world and do not
for private networks.
I made some test and it fails.
If I contact from private network to outside world the
Via message contains private SER ip 10.0.0.17 and
phone which I need to contact does not know how to
contact SER. Also contact in SDP message contains
private ser IP 10.0.0.17 because I have forced
rtpproxy.
As I understand, it it necessary to modify SDP and SIP
messages (contact and Via) in a config script while
processing requestst after forcing rtpproxy.
Is it possible?
May be I missed something, but I have not founded such
functions.
Regards,
Greg.
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
Problem resolved by including the dbtext module.
Thanks,
Dhiraj
-----Original Message-----
From: dhiraj.2.bhuyan(a)bt.com [mailto:dhiraj.2.bhuyan@bt.com]
Sent: 24 November 2003 11:20
To: serusers(a)lists.iptel.org
Subject: [Serusers] db_use_table not found | FreeRadius
Hello List,
I am getting an "<~db_use_table> not found" error while trying to use SER with freeradius. The radiusclient and freeradius server are properly configured (tested freeradius with radiusclient as per the SER RADIUS Howto doc). I am using ser-0.8.11, freeradius-0.9.3 and radiusclient-0.3.2. SER error log below and ser.cfg attached. Any help will be greatly appreciated.
-------------------------------------------------
0(25602) find_export: found <sl_send_reply> in module sl_module [/usr/local/lib/ser/modules/sl.so]
0(25602) DEBUG: init_mod: auth_db
0(25602) auth_db module - initializing
0(25602) find_export: <~db_use_table> not found
0(25602) mod_init(): Unable to bind database module
0(25602) init_mod(): Error while initializing module auth_db
ERROR: error while initializing modules
-------------------------------------------------
Thanks,
Dhiraj Bhuyan
Security Research Engineer
BT Exact
Tel: +44 1473 643932
Mob: +44 7962 012145
Email: dhiraj.2.bhuyan(a)bt.com
Hello List,
I am getting an "<~db_use_table> not found" error while trying to use SER with freeradius. The radiusclient and freeradius server are properly configured (tested freeradius with radiusclient as per the SER RADIUS Howto doc). I am using ser-0.8.11, freeradius-0.9.3 and radiusclient-0.3.2. SER error log below and ser.cfg attached. Any help will be greatly appreciated.
-------------------------------------------------
0(25602) find_export: found <sl_send_reply> in module sl_module [/usr/local/lib/ser/modules/sl.so]
0(25602) DEBUG: init_mod: auth_db
0(25602) auth_db module - initializing
0(25602) find_export: <~db_use_table> not found
0(25602) mod_init(): Unable to bind database module
0(25602) init_mod(): Error while initializing module auth_db
ERROR: error while initializing modules
-------------------------------------------------
Thanks,
Dhiraj Bhuyan
Security Research Engineer
BT Exact
Tel: +44 1473 643932
Mob: +44 7962 012145
Email: dhiraj.2.bhuyan(a)bt.com
Hi!
I have the following configuration:
---------------- ------------ -----------
| PSTN-Gateway |--------|1. 2.|-------| Clients |
---------------- ------------ -----------
|
internet | local
NAT
Ser 0.8.12 runs only on the 2. interface.
My configuration is:
# ------------------------- request routing logic -------------------
# main routing logic
route{
if (!mf_process_maxfwd_header("10")) {
log(1, " Too many hops!");
sl_send_reply("483","Too Many Hops");
break;
};
if ( msg:len > max_len ) {
log(1, " Message too big!");
sl_send_reply("513", "Message too big");
break;
};
record_route();
if (uri==myself) {
if (method=="REGISTER") {
save("location");
break;
};
if (!lookup("location")) {
#if it is a call to PSTN then forwad it to the
#gateway
if (uri=~"sip:0\+?[0-9]+@.*") {
rewritehostport("152.66.244.200:5060");
force_rtp_proxy();
t_on_reply("1");
if (!t_relay()) {
sl_reply_error();
};
break;
};
sl_send_reply("404", "Not Found");
break;
};
};
if (!t_relay()) {
sl_reply_error();
};
}
onreply_route[1] {
if (status=~"[12][0-9][0-9]")
force_rtp_proxy();
}
#---------------------------------------------------------------------
When initiating a call from the client to the PSTN I get the following
error:
ERROR: extract_mediaip: no 'c=' in SDP
But when I watch the incoming INVITE packet with tcpdump, I can see
the connection information.
Thx oli
Hello all,
I'm trying to get accounting working, but I don't seem to get any stop
records in the database. However, when I tell ser to log to syslog, I do
get the STOP records. The only thing I come by when searching the
archives is to be sure that the loose_route() is after the setflag.
I log incoming invite's and bye's to stderror, and I see them coming by:
****
0(14598) looking up aliases
0(14598)
****
time [Fri Nov 21 13:22:50 2003] method <INVITE> Setting acc flags ****
0(14598) Setting accounting flag
0(14598) Setting missed calls flag 0(14598)
****
time [Fri Nov 21 13:22:50 2003] method <INVITE> r-uri
<8910(a)ams-ix.net;user=phone>
IP: <193.194.136.248> - t-uri <sip:8910@ams-ix.net;user=phone>
****
0(14598) looking up aliases
0(14598)
****
time [Fri Nov 21 13:22:55 2003] method <ACK> r-uri
<8910@193.194.136.225:5060>
IP: <193.194.136.248> - t-uri <sip:8910@ams-ix.net;user=phone>
****
0(14598) looking up aliases
0(14598)
****
time [Fri Nov 21 13:23:02 2003] method <BYE> Setting acc flags ****
0(14598) Setting accounting flag
0(14598) Setting missed calls flag 0(14598)
****
time [Fri Nov 21 13:23:02 2003] method <BYE> r-uri
<8910@193.194.136.225:5060>
IP: <193.194.136.248> - t-uri <sip:8910@ams-ix.net;user=phone>
****
Also, the INVITE is inserted into the database, but the BYE not. When I
change "db_flag" to "log_flag" and change log_stderror=yes to
log_stderror=no, I do see the BYE ACC antries in the syslog. I do not
see errors int he mysql log file. No obvious errors when viewing debug=7.
Running:
ser 0.8.11
Mysql 4.x
I hope for a few suggestions:-) My config is pasted in below.
Kind regards,
Geert
----------
Config:
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
debug=3
fork=no
log_stderror=yes
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
#children=4
fifo="/tmp/ser_fifo"
listen="colo.jink.net"
alias="ams-ix.net"
# ------------------ module loading ----------------------------------
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
loadmodule "/usr/lib/ser/modules/xlog.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/lib/ser/modules/acc.so"
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
### Set up parameters for database lookups
modparam("usrloc|auth_db|group|acc", "db_url",
"sql://xxxx:xxxx@localhost/ser")
### mode 1: direct writing to database
### mode 2: buffered writing to database
modparam("usrloc", "db_mode", 1)
# -- auth_db params --
### Enable encrypted database authentication
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
# -- acc params --
### For acc Database support, uncomment: DEFS+=-DSQL_ACC in
### sip_router/modules/acc/Makefile and recompile
### Set up missed call logging
modparam("acc", "db_missed_flag", 3)
modparam("acc", "db_flag", 1 )
modparam("acc", "log_level", 1)
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# ------------------------- request routing logic -------------------
route{
if (method=="INVITE" || method=="BYE"){
## Accounting for all calls
xlog("L_INFO", "\n****\n time [%Tf] method <%rm> Setting acc flags
****\n");
log(1, "Setting accounting flag\n");
setflag(1);
## Accounting for "missed calls"
log(1, "Setting missed calls flag");
setflag(3);
};
## Log the request:
xlog("L_INFO", "\n****\n time [%Tf] method <%rm> r-uri <%ru>\n IP:
<%is> - t-uri <%tu>\n\n****\n");
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if (len_gt( max_len )) {
sl_send_reply("513", "Message too big");
break;
};
# Load aliases in memory
log(1, "looking up aliases\n");
lookup("aliases");
# loose-route processing
#if (loose_route()) {
# t_relay();
# break;
#};
# if the request is for other domain use UsrLoc
# (in case, it does not work, use the following command
# with proper names and addresses in it)
if (uri==myself) {
if (method=="REGISTER") {
if (!www_authorize("ams-ix.net", "subscriber")) {
www_challenge("ams-ix.net", "0");
break;
};
save("location");
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
if ((method=="INVITE" || method=="ACK") && t_newtran()) {
t_reply("404", "Not Found");
#log(1, "Log missed call");
break;
};
sl_send_reply("404", "Not Found");
break;
}else{
if (!t_relay()) {
sl_reply_error();
};
};
};
}
Hi all,
We have successfully managed to get Ser to act as a proxy between our
backend SIP service and clients out on the Internet using the nathelper
modules and RTP proxying. However, one of the features of our SIP
service allows you to dial a number via a web interface. This appears
to work by sending an INVITE from the SIP service out to the IP phone
using the 'Diversion' and follow-me directives. The problem we appear
to be having is that the RTP information is setup not in the INVITE but
rather in an OK status message returned when we pick up the phone to
dial out. From what I understand Ser does not look inside Status
messages but only in the initial INVITE, hence when we use the web
interface to dial out the SDP location is not being altered to point at
our Ser proxy and therefore the RTP is not being proxied as we want.
We have tried various things but the issue appears to be that Ser will
not look inside OK replies to INVITE's. We might be misunderstanding
things here??? By the way all SIP messages are going through the proxy
as desired... The only issue we have is with the RTP traffic.
Can anybody help us understand how to get around this problem (if in
fact it is possible to get around it using Ser)
Cheers,
Steve
-----------------------------------------------------------------------------------------------
This message and any attachments contain privileged and confidential information.
If you are not the intended recipient of this message, you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify the sender immediately via email and then destroy this message and any attachments.
Hi,
I have problem registering my softphone to the SIP proxy using my domain
name(e.g abc.com). Using IP address, I am able to access, do anyone have a
sample of the zone file of the DNS server. Thank you in advance.
regards,
Shirley
Hi all,
I try to use radius for user authorization and group checking.
But it seems that the group_radius module find no credentials for the user,
even if it is authorized by module auth_radius.
Actually I use ser 0.8.11 without a mysql-db.
The actual config is below.
Thanks,
Axel
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
debug=7
fork=yes
log_stderror=no
*/
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
#port=5060
#children=4
fifo="/tmp/ser_fifo"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
#loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/auth.so"
#loadmodule "/usr/lib/ser/modules/auth_db.so"
loadmodule "/usr/lib/ser/modules/textops.so"
#loadmodule "/usr/lib/ser/modules/acc.so"
loadmodule "/usr/lib/ser/modules/auth_radius.so"
loadmodule "/usr/lib/ser/modules/group_radius.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
#modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 0)
# -- auth params --
# Uncomment if you are using auth module
#
#modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
#modparam("auth_db", "password_column", "password")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
#modparam("rr", "enable_full_lr", 1)
# -- acc params --
# set the reporting log level
#modparam("acc", "log_level", 1)
# number of flag, which will be used for accounting; if a message is
# labeled with this flag, its completion status will be reported
#modparam("acc", "log_flag", 1 )
modparam("auth_radius", "radius_config","/etc/radiusclient/radiusclient.conf")
modparam("group_radius", "radius_config","/etc/radiusclient/radiusclient.conf")
modparam("auth_radius", "service_type", 15)
modparam("rr", "enable_full_lr", 1)
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if (len_gt( max_len )) {
sl_send_reply("513", "Message too big");
break;
};
# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy; that's
# particularly good if upstream and downstream entities
# use different transport protocol
record_route();
# loose-route processing
if (loose_route()) {
t_relay();
break;
};
# if the request is for other domain use UsrLoc
# (in case, it does not work, use the following command
# with proper names and addresses in it)
if (uri==myself) {
if (method=="REGISTER") {
if (!radius_www_authorize("")) {
www_challenge("", "1");
break;
};
save("location");
break;
};
if (uri=~"^sip:0[0-9]*@fn-sip.mcbone.net") {
log("Check group\n");
if (!radius_is_user_in("credentials", "pstn")) {
sl_send_reply("403", "no PSTN authorization");
break;
};
log("Forwarding to PSTN\n"); ## registered in our realm
rewritehostport("62.104.210.134:5060");
t_relay_to_udp ("62.104.210.134", "5060");
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
# forward to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
sl_reply_error();
};
# forward the request to all destinations in destination set now
t_relay();
}
Hi,
My ser proxy is sitting between two networks with an interface on each, the
back end is on an rfc1918 range and the front end is on an internet routeable
address range. I'm doing some rewriting of address to relay anything for
**XXXXXX(a)thisdomain.com to XXXX(a)thatdomain.com as fwd does.
The problem I have is that if a requests comes in on the private interface,
the address gets stripped and rewritten properly and the request goes out, but
the source address of the INVITE (as in the ip source address) is of the
private interface that the packet came in on. It's therefore being dropped by
my ISP, and wouldn't be any good anyway even if it wasn't.
I have a record-route at the beginning of the script which is also recording
the wrong address but then that makes sense and is jsut a problem with my
script. So is ser using the source address recorded by record route, and how
can I work round this?
--
Tristan Colgate
Inux Technologies
E-Mail: tristan(a)inuxtech.co.uk
Mobile: 07900 690 912