Hi list maybe this is an stupid question but I can't find any clue what
I'm doing wrong.
When I try to add a new user using serctl add I'm getting the following
error:
error: 400; check if you use aliases in SER
What does "error: 400" mean? I have looked it at messages and I'm no
receiving any log information. I'm using two aliases at my ser.cfg
I'm attaching my ser.cfg
How should I handle this error?
Regards
Alberto Cruz
#
# $Id: ser.cfg,v 1.25.2.1 2005/02/18 14:30:44 andrei Exp $
#
#
#
# ----------- 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
fork=no
log_stderror=yes
*/
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
listen=65.208.39.215
port=5060
alias=65.208.39.215
alias=sip.telereunion.com.mx
children=4
fifo_mode=0666
fifo="/tmp/ser_fifo"
fifo_db_url="mysql://ser:heslo@localhost/ser"
# ------------------ 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/uri.so"
loadmodule "/usr/local/lib/ser/modules/uri_db.so"
loadmodule "/usr/local/lib/ser/modules/group.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/domain.so"
loadmodule "/usr/local/lib/ser/modules/mediaproxy.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)
modparam("domain", "db_mode", 1)
modparam("auth_db|usrloc|domain|group", "db_url", "mysql://ser:heslo@localhost/ser")
modparam("group", "use_domain", 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)
modparam("mediaproxy", "natping_interval", 60)
modparam("registrar", "nat_flag", 2)
# ------------------------- 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")) {
if (method!="ACK") {
sl_send_reply("483","Too Many Hops");
};
break;
};
if (msg:len >= 2048 ) {
if (method!="ACK") {
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
if (!method=="REGISTER") record_route();
if (method=="REGISTER") {
if (uri==myself || is_from_local()) {
# Mark as NAT'ed
if (client_nat_test("3")) {
setflag(2);
force_rport();
fix_contact();
};
if (!www_authorize("", "subscriber")) {
www_challenge("", "0");
break;
} else if (!check_to()) {
sl_send_reply("403", "Username!=To not allowed");
break;
};
if (!save("location")) {
sl_reply_error();
};
} else {
append_hf("P-hint: outbound alias\r\n");
sl_send_reply("403", "This domain is not served here");
};
break;
};
if (method=="INVITE") {
if (!(is_from_local() || uri==myself || is_uri_host_local())) {
sl_send_reply("403", "Relaying is forbidden");
break;
};
t_on_failure("1");
} else if (method == "BYE" || method == "CANCEL") {
end_media_session();
};
# subsequent messages withing a dialog should take the
# path determined by record-routing
if (loose_route()) {
append_hf("P-hint: rr-enforced\r\n");
# The following lines are added due media proxy
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
# end media session for BYE and CANCEL is done above
# before entering the loose route. no need to call it here
t_relay();
break;
};
if (client_nat_test("3") && !search("^Record-Route:")) {
# Mark as NAT'ed
force_rport();
fix_contact();
};
### Begin PSTN evaluation
if (method=="INVITE") {
if (uri=~"sip:01[1-9][0-9]+@.*") {
if (!is_user_in("From", "ld")) {
sl_send_reply("403", "LD permissions needed");
break;
};
rewritehostport("65.208.39.219:5060");
} else if (uri=~"sip:00[1-9][0-9]+@.*") {
if (!is_user_in("From", "int")) {
sl_send_reply("403", "International permissions needed");
break;
};
rewritehost("65.208.39.219");
};
t_on_reply("1");
};
### End PSTN evaluation
if (is_uri_host_local() || uri==myself) { # join with next if?
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "User not found");
break;
};
};
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
};
# forward 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();
};
}
failure_route[1] {
end_media_session();
}
onreply_route[1] {
if (status=~"(180)|(183)|(2[0-9][0-9])") {
if (client_nat_test("1")) {
fix_contact();
};
use_media_proxy();
};
}
Hi All.
I don't know if this problem is related to the re-INVITE problem I
posted yesterday
http://lists.iptel.org/pipermail/serusers/2005-March/016961.html
But it seems that when our Sonus PSTN gateway is invovled in a call
where the SIP UA sends a CANCEL before the other party answers, that
ser restransmits 487 messages to the SIP UA.
When dialing SIP->SIP everything works fine, it's just when the Sonus
GW is being accessed that the problem surfaces.
It appears that everything has been ACKed, so I'm stumped as to what
is happening here.
The attached call log shows the complete dialog where my Grandstream
UA dialed a PSTN number and cancelled the call when the other side was
ringing.
Can anyone give me a pointer as to why this might be?
Regards,
Paul
On Mon, 21 Mar 2005 11:17:04 -0300, Ezequiel Colombo
<ecolombo(a)arcotel.net> wrote:
> Hi, are you using end_media_session() on receive of non-sucessfull reply ?
Yes, I am doing ... but there wasnt any non-successfull reply in the
scenario mentioned. Also, mediaproxy does terminate the session based
on Call-ID (correct me if I am wrong) and it terminates the session
completely, ignoring branches.
Hi everybody I having a weird behavior with the registrar module
i have my ser.cfg ok, and i want to add the location and registration server.
Please give me some comments for this problem.
Excuse my english
thanks
Hi All.
I'm using ser-0.9.1.
Does anyone know if angle brackets are required around the TO: and
FROM: headers?
Our Sonus gateway sometimes omits these brackets and I just want to
make sure that SER correctly identifies SIP transactions.
Here is a PSTN->SIP INVITE that shows the brackets being omitted.
U 2005/03/21 10:19:08.966284 216.229.127.60:5060 -> 10.3.0.221:5060
INVITE sip:3212514231@10.3.0.221:5060 SIP/2.0.
Via: SIP/2.0/UDP 216.229.127.60:5060;branch=z9hG4bK619440ef48f-34104637.
Via: SIP/2.0/UDP 66.243.109.99:5060;branch=4ad748fe5b9d60cbf6a53c0614a3da05.
To: 3212514231 <sip:3212514231@66.243.109.99:5060>.
From: sip:4073192279@66.236.245.98;tag=67DD67C-D31.
Call-ID: 6997024-3320407223-278012(a)66.243.109.99.
CSeq: 1 INVITE.
Max-Forwards: 4.
Contact: sip:4073192279@66.243.109.99:5060.
Record-Route: <sip:216.229.127.60:5060;lr>.
Content-Type: application/sdp.
Content-Length: 313.
.
v=0.
o=NexTone-MSW 1234 3665 IN IP4 66.236.245.98.
s=sip call.
c=IN IP4 66.236.245.98.
t=0 0.
m=audio 17694 RTP/AVP 18 0 4 8 101.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:0 PCMU/8000.
a=rtpmap:4 G723/8000.
a=fmtp:4 annexa=yes.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
Regards,
Paul
Hi Simon,
Is there a plan to include how to make Windows Messenger work with ser?
How to make WM use peer-to-peer presence with ser?
Kind Regards,
DH.
________________________________
From: serusers-bounces(a)iptel.org [mailto:serusers-bounces@lists.iptel.org] On
Behalf Of Simon Miles
Sent: Monday, March 21, 2005 3:55 PM
To: serusers(a)lists.iptel.org
Subject: [Serusers] Getting Started - Issue 02 covers MySQL Support
Dear All,
Paul, Greger and myself would like you to know that the next issue of
'Getting Started' is now available on the www.ONsip.org web site.
This new version builds upon the first issue by adding MySQL support.
We are already finalising the next issue covering NAT support - a
subject that always fills up this mailing list with questions.
We are doing this for the community and would welcome any feedback on
the document to make it more readable etc. Comments are welcome on the
www.ONsip.org <http://www.onsip.org/> web site, goto Forums and select
the Getting Started Feedback area.
To download the document, go to the download section.
We hope this is of benefit to the Community.
Thanks
Paul, Simon, Greger
This mail has been scanned for known virus like activity on behalf of GALANA DISTRIBUTION PETROLIERE S.A. This E-mail is privileged, confidential and intended solely for the addressee(s).Any unauthorised dissemination or copying of this E-mail, and any use or disclosure of any information contained in it, is strictly prohibited and may be illegal. If you have received this E-mail in error please notify the sender immediately and delete it from your system. GALANA DISTRIBUTION PETROLIERE S.A. does not accept any liability for any errors, omissions, interceptions, corrupted mail, lost communications or late delivery which may arise as a result of this E-mail or for any virus that may be contained in it. Any views or opinions expressed in this E-mail are solely those of the author and do not necessarily reflect those of GALANA DISTRIBUTION PETROLIERE S.A.
Ce courriel a fait l'objet, par GALANA DISTRIBUTION PETROLIERE S.A. de verifications le protegeant des virus connus. Ce courriel est personnel, confidentiel et adresse exclusivement a son ou ses destinataire(s). Toute diffusion ou copie non autorisee ainsi que l'usage partiel ou total de son contenu est strictement interdit et peut-etre illegal. Si vous avez recu ce courriel par erreur, merci d'en informer son emetteur et de l'effacer de votre ordinateur. GALANA DISTRIBUTION PETROLIERE S.A. refuse toutes responsabilites liees aux erreurs, omissions, interceptions, deformations, communications perdues, ou retards de transmissions dont ce courriel pourrait etre l'objet ou a l'origine ainsi que des virus qu'il pourrait contenir. Les avis ou opinions exprimes dans ce courriel refletent exclusivement ceux de son auteur et non ceux de GALANA DISTRIBUTION PETROLIERE S.A.
HI,
I have installed SER 0.8.14 + MEDIAPROXY : when I make a call with 2 UA on
different NAT, it's good.
But, when the UAs are behind the same NAT, there are no sound. The RTP
packets go to the MEDIAPROXY but NO SOUND.
Does someone know how to solve this problem???
Best Regards
NICOLAS RUIZ
Thats my conf :
if (method=="REGISTER") {
# Mark as NAT'ed
if (client_nat_test("3")) {
setflag(2);
force_rport();
fix_contact();
};
if (!www_authorize("sip.vivaction.net", "subscriber")) {
www_challenge("sip.vivaction.net", "0");
break;
} else if (!check_to()) {
sl_send_reply("403", "Username!=To not allowed");
break;
};
if (!save("location")) {
sl_reply_error();
};
break;
};
if (method == "BYE" || method == "CANCEL") {
end_media_session();
};
if (loose_route()) {
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
# end media session for BYE and CANCEL is done above
# before entering the loose route. no need to call it here
t_relay();
break;
};
# Force subsequent messages to pass trough this proxy
if (method == "INVITE") {
record_route();
};
if (client_nat_test("3") && !search("^Record-Route:")) {
# Mark as NAT'ed
force_rport();
fix_contact();
};
if (method=="INVITE") {
t_on_reply("1");
};
if (is_uri_host_local()) {
if (!lookup("location")) {
sl_send_reply("404", "User not found");
break;
};
};
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}
failure_route[1] {
end_media_session();
}
onreply_route[1] {
if (status=~"(183)|(2[0-9][0-9])") {
if (client_nat_test("1")) {
fix_contact();
};
use_media_proxy();
};
}
Vos Solutions Voix-Data !
Nicolas Ruiz
Service Technique
Ligne directe : + 33 (0) 1 56 38 39 71
Fax :+ 33 (0) 1 47 24 74 77
nruiz(a)vivaction.com
Immeuble Plein Ouest
177 av. Georges Clemenceau
92024 Nanterre - France
Tel : 0 811 02 6000
www.vivaction.com
____________________________________________________________________________
____________________________________________
This e-mail and the information it contains are confidential and legally
protected by law. Only access by the intended recipient is authorized.
Review, distribution,reproduction, publication or other use of this e-mail
is prohibited.
Cet e-mail et les informations qu'il contient sont confidentiels et protégés
par la loi. L'accès à ce message n'est autorisé qu'au destinataire de
celui-ci. Toute modification,distribution, reproduction, publication, ou
autre utilisation de cet e-mail est formellement interdite.
Hi everybody I having a weird behavior with
Mediaproxy I'm using SER 0.9.1 and Mediaproxy Release 1.2.1
The Gateway is a Cisco AS5300 using release 12.2(15)T
I have a UA using behind a NAT, the PSTN gateway and the SER server both
are using public IP addresses.
The behaviors are the following:
1. When I tried to place a call from a NATed UA to the PSTN gateway I'm
not receiving the call progress tone or ring back tone at the NATed UA.
2. If I decide to wait until the call is completed (doesn't matter if a
heard death air as progress tone) I start hearing the calling
party as soon the call is completed and we can talk each other without
any troubles.
3. If I cancel the call and hang up the phone at the NATed UA before the
call is completed (during the call progress stage) the SER/Mediaproxy
don't cancel the call it still in progress until it is completed or
cancelled by the PSTN.
I'm attaching my ser configuration and the logging I'm getting when I
cancel the call before it's completed.
Please Help me to know how to fix this If I'm making some mistake with
mediaproxy configuration.
Thanks in advanced.
Regards
Alberto Cruz
Mar 20 00:10:02 matrix proxydispatcher[1379]: command request call-80BF3413-4297-D911-0217-21(a)172.31.254.240 172.31.254.240:10286:audio 200.67.33.247 172.31.254.240 remote 65.208.39.219 remote Quintum/1.0.0 info=from:8412@172.31.254.240,to:018183324166@65.208.39.215,fromtag:ac1ffef0-20,totag:
Mar 20 00:10:02 matrix proxydispatcher[1379]: will use default mediaproxy for this call.
Mar 20 00:10:02 matrix mediaproxy[1376]: command request call-80BF3413-4297-D911-0217-21(a)172.31.254.240 172.31.254.240:10286:audio 200.67.33.247 172.31.254.240 remote 65.208.39.219 remote Quintum/1.0.0 info=from:8412@172.31.254.240,to:018183324166@65.208.39.215,fromtag:ac1ffef0-20,totag:,dispatcher
Mar 20 00:10:02 matrix mediaproxy[1376]: session call-80BF3413-4297-D911-0217-21(a)172.31.254.240: started. listening on 65.208.39.215:35150
Mar 20 00:10:02 matrix mediaproxy[1376]: command execution time: 9.23 ms
Mar 20 00:10:02 matrix proxydispatcher[1379]: forwarding to mediaproxy on /var/run/mediaproxy.sock: got: '65.208.39.215 35150'
Mar 20 00:10:02 matrix proxydispatcher[1379]: command execution time: 13.13 ms
Mar 20 00:10:06 matrix proxydispatcher[1379]: command lookup call-80BF3413-4297-D911-0217-21(a)172.31.254.240 65.208.39.219:18342:audio 65.208.39.219 172.31.254.240 remote 65.208.39.215 unknown Cisco-SIPGateway/IOS-12.x info=from:8412@172.31.254.240,to:018183324166@65.208.39.215,fromtag:ac1ffef0-20,totag:711504-73
Mar 20 00:10:06 matrix mediaproxy[1376]: command lookup call-80BF3413-4297-D911-0217-21(a)172.31.254.240 65.208.39.219:18342:audio 65.208.39.219 172.31.254.240 remote 65.208.39.215 unknown Cisco-SIPGateway/IOS-12.x info=from:8412@172.31.254.240,to:018183324166@65.208.39.215,fromtag:ac1ffef0-20,totag:711504-73,dispatcher
Mar 20 00:10:06 matrix mediaproxy[1376]: command execution time: 1.63 ms
Mar 20 00:10:06 matrix proxydispatcher[1379]: forwarding to mediaproxy on /var/run/mediaproxy.sock: got: '65.208.39.215 35150'
Mar 20 00:10:06 matrix proxydispatcher[1379]: command execution time: 4.88 ms
Mar 20 00:10:06 matrix mediaproxy[1376]: session call-80BF3413-4297-D911-0217-21(a)172.31.254.240: caller signed in from 200.67.33.247:49125 (RTP) (will return to 200.67.33.247:49125)
Mar 20 00:10:06 matrix mediaproxy[1376]: session call-80BF3413-4297-D911-0217-21(a)172.31.254.240: called signed in from 65.208.39.219:18342 (RTP) (will return to 65.208.39.219:18342)
Mar 20 00:10:08 matrix mediaproxy[1376]: session call-80BF3413-4297-D911-0217-21(a)172.31.254.240: caller signed in from 200.67.33.247:49126 (RTCP) (will return to 200.67.33.247:49126)
Mar 20 00:10:11 matrix mediaproxy[1376]: session call-80BF3413-4297-D911-0217-21(a)172.31.254.240: called signed in from 65.208.39.219:18343 (RTCP) (will return to 65.208.39.219:18343)
Mar 20 00:10:13 matrix proxydispatcher[1379]: command delete call-80BF3413-4297-D911-0217-21(a)172.31.254.240 info=
Mar 20 00:10:13 matrix mediaproxy[1376]: command delete call-80BF3413-4297-D911-0217-21(a)172.31.254.240 info=dispatcher
Mar 20 00:10:13 matrix mediaproxy[1376]: session call-80BF3413-4297-D911-0217-21(a)172.31.254.240: 29/44/73 packets, 1380/5320/6700 bytes (caller/called/relayed)
Mar 20 00:10:13 matrix mediaproxy[1376]: session call-80BF3413-4297-D911-0217-21(a)172.31.254.240: ended.
Mar 20 00:10:13 matrix mediaproxy[1376]: command execution time: 1.43 ms
Mar 20 00:10:13 matrix proxydispatcher[1379]: forwarding to mediaproxy on /var/run/mediaproxy.sock: got: ''
Mar 20 00:10:13 matrix proxydispatcher[1379]: command execution time: 4.29 ms
Mar 20 00:10:45 matrix proxydispatcher[1379]: command lookup call-80BF3413-4297-D911-0217-21(a)172.31.254.240 65.208.39.219:18342:audio 65.208.39.219 172.31.254.240 remote 65.208.39.215 unknown Cisco-SIPGateway/IOS-12.x info=from:8412@172.31.254.240,to:018183324166@65.208.39.215,fromtag:ac1ffef0-20,totag:711504-73
Mar 20 00:10:45 matrix proxydispatcher[1379]: warning: trying to lookup session with non-existent id: 'call-80BF3413-4297-D911-0217-21(a)172.31.254.240'
Mar 20 00:10:45 matrix proxydispatcher[1379]: command execution time: 0.91 ms
Mar 20 00:10:45 matrix /usr/local/sbin/ser[11723]: error: use_media_proxy(): empty response from mediaproxy
Mar 20 00:10:45 matrix /usr/local/sbin/ser[11723]: ERROR: on_reply processing failed
Mar 20 00:10:46 matrix proxydispatcher[1379]: command lookup call-80BF3413-4297-D911-0217-21(a)172.31.254.240 65.208.39.219:18342:audio 65.208.39.219 172.31.254.240 remote 65.208.39.215 unknown Cisco-SIPGateway/IOS-12.x info=from:8412@172.31.254.240,to:018183324166@65.208.39.215,fromtag:ac1ffef0-20,totag:711504-73
Mar 20 00:10:46 matrix proxydispatcher[1379]: warning: trying to lookup session with non-existent id: 'call-80BF3413-4297-D911-0217-21(a)172.31.254.240'
Mar 20 00:10:46 matrix proxydispatcher[1379]: command execution time: 1.08 ms
Mar 20 00:10:46 matrix /usr/local/sbin/ser[11725]: error: use_media_proxy(): empty response from mediaproxy
Mar 20 00:10:46 matrix /usr/local/sbin/ser[11725]: ERROR: on_reply processing failed
Mar 20 00:10:47 matrix proxydispatcher[1379]: command lookup call-80BF3413-4297-D911-0217-21(a)172.31.254.240 65.208.39.219:18342:audio 65.208.39.219 172.31.254.240 remote 65.208.39.215 unknown Cisco-SIPGateway/IOS-12.x info=from:8412@172.31.254.240,to:018183324166@65.208.39.215,fromtag:ac1ffef0-20,totag:711504-73
Mar 20 00:10:47 matrix proxydispatcher[1379]: warning: trying to lookup session with non-existent id: 'call-80BF3413-4297-D911-0217-21(a)172.31.254.240'
Mar 20 00:10:47 matrix proxydispatcher[1379]: command execution time: 1.09 ms
Mar 20 00:10:47 matrix /usr/local/sbin/ser[11723]: error: use_media_proxy(): empty response from mediaproxy
Mar 20 00:10:47 matrix /usr/local/sbin/ser[11723]: ERROR: on_reply processing failed
#
# $Id: ser.cfg,v 1.25.2.1 2005/02/18 14:30:44 andrei Exp $
#
#
#
# ----------- 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
fork=no
log_stderror=yes
*/
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
listen=65.208.39.215
port=5060
alias=65.208.39.215
alias=sip.telereunion.com.mx
children=4
fifo_mode=0666
fifo="/tmp/ser_fifo"
fifo_db_url="mysql://ser:heslo@localhost/ser"
# ------------------ 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/uri.so"
loadmodule "/usr/local/lib/ser/modules/uri_db.so"
loadmodule "/usr/local/lib/ser/modules/group.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/domain.so"
loadmodule "/usr/local/lib/ser/modules/mediaproxy.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)
modparam("domain", "db_mode", 1)
modparam("auth_db|usrloc|domain|group", "db_url", "mysql://ser:heslo@localhost/ser")
modparam("group", "use_domain", 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)
modparam("mediaproxy", "natping_interval", 60)
modparam("registrar", "nat_flag", 2)
# ------------------------- 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")) {
if (method!="ACK") {
sl_send_reply("483","Too Many Hops");
};
break;
};
if (msg:len >= 2048 ) {
if (method!="ACK") {
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
if (!method=="REGISTER") record_route();
if (method=="REGISTER") {
if (uri==myself || is_from_local()) {
# Mark as NAT'ed
if (client_nat_test("3")) {
setflag(2);
force_rport();
fix_contact();
};
if (!www_authorize("", "subscriber")) {
www_challenge("", "0");
break;
} else if (!check_to()) {
sl_send_reply("403", "Username!=To not allowed");
break;
};
if (!save("location")) {
sl_reply_error();
};
} else {
append_hf("P-hint: outbound alias\r\n");
sl_send_reply("403", "This domain is not served here");
};
break;
};
if (method=="INVITE") {
if (!(is_from_local() || uri==myself || is_uri_host_local())) {
sl_send_reply("403", "Relaying is forbidden");
break;
};
t_on_failure("1");
} else if (method == "BYE" || method == "CANCEL") {
end_media_session();
};
# subsequent messages withing a dialog should take the
# path determined by record-routing
if (loose_route()) {
append_hf("P-hint: rr-enforced\r\n");
# The following lines are added due media proxy
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
# end media session for BYE and CANCEL is done above
# before entering the loose route. no need to call it here
t_relay();
break;
};
if (client_nat_test("3") && !search("^Record-Route:")) {
# Mark as NAT'ed
force_rport();
fix_contact();
};
### Begin PSTN evaluation
if (method=="INVITE") {
if (uri=~"sip:01[1-9][0-9]+@.*") {
if (!is_user_in("From", "ld")) {
sl_send_reply("403", "LD permissions needed");
break;
};
rewritehostport("65.208.39.219:5060");
} else if (uri=~"sip:00[1-9][0-9]+@.*") {
if (!is_user_in("From", "int")) {
sl_send_reply("403", "International permissions needed");
break;
};
rewritehost("65.208.39.219");
};
t_on_reply("1");
};
### End PSTN evaluation
if (is_uri_host_local() || uri==myself) { # join with next if?
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "User not found");
break;
};
};
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
};
# forward 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();
};
}
failure_route[1] {
end_media_session();
}
onreply_route[1] {
if (status=~"(180)|(183)|(2[0-9][0-9])") {
if (client_nat_test("1")) {
fix_contact();
};
use_media_proxy();
};
}
Hello List,
I got a problem with ser radius accounting. Seems ser sends two start
messages to my freeradius server (ser 0.10.99-dev5, radiusclient-ng 0.5.0
and freeradius snapshot 20050315 in the same computer) for every calls I
made, and also for missed
calls (two same failed message). Does it have to do with my
dictionary file(s)? For my ser.cfg, I only set the radius_flag to be 1
and radius_missed_flag to 2. I only called setflag(1) once with this
if condition before record_route():
if (method=="INVITE" || method=="BYE") {
setflag(1);
};
Did not have this problem when I used db_flag
There are another two users with this same or similar problem, but there is
no
answers to their thread. So wondering if they have solved it or anyone
else know why is it behaving like this? Please help me out, thank you.
My radacct log:
Sun Mar 20 20:40:31 2005
Acct-Status-Type = Start
Service-Type = Sip-Session
Sip-Response-Code = 200
Sip-Method = 1
User-Name = "xxxxxx(a)xxxxxx.xxxxxx.xxx"
Calling-Station-Id = "sip:xxxxxx@xxxxxx.xxxxxx.xxx:xxxx"
Called-Station-Id = "sip:yyyyyy@xxxxxx.xxxxxx.xxx"
Sip-Translated-Request-URI = "sip:yyyyyy@xxxxxx.xxxxxx.xxx:xxxxx"
Acct-Session-Id =
"58FCBA73-03FD-4AB4-A4CC-6C0A890414F3(a)xxx.xxx.xxx.xxx"
Sip-To-Tag = "3607001048"
Sip-From-Tag = "577868341"
Sip-Cseq = "18570"
NAS-IP-Address = 127.0.0.1
NAS-Port = 5060
Acct-Delay-Time = 0
Client-IP-Address = 127.0.0.1
Acct-Unique-Session-Id = "2e516ab9838c2cbd"
Stripped-User-Name = "xxxxxx"
Realm = "DEFAULT"
Timestamp = 1111369231
Sun Mar 20 20:40:31 2005
Acct-Status-Type = Start
Service-Type = Sip-Session
Sip-Response-Code = 200
Sip-Method = 4
User-Name = "xxxxxx(a)xxxxxx.xxxxxx.xxx"
Calling-Station-Id = "sip:xxxxxx@xxxxxx.xxxxxx.xxx:xxxx"
Called-Station-Id = "sip:yyyyyy@xxxxxx.xxxxxx.xxx"
Sip-Translated-Request-URI = "sip:yyyyyy@xxxxxx.xxxxxx.xxx:xxxxx"
Acct-Session-Id =
"58FCBA73-03FD-4AB4-A4CC-6C0A890414F3(a)xxx.xxx.xxx.xxx"
Sip-To-Tag = "3607001048"
Sip-From-Tag = "577868341"
Sip-Cseq = "18570"
NAS-IP-Address = 127.0.0.1
NAS-Port = 5060
Acct-Delay-Time = 0
Client-IP-Address = 127.0.0.1
Acct-Unique-Session-Id = "2e516ab9838c2cbd"
Stripped-User-Name = "xxxxxx"
Realm = "DEFAULT"
Timestamp = 1111369231
Sun Mar 20 20:41:05 2005
Acct-Status-Type = Stop
Service-Type = Sip-Session
Sip-Response-Code = 200
Sip-Method = 8
User-Name = "xxxxxx(a)xxxxxx.xxxxxx.xxx"
Calling-Station-Id = "sip:yyyyyy@xxxxxx.xxxxxx.xxx:xxxx"
Called-Station-Id = "sip:xxxxxx@xxxxxx.xxxxxx.xxx"
Sip-Translated-Request-URI = "sip:xxxxxx@xxxxxx.xxxxxx.xxx:xxxxx"
Acct-Session-Id =
"58FCBA73-03FD-4AB4-A4CC-6C0A890414F3(a)xxx.xxx.xxx.xxx"
Sip-To-Tag = "577868341"
Sip-From-Tag = "3607001048"
Sip-Cseq = "2254"
NAS-IP-Address = 127.0.0.1
NAS-Port = 5060
Acct-Delay-Time = 0
Client-IP-Address = 127.0.0.1
Acct-Unique-Session-Id = "7b53eafcefa8c57e"
Stripped-User-Name = "yyyyyy"
Realm = "DEFAULT"
Timestamp = 1111369265
The same for missed calls too:
Sun Mar 20 17:51:53 2005
Acct-Status-Type = Failed
Service-Type = Sip-Session
Sip-Response-Code = 408
Sip-Method = 1
User-Name = "xxxxxx(a)xxxxxx.xxxxxx.xxx"
Calling-Station-Id = "sip:xxxxxx@xxxxxx.xxxxxx.xxx:xxxx"
Called-Station-Id = "sip:yyyyyy@xxxxxx.xxxxxx.xxx"
Sip-Translated-Request-URI = "sip:yyyyyy@xxxxxx.xxxxxx.xxx:xxxxx"
Acct-Session-Id =
"60A406F8-6CA2-4251-8CD6-796A69F82A3A(a)xxx.xxx.xxx.xxx"
Sip-To-Tag = "n/a"
Sip-From-Tag = "3544681223"
Sip-Cseq = "4658"
NAS-IP-Address = 127.0.0.1
NAS-Port = 5060
Acct-Delay-Time = 0
Client-IP-Address = 127.0.0.1
Acct-Unique-Session-Id = "5059d3ad9e266ea1"
Stripped-User-Name = "xxxxxx"
Realm = "DEFAULT"
Timestamp = 1111359113
Sun Mar 20 17:51:53 2005
Acct-Status-Type = Failed
Service-Type = Sip-Session
Sip-Response-Code = 408
Sip-Method = 1
User-Name = "xxxxxx(a)xxxxxx.xxxxxx.xxx"
Calling-Station-Id = "sip:xxxxxx@xxxxxx.xxxxxx.xxx:xxxx"
Called-Station-Id = "sip:yyyyyy@xxxxxx.xxxxxx.xxx"
Sip-Translated-Request-URI = "sip:yyyyyy@xxxxxx.xxxxxx.xxx:xxxxx"
Acct-Session-Id =
"60A406F8-6CA2-4251-8CD6-796A69F82A3A(a)xxx.xxx.xxx.xxx"
Sip-To-Tag = "n/a"
Sip-From-Tag = "3544681223"
Sip-Cseq = "4658"
NAS-IP-Address = 127.0.0.1
NAS-Port = 5060
Acct-Delay-Time = 0
Client-IP-Address = 127.0.0.1
Acct-Unique-Session-Id = "5059d3ad9e266ea1"
Stripped-User-Name = "xxxxxx"
Realm = "DEFAULT"
Timestamp = 1111359113
_________________________________________________________________
Scan and help eliminate destructive viruses from your inbound and outbound
e-mail and attachments.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=ht…
Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.