Hello,
I have solved this problema, it was a bad configuration of the SIP device.
Regards,
Ri Liang
----- Original Message -----
From: Ri Liang
To: Adrian Georgescu
Cc: tjapko(a)xeloq.com ; serusers(a)lists.iptel.org
Sent: Saturday, June 05, 2004 7:28 AM
Subject: Re: [Serusers] ser stable + mediaproxy
Hello,
I got the said error on a REGISTER.
And i'm using the standar nathelper.cfg (modified with mediaproxy commands).
Regards,
Ri Liang
----- Original Message -----
From: Adrian Georgescu
To: Ri Liang
Cc: tjapko(a)xeloq.com ; serusers(a)lists.iptel.org
Sent: Thursday, June 03, 2004 1:52 AM
Subject: Re: [Serusers] ser stable + mediaproxy
You should apply the functions from the module to INVITE and REGISTER only. Messages having no contact header will give the warning which is harmless but your config needs some tuning.
Adrian
On Jun 3, 2004, at 9:23 AM, Ri Liang wrote:
Thanks a lot,
I'm now using lates ser stable CVS+mediaproxy.
But in the register process i got this error (the user get successfully register), please advise if this is a normal messsage.
....
/ser[8813]: error: mediaproxy/getContactURI(): error parsing Contact body
....
Ri Liang
------------------------------------------------------------------------------------------------------
/ser[8813]: method: <REGISTER>
/ser[8813]: uri: <sip:192.168.2.3>
/ser[8813]: version: <SIP/2.0>
/ser[8813]: parse_headers: flags=1
/ser[8813]: Found param type 232, <branch> = <z9hG4bK3e28f0599ccb9b4a>; state=16
/ser[8813]: end of header reached, state=5
/ser[8813]: parse_headers: Via found, flags=1
/ser[8813]: parse_headers: this is the first via
/ser[8813]: After parse_msg...
/ser[8813]: preparing to run routing scripts...
/ser[8813]: DEBUG : is_maxfwd_present: searching for max_forwards header
/ser[8813]: parse_headers: flags=128
/ser[8813]: end of header reached, state=9
/ser[8813]: DEBUG: get_hdr_field: <To> [35]; uri=[sip:2222@192.168.2.3;user=phone]
/ser[8813]: DEBUG: to body [<sip:2222@192.168.2.3;user=phone>^M ]
/ser[8813]: get_hdr_field: cseq <CSeq>: <100> <REGISTER>
/ser[8813]: DEBUG: is_maxfwd_present: value = 70
/ser[8813]: parse_headers: flags=64
/ser[8813]: error: mediaproxy/getContactURI(): error parsing Contact body
/ser[8813]: check_via_address(192.168.2.22, 192.168.2.22, 0)
/ser[8813]: parse_headers: flags=256
/ser[8813]: DEBUG: get_hdr_body : content_length=0
/ser[8813]: found end of header
/ser[8813]: find_first_route(): No Route headers found
/ser[8813]: loose_route(): There is no Route HF
/ser[8813]: check_self - checking if host==us: 11==9 && [192.168.2.3] == [127.0.0.1]
/ser[8813]: check_self - checking if port 5060 matches port 5060
/ser[8813]: check_self - checking if host==us: 11==11 && [192.168.2.3] == [192.168.2.3]
/ser[8813]: check_self - checking if port 5060 matches port 5060
/ser[8813]: check_self - checking if host==us: 11==9 && [192.168.2.3] == [127.0.0.1]
/ser[8813]: check_self - checking if port 5060 matches port 5060
/ser[8813]: check_self - checking if host==us: 11==11 && [192.168.2.3] == [192.168.2.3]
/ser[8813]: check_self - checking if port 5060 matches port 5060
/ser[8813]: parse_headers: flags=4096
/ser[8813]: pre_auth(): Credentials with given realm not found
/ser[8813]: build_auth_hf(): 'WWW-Authenticate: Digest realm="sip.callmyway.net", nonce="40bec3e4d09adf671de759a294bcdca543de6efc"^M '
/ser[8813]: parse_headers: flags=-1
/ser[8813]: check_via_address(192.168.2.22, 192.168.2.22, 0)
/ser[8813]: receive_msg: cleaning up
/ser[8811]: SIP Request:
------------------------------------------------------------------------------------------------------
----- Original Message -----
From: Tjapko ITS Consult@ncy
To: Adrian Georgescu ; rliang(a)callmyway.com
Cc: serusers(a)lists.iptel.org
Sent: Tuesday, June 01, 2004 5:24 AM
Subject: RE: [Serusers] ser stable + mediaproxy
Hello, I had same problem. Use stable 0.8.12 SER from latest CVS and mediaproxy from latest CVS head. Recompile this and it should work. Do not use rpm or tarball to create your SER. Hope this helps. I have discovered more things that are causing problems implementing SER with Mediaproxy. Tjapko.
-----Original Message-----
From: serusers-bounces(a)lists.iptel.org [mailto:serusers-bounces@lists.iptel.org]On Behalf Of Adrian Georgescu
Sent: Martes, 01 de Junio de 2004 03:38 a.m.
To: rliang(a)callmyway.com
Cc: serusers(a)lists.iptel.org
Subject: [Serusers] ser stable + mediaproxy
Hi Ri,
We use successfully mediaproxy with both stable and unstable branches of ser on Debian systems. There is no known reason it should crash, maybe IPTEL guys would have more clues as I saw this problem being reported several time.
Adrian
--
Hello,
I'm using lates ser CVS stable with mediaproxy (from unstable ser directory
and also using the mysql create with unstable ser_mysql.sh).
SER crash in the same moment when a sip cliente get register with the
correct user and password, i have attach the syslog.
Am I using the right combination of SER+mediaproxy ? or do i need to use
only the unstable ser (with it's mediaproxy include).
hello friends,
i am getting the problem in radius accounting
in the log i found that i.e in /var/log/messages
Jun 5 19:07:11 server ser: rc_get_seqnbr: fscanf
failure: /var/run/radius.seq
i compiled ser with radius authentication and
accounting
as said in how to radius of iptel.org
authenticaion is ok but accounting in sql/radius
it s failed
so i request you people to help me to do the
accounting
in any one sql / radius.
with regards
rama kanth
my ser.cfg file is
# ----------- global configuration parameters
debug=8
fork=yes
log_stderror=yes
check_via=no
dns=no
rev_dns=no
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/textops.so"
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_radius.so"
loadmodule "/usr/local/lib/ser/modules/acc.so"
# !! Nathelper
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
# ----------------- setting module-specific parameters
# -- usrloc params --
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)
modparam("auth_radius", "radius_config",
"/root/radiusclient.conf")
modparam("auth_radius","service_type",15)
modparam("acc", "log_level", 1)
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# !! Nathelper
modparam("registrar", "nat_flag", 6)
modparam("nathelper", "natping_interval", 30) # Ping
interval 30 s
modparam("nathelper", "ping_nated_only", 1) # Ping
only clients behind NAT
# ------------------------- 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;
};
# !! Nathelper
# Special handling for NATed clients; first,
NAT test is
# executed: it looks for via!=received and
RFC1918 addresses
# in Contact (may fail if line-folding is
used); also,
# the received test should, if completed,
should check all
# vias for rpesence of received
if (nat_uac_test("3")) {
# Allow RR-ed requests, as these may
indicate that
# a NAT-enabled proxy takes care of
it; unless it is
# a REGISTER
if (method == "REGISTER" || !
search("^Record-Route:")) {
log("LOG: Someone trying to
register from private IP, rewriting\n");
# This will work only for user
agents that support symmetric
# communication. We tested quite
many of them and majority is
# smart enough to be symmetric. In
some phones it takes a configuration
# option. With Cisco 7960, it is
called NAT_Enable=Yes, with kphone it is
# called "symmetric media" and
"symmetric signalling".
fix_nated_contact(); # Rewrite
contact with source IP of signalling
if (method == "INVITE") {
fix_nated_sdp("1"); # Add
direction=active to SDP
};
force_rport(); # Add rport
parameter to topmost Via
setflag(6); # Mark as NATed
};
};
# 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
if (!method=="REGISTER") record_route();
# subsequent messages withing a dialog should
take the
# path determined by record-routing
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
break;
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
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") {
# Uncomment this if you want to use digest
authentication
if (!radius_www_authorize(""))
{
www_challenge("","0");
break;
};
save("location");
break;
};
if (method=="INVITE") {
log(1, "INVITE\n");
setflag(1); /* set for accounting
(the same value as in log_flag!) */
};
if (method=="MESSAGE") {
log(1, "MESSAGE\n");
setflag(1); /* set for accounting
(the same value as in log_flag!) */
};
if (method=="BYE" || method=="CANCEL") {
log (1, "BYE or CANCEL\n");
setflag(1);
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound
alias\r\n");
route(1);
break;
};
# native SIP destinations are handled
using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not
Found");
break;
};
};
append_hf("P-hint: usrloc applied\r\n");
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; apply to all
transactions (for example,
# re-INVITEs from public to private UA are
hard to identify as
# NATed at the moment of request processing);
look at 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 if (nat_uac_test("1")) {
fix_nated_contact();
};
}
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
I am trying to get record_route() working in a simple configuration file
which I use for lab testing of our UA product.
After the INVITE is sent by the UA (our gateway) the call just isn't
routed.
Attached is the debug trace from ser (debug level 6.) this shows just
the first INVITE which is retried 4 times. The config file is shown
below that.
5(2018) SIP Request:
5(2018) method: <INVITE>
5(2018) uri: <sip:17325555555@192.168.20.12>
5(2018) version: <SIP/2.0>
5(2018) parse_headers: flags=1
5(2018) get_hdr_field: cseq <CSeq>: <1> <INVITE>
5(2018) end of header reached, state=9
5(2018) DEBUG: get_hdr_field: <To> [33];
uri=[sip:17325555555@192.168.20.12]
5(2018) DEBUG: to body [<sip:17325555555@192.168.20.12> ]
5(2018) Found param type 232, <branch> =
<z9hG4bK-tenor-c0a8-14dc-0024>; state=16
5(2018) end of header reached, state=5
5(2018) parse_headers: Via found, flags=1
5(2018) parse_headers: this is the first via
5(2018) After parse_msg...
5(2018) preparing to run routing scripts...
5(2018) DEBUG : is_maxfwd_present: searching for max_forwards header
5(2018) parse_headers: flags=128
5(2018) DEBUG: get_hdr_body : content_length=164
5(2018) DEBUG: is_maxfwd_present: value = 70
5(2018) parse_headers: flags=256
5(2018) found end of header
5(2018) find_first_route(): No Route headers found
5(2018) loose_route(): There is no Route HF
5(2018) rwrite(): Rewriting Request-URI with 'sip:192.168.20.137'
5(2018) receive_msg: cleaning up
6(2021) SIP Request:
6(2021) method: <INVITE>
6(2021) uri: <sip:17325555555@192.168.20.12>
6(2021) version: <SIP/2.0>
6(2021) parse_headers: flags=1
6(2021) get_hdr_field: cseq <CSeq>: <1> <INVITE>
6(2021) end of header reached, state=9
6(2021) DEBUG: get_hdr_field: <To> [33];
uri=[sip:17325555555@192.168.20.12]
6(2021) DEBUG: to body [<sip:17325555555@192.168.20.12> ]
6(2021) Found param type 232, <branch> =
<z9hG4bK-tenor-c0a8-14dc-0024>; state=16
6(2021) end of header reached, state=5
6(2021) parse_headers: Via found, flags=1
6(2021) parse_headers: this is the first via
6(2021) After parse_msg...
6(2021) preparing to run routing scripts...
6(2021) DEBUG : is_maxfwd_present: searching for max_forwards header
6(2021) parse_headers: flags=128
6(2021) DEBUG: get_hdr_body : content_length=164
6(2021) DEBUG: is_maxfwd_present: value = 70
6(2021) parse_headers: flags=256
6(2021) found end of header
6(2021) find_first_route(): No Route headers found
6(2021) loose_route(): There is no Route HF
6(2021) rwrite(): Rewriting Request-URI with 'sip:192.168.20.137'
6(2021) receive_msg:
###########################################
#
# $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $
#
# simple quick-start config script
#
# ----------- 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=6
fork=yes
log_stderror=yes
check_via=yes # (cmd. line: -v)
dns=yes # (cmd. line: -r)
rev_dns=yes # (cmd. line: -R)
port=5060
"/usr/local/etc/ser/ser.cfg" [readonly] 140L,
3791C 1,1 Top
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"
# 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)
# ------------------------- request routing logic -------------------
alias=quintum.lab
alias=ken137.quintum.lab
# 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;
};
# store user location if a REGISTER appears
if (method=="REGISTER") {
save("location");
};
############################
/* grant Route routing if route headers present */
# if (loose_route()) { t_relay(); break; };
/* record-route INVITEs -- all subsequent requests must visit us */
# if (method=="INVITE") {
# record_route();
# };
# now check if it really is a PSTN destination which should be
handled
# by our gateway; if not, and the request is an invitation, drop
it --
# we cannot terminate it in PSTN; relay non-INVITE requests --
it may
# be for example BYEs sent by gateway to call originator
if (uri=="sip:17325555555@192.168.20.12") {
sl_send_reply("678","matched uri for 20.137");
if (method=="INVITE")
# forward(192.168.20.137, 5060);
record_route();
# t_relay();
break;
};
if (uri=~"sip:1732922[0-9]*@192.168.20.12") {
sl_send_reply("678","matched uri for 20.220");
if (method=="INVITE")
# forward(192.168.20.220, 5060);
record_route();
# t_relay();
break;
};
if (uri=~"sip:173221000[0-9]*@192.168.20.12") {
sl_send_reply("678","matched uri for 20.210");
if (method=="INVITE")
forward(192.168.20.210, 5060);
#record_route();
break;
};
if (uri=~"sip:173220000[0-9]*@192.168.20.12") {
sl_send_reply("678","matched uri for 20.209");
if (method=="INVITE")
forward(192.168.20.209, 5060);
#record_route();
break;
};
#################################
}
###########################################
--
Bert Berlin
Bert Berlin
System Test
Quintum Technologies, Inc.
71 James Way
Eatontown, NJ 07724
PH 732-460-9000 ext 247
Email: bert_berlin(a)quintum.com <mailto:beert_berlin@quintum.com>
I actually tried that once, but I tried it again just to be sure.
My linksys is LAN side is 192.168.51.X. So my Linksys is 192.168.51.1
and my ATA is 192.168.51.153. I put 192.168.51.1 in the NATIP field.
It worked....so to prove that's the solution, I removed it, and it still
works. So that's not the solution.
Out of curiosity, Can anyone say what this NATIP field actually
accomplishes? Asterisk doesn't require you to populate that field with
anything.
My understanding of the mechanics behind NAT is that, if the router
receives a request for a port that is already mapped to another user, it
will assign a new port. That's what was happening here. 5060 was
already mapped to another user (I believe a softphone on my PC), so it
used 15060.
So, it sends to SER 5060 from 15060. SER should respond to 15060 from
5060, Router will tranlate the 15060 to 5060 and deliver it to my ATA.
The problem was that SER was sending to 5060 instead of 15060.
I suspect that the original mapping in the router expired, so now it's
using 5060 instead of 15060, which is allowing it to work.
So, to test this theory, I fired up XTEN on my PC. Sure enough, it's
mapping another, but now, SER is responding with the proper port.
I'm wondering if that section of code in my ser.cfg file that is calling
the nathelper commands if the originator is an ATA is actually causing
damage rather than fixing things? (I got that code from someone else
who suposedly got this all working with ATA behind a NAT) I'm going to
have to wait until this mapping times out again to try it back around
the other way.
If anyone else has ideas, please let me know. Otherwise, I'll report my
findings when things time out.
Thanks!
Tom
-----Original Message-----
From: serusers-bounces(a)iptel.org [mailto:serusers-bounces@lists.iptel.org] On
Behalf Of Gregory D. Burns
Sent: Friday, June 04, 2004 5:38 PM
To: serusers(a)lists.iptel.org
Subject: RE: [Serusers] Problem with ATA186 and NAT (Linksys).
What are you SIP setting in the ATA? You need your Firewall's IP in the
NATIP field.
-Greg
-----Original Message-----
From: serusers-bounces(a)iptel.org [mailto:serusers-bounces@lists.iptel.org] On
Behalf Of Tom Lowe
Sent: Friday, June 04, 2004 2:11 PM
To: serusers(a)lists.iptel.org
Subject: [Serusers] Problem with ATA186 and NAT (Linksys).
SER version Sip EXpress router (0.8.12 (i386/linux))
Below is my ser.cfg file (IP addresses changed, of course). My
situation is pretty simple:
ATA186 --A-- Linksys router --B-- Cable modem --C-- SER
ATA sends out invite with 5060 as src and dest. (verified through
ethereal on lan segment A)
Linksys translates the 5060 to 15060 (verified at Lan segment C with
tethereal)
SER tries to respond with "Authorization required", but is sending the
respond to 5060 instead of 10560. Linksys receives the packet to 5060,
but isn't expecting it so it goes nowhere.
What the heck am I doing wrong?
FYI, This config produces the following entries in /var/log/messages:
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4208]: Checking for ATA
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4208]: Cisco user agent detected -
fix contact
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4208]: Cisco user agent detected -
fix sdp
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4208]: ERROR: extract_mediaip: no
`c=' in SDP
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4214]: Checking for ATA
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4214]: Cisco user agent detected -
fix contact
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4214]: Cisco user agent detected -
fix sdp
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4214]: ERROR: extract_mediaip: no
`c=' in SDP
Jun 4 16:38:04 VShost1 /usr/sbin/ser[4208]: Checking for ATA
Jun 4 16:38:04 VShost1 /usr/sbin/ser[4208]: Cisco user agent detected -
fix contact
Jun 4 16:38:04 VShost1 /usr/sbin/ser[4208]: Cisco user agent detected -
fix sdp
Jun 4 16:38:04 VShost1 /usr/sbin/ser[4208]: ERROR: extract_mediaip: no
`c=' in SDP
Jun 4 16:38:06 VShost1 /usr/sbin/ser[4214]: Checking for ATA
Jun 4 16:38:06 VShost1 /usr/sbin/ser[4214]: Cisco user agent detected -
fix contact
Jun 4 16:38:06 VShost1 /usr/sbin/ser[4214]: Cisco user agent detected -
fix sdp
Jun 4 16:38:06 VShost1 /usr/sbin/ser[4214]: ERROR: extract_mediaip: no
`c=' in SDP
Tom
#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=no
log_stderror=yes
*/
debug=3
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
#port=5060
children=4
sip_warning=no
# FIFO
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"
loadmodule "/usr/lib/ser/modules/acc.so"
# NAT Helper
loadmodule "/usr/lib/ser/modules/nathelper.so"
# Module that allows search
loadmodule "/usr/lib/ser/modules/textops.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/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) # Access to the DB -- leave default for
now
#modparam("auth_db","db_url","sql://ser:MySQLPW@DomainBLA-BLA/ser")
# -- 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")
#
# Accounting
#
modparam("acc","log_level",1)
modparam("acc","log_flag",1)
#modparam("acc","db_flag",1)
#modparam("acc","failed_transactions",1)
# -- rr params --
# add value to ;lr param to make some broken UAs happy modparam("rr",
"enable_full_lr", 1)
# NAT pinging
modparam("nathelper","natping_interval",60)
# ------------------------- 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
# 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)
log(1,"Checking for ATA\n");
# Do NAT fixing
if (search("ATA")) {
log(1,"Cisco user agent detected - fix contact\n");
fix_nated_contact();
if (method=="INVITE") {
log(1,"Cisco user agent detected - fix sdp\n");
fix_nated_sdp("3");
};
};
if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("111.111.111.13",
"subscriber")) {
www_challenge("111.111.111.13", "0");
break;
};
save("location");
break;
};
};
# PSTN vs SIP traffic
#Find canonical username
lookup("aliases");
#PSTN
#if ( (uri=~"^sip:911@.*") | (uri=~"^sip:9911@.*") |
(uri=~"^sip:[0-9][0-8].*@.*")) {
if ( (uri=~"^sip:911@.*") | (uri=~"^sip:9911@.*") ) {
route(3);
break;
};
#off-line or non-existent users
if (!lookup("location")) {
route(4);
};
# Relay to SIP destination
setflag(1);
if (!t_relay()) {
sl_reply_error();
break;
};
}
# ------------- process traffic leaving Internet for PSTN
route[3] {
# all calls through the gateway must be record routed to assure
# acl acceptance on the gateway -- this is already done in initial
routing
# record_route();
#Authenticate call
if (!proxy_authorize("111.111.111.13","subscriber")) {
proxy_challenge("111.111.111.13","0");
break;
};
rewritehostport("111.111.111.11:5060");
setflag(1);
if (!t_relay()) {
sl_reply_error();
break;
};
}
#-----------Process calls for users offline
route[4] {
if (!t_newtran()) {
sl_reply_error();
};
if (!t_reply("404","Not Found")) {
sl_reply_error();
};
break;
}
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
hello friend,
i got your mail id from mailing list it seems that you
have successfully implemented the accounting module
of the radius server.
i have problem with radius accounting
my steps are as follows
1 )i have removed the radius_acc radius_auth
auth_radius
group_radius uri_radius from exclude section of the
Makefile of the ser and in the acc module Makefile
2)i have removed the comments to the statements
DEFS+=-DRAD_ACC
LIBS=-L$(LOCALBASE)/lib -lradiusclient
3)and i made make all , make install
when i run ser in the debug mode its giveing message
like
0(7530) set_mod_param_regex: acc matches module acc
0(7530) set_mod_param_regex: parameter
<radius_config> not found in module <acc>
0(7530) parse error (76,57-58): Can't set module
parameter
0(7530) set_mod_param_regex: acc matches module acc
0(7530) set_mod_param_regex: found <log_level> in
module acc [/usr/local/lib/ser/modules/acc.so]
and its shutting down .
in my ser.cfg account related modules and statements
are as follows
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"
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_radius.so"
loadmodule "/usr/local/lib/ser/modules/acc.so"
# !! Nathelper
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
setting module-specific parameters
---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
modparam("auth_radius", "radius_config",
"/root/radiusclient.conf")
modparam("auth_radius","service_type",15)
modparam("acc","radius_config","/root/radiusclient.conf")
#modparam("acc","service_type",15)
#modparam("acc", "radius_flag", 1)
#modparam("acc","radius_missed_flag",3)
modparam("acc", "log_level", 1)
modparam("rr", "enable_full_lr", 1)
# !! Nathelper
modparam("registrar", "nat_flag", 6)
modparam("nathelper", "natping_interval", 30) # Ping
interval 30 s
modparam("nathelper", "ping_nated_only", 1) # Ping
only clients behind NAT
----in routing logic i have
if (method=="INVITE") {
log(1, "INVITE\n");
setflag(1); /* set for accounting
(the same value as in log_flag!) */
};
if (method=="MESSAGE") {
log(1, "MESSAGE\n");
setflag(1); /* set for accounting
(the same value as in log_flag!) */
};
if (method=="BYE" || method=="CANCEL") {
log (1, "BYE or CANCEL\n");
setflag(1);
};
i have seen in the mailing list as
"we will probably need to change some "#includes" in
<ser_directory>/sip_router/modules/acc/dict.h, to be
the same than
<ser_directory>/sip_router/etc/radiusclient.h."
so where do i need it to do
so where most be iam going wrong
please help me
with regards
rama kanth
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
Hi all,
In Pc------>SER---->PSTN (cisco) scenario, PSTN can not take call with
alphabet from address. Is there anyway to change the caller from address
in SER. This is also related to the block callerid scenario.
Thanks
Ray
SER version Sip EXpress router (0.8.12 (i386/linux))
Below is my ser.cfg file (IP addresses changed, of course). My
situation is pretty simple:
ATA186 --A-- Linksys router --B-- Cable modem --C-- SER
ATA sends out invite with 5060 as src and dest. (verified through
ethereal on lan segment A)
Linksys translates the 5060 to 15060 (verified at Lan segment C with
tethereal)
SER tries to respond with "Authorization required", but is sending the
respond to 5060 instead of 10560.
Linksys receives the packet to 5060, but isn't expecting it so it goes
nowhere.
What the heck am I doing wrong?
FYI, This config produces the following entries in /var/log/messages:
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4208]: Checking for ATA
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4208]: Cisco user agent detected -
fix contact
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4208]: Cisco user agent detected -
fix sdp
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4208]: ERROR: extract_mediaip: no
`c=' in SDP
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4214]: Checking for ATA
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4214]: Cisco user agent detected -
fix contact
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4214]: Cisco user agent detected -
fix sdp
Jun 4 16:38:03 VShost1 /usr/sbin/ser[4214]: ERROR: extract_mediaip: no
`c=' in SDP
Jun 4 16:38:04 VShost1 /usr/sbin/ser[4208]: Checking for ATA
Jun 4 16:38:04 VShost1 /usr/sbin/ser[4208]: Cisco user agent detected -
fix contact
Jun 4 16:38:04 VShost1 /usr/sbin/ser[4208]: Cisco user agent detected -
fix sdp
Jun 4 16:38:04 VShost1 /usr/sbin/ser[4208]: ERROR: extract_mediaip: no
`c=' in SDP
Jun 4 16:38:06 VShost1 /usr/sbin/ser[4214]: Checking for ATA
Jun 4 16:38:06 VShost1 /usr/sbin/ser[4214]: Cisco user agent detected -
fix contact
Jun 4 16:38:06 VShost1 /usr/sbin/ser[4214]: Cisco user agent detected -
fix sdp
Jun 4 16:38:06 VShost1 /usr/sbin/ser[4214]: ERROR: extract_mediaip: no
`c=' in SDP
Tom
#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=no
log_stderror=yes
*/
debug=3
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
#port=5060
children=4
sip_warning=no
# FIFO
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"
loadmodule "/usr/lib/ser/modules/acc.so"
# NAT Helper
loadmodule "/usr/lib/ser/modules/nathelper.so"
# Module that allows search
loadmodule "/usr/lib/ser/modules/textops.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/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)
# Access to the DB -- leave default for now
#modparam("auth_db","db_url","sql://ser:MySQLPW@DomainBLA-BLA/ser")
# -- 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")
#
# Accounting
#
modparam("acc","log_level",1)
modparam("acc","log_flag",1)
#modparam("acc","db_flag",1)
#modparam("acc","failed_transactions",1)
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# NAT pinging
modparam("nathelper","natping_interval",60)
# ------------------------- 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
# 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)
log(1,"Checking for ATA\n");
# Do NAT fixing
if (search("ATA")) {
log(1,"Cisco user agent detected - fix contact\n");
fix_nated_contact();
if (method=="INVITE") {
log(1,"Cisco user agent detected - fix sdp\n");
fix_nated_sdp("3");
};
};
if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("111.111.111.13",
"subscriber")) {
www_challenge("111.111.111.13", "0");
break;
};
save("location");
break;
};
};
# PSTN vs SIP traffic
#Find canonical username
lookup("aliases");
#PSTN
#if ( (uri=~"^sip:911@.*") | (uri=~"^sip:9911@.*") |
(uri=~"^sip:[0-9][0-8].*@.*")) {
if ( (uri=~"^sip:911@.*") | (uri=~"^sip:9911@.*") ) {
route(3);
break;
};
#off-line or non-existent users
if (!lookup("location")) {
route(4);
};
# Relay to SIP destination
setflag(1);
if (!t_relay()) {
sl_reply_error();
break;
};
}
# ------------- process traffic leaving Internet for PSTN
route[3] {
# all calls through the gateway must be record routed to assure
# acl acceptance on the gateway -- this is already done in initial
routing
# record_route();
#Authenticate call
if (!proxy_authorize("111.111.111.13","subscriber")) {
proxy_challenge("111.111.111.13","0");
break;
};
rewritehostport("111.111.111.11:5060");
setflag(1);
if (!t_relay()) {
sl_reply_error();
break;
};
}
#-----------Process calls for users offline
route[4] {
if (!t_newtran()) {
sl_reply_error();
};
if (!t_reply("404","Not Found")) {
sl_reply_error();
};
break;
}
-I don't know how to start the cron-job, where can i find help?
-for the other problem, i'm sure that users are online (REGESTERED), infact
from the phonebook page, in user page, those users are showed online, and
i can verify with serctl. Which can be the problem?
thanks to all
>Stefano Blasco wrote:
>
>> Hi all,
>> i have noticed 2 problems using SERWEB:
>>
> >- in the admin page when i check "server monitoring" all the values are
"0"
> >and this is strange!
>There is a php script which you have to start by a cron job -> there is
>a README (or query the mailing list archive)
>>
>> - in the admin page if i filter the list of users with "show on-line
users
>> only" there are no users on-line even if it is not so!
>>
>
>are you sure the other users are REGISTERed at the SIP proxy (not logged
>to serweb)
>
>klaus
__________________________________________________________________
Tiscali ADSL libera la velocita'!
Attiva Senza Canone entro il 14 giugno: navighi a 1,5 euro l'ora per i primi
3 mesi,se scegli il modem e' tuo in comodato gratuito e in piu' hai gratis
SuperMail per 12 mesi. Non aspettare, attivala subito!
http://abbonati.tiscali.it/adsl/prodotti/640Kbps/