hi all,
i've been banging on this for a while now, and still can't figure out
things properly. here's my scenario:
1. SER behind NAT
2. Clients behind NAT
3. Full control of firewall in front of SER so i can open up whatever
ports necessary
4. No control for client firewalls
I've tried various ser.cfg gleaned from the mailing list, but no luck
-- calls can connect but no audio passes through. Right now i'm using
the nathelper and mangle modules to no effect.
I'm at my wit's end, hoping someone can help out, i've included my
ser.cfg below.
thousands of thanks in advance.
flynn
-----------------------------------------
# ----------- global configuration parameters ------------------------
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=192.168.1.130
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
# !! NAT stuff
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
loadmodule "/usr/local/lib/ser/modules/mangler.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
modparam("rr", "enable_full_lr", 1)
# !! NAT STUFF
modparam("registrar", "nat_flag", 6)
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("mangler","contact_flds_separator","*")
# ------------------------- 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 (msg:len >= max_len ) {
sl_send_reply("513", "Message too big");
break;
};
if (uri=~"MY-DOMAIN.COM") {
if (nat_uac_test("3")) {
sdp_mangle_ip("0.0.0.0/0", "XXX.XXX.XXX.XXX");
if (method == "REGISTER" || !
search("^Record-Route:")) {
fix_nated_contact(); # Rewrite contact
with source IP of signalling
if (method == "INVITE") {
fix_nated_sdp("3");
};
force_rport(); # Add rport parameter to topmost Via
setflag(6); # Mark as NATed
};
};
if (method=="REGISTER") {
save("location");
break;
};
if (!method=="REGISTER") {
if (search("Contact: .*(a)(10\.|111\.)")) {
encode_contact("enc_prefix","XXX.XXX.XXX.XXX");
};
#if ser is behind a NAT and NAT box has port forwarding
#on port 5060 set to our ser private address ...
record_route_preset("XXX.XXX.XXX.XXX:5060");
};
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
route(1);
}
}
route[1]
{
# !! Nathelper
if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)"
&& search("^Route:")) {
sl_send_reply("479", "We don't forward to private IP
addresses");
break;
};
# if client or server know to be behind a NAT, enable relay
if (isflagset(6)) {
force_rtp_proxy();
};
# NAT processing of replies;
t_on_reply("1");
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
}
# !! Nathelper
onreply_route[1] {
# NATed transaction ?
if (isflagset(6) && status =~ "(183)|2[0-9][0-9]") {
fix_nated_contact();
force_rtp_proxy();
}
# otherwise, is it a transaction behind a NAT and we did not
# know at time of request processing ? (RFC1918 contacts)
else {
fix_nated_contact();
};
}
Hi,
I have extended acc module to support logging of headers' body with
syslog and database. Also radius and diameter support is included
though no test has been done yet. If anyone is interested in testing it
with the last two and not only, I would appreciate any feedback. If you
consider the patch useful, acc maintainers could review and commit it on
cvs.
For those who don't like patches, the tarball of the whole module
(unstable branch) can be found at
http://www.voice-system.ro/downloads/acc/ along with updated
documentation in html format.
Salutari,
Ramona
Hi ALL;
I have been trying to work with ser+mediaproxy but I have one way audio problem
I have the following network:
UA (private ip)--------------------unix nat router------------------(public-ip)ser+mediaproxy-------------------------------UA(public ip)
1) I donot use any db for domain.so , what is it?
2) I run it with /etc/init.d/mediaproxy suuceccfully. how do you run it???????????
3) It appears ser canot find mediaproxy while I can run it successfully.I got the following errors :
0(5982) DBT:dbt_load_file: request for table [domain]
0(5982) DBT:dbt_load_file: db is [/usr/local/etc/ser/]
0(5982) DBT:dbt_load_file: loading file [/usr/local/etc/ser/]
0(5982) DTB:dbt_db_get_table: domain
Content of [domain]
0(5982) DBT:db_query: table not loaded!
0(5982) DBT:db_query: error while quering table!
0(5982) is_local(): Error while querying database
0(5982) parse_headers: flags=33554432
0(5982) DBT:db_query: table not loaded!
0(5982) DBT:db_query: error while quering table!
0(5982) is_local(): Error while querying database
0(5982) error: mediaproxy/sendMediaproxyCommand(): can't connect to MediaProxy
**********************************************************************************************************************************
MY ser.cfg is also as follows:
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/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
#loadmodule "/usr/local/lib/ser/modules/nathelper.so"
loadmodule "/usr/local/lib/ser/modules/mediaproxy.so"
loadmodule "/usr/local/lib/ser/modules/domain.so"
loadmodule "/usr/local/lib/ser/modules/dbtext.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
#loadmodule "/usr/local/lib/ser/modules/auth.so"
#loadmodule "/usr/local/lib/ser/modules/auth_db.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", 2)
# -- 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)
#NAT & RT
#modparam("registrar", "nat_flag", 6)
modparam("mediaproxy", "natping_interval",30)
modparam("mediaproxy", "mediaproxy_socket", "var/run/mediaproxy.sock")
modparam("mediaproxy", "sip_asymmetrics", "/usr/local/etc/ser/mediaproxy/sip-asymmetric-clients")
modparam("mediaproxy", "rtp_asymmetrics", "usr/local/etc/ser/mediaproxy/rtp-asymmetric-clients")
# ------------------------- 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 ( msg:len > max_len ) {
sl_send_reply("513", "Message too big");
break;
};
# we record-route all messages -- to make sure that
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) {
log(1, "REQUEST FOR SERVED DOMAIN------------------");
if(method=="REGISTER"){
if (client_nat_test("3")){
setflag(6);
force_rport();
fix_contact();
};
save("location");
break;
}
if(!lookup("location")) {
sl_send_reply("404", "not found");
break();
}
};
if (method=="INVITE"){
record_route();
};
if (client_nat_test("3") && !search("^Record-Route:")) {
force_rport();
fix_contact();
};
if (method=="INVITE") {
t_on_reply("1");
};
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
#we forwad to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
if (method=="INVITE" || method=="ACK"){
end_media_session();
};
sl_reply_error();
};
}
onreply_route[1]{
if(status=~"[12][0-9][0-9]"){
if (client_nat_test("1")) {
fix_contact();
};
use_media_proxy();
};
}
Warmest Regards
mohammad
Hi everyone,
I'm getting the folowing error when using SERWEB.
Warning: mysql_pconnect(): Access denied for user
'ser'@'sipproxy.amatek.net' (using password: YES) in
/var/www/phplib/db_mysql.inc on line 73
Database error: pconnect(192.168.77.151, ser,
$Password) failed.
MySQL Error: ()
Session halted.
My SER is working fine and I can create users through
"serctl add" command without a problem.
Below is a the config.php parameters for public
access.
/* public: connection parameters */
var $Host = "192.168.77.151";
var $Database = "ser";
var $User = "ser";
var $Password = "heslo";
/* public: configuration parameters */
Thanks in Advances
Mohamed.
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca