i am trying to follow this
http://www.iptel.org/ser/doc/ser_radius/ser_radius.html
and using radiusclient-0.3.3.tar.gz on one mechine and
freeradius on another but i am unable to fix it
radclient is not installed there is radiusclient
so i cannot use this
root@/usr/local/src# radclient -f digest localhost
auth <shared_secret>
this thing is working properly on my other mechine
but this time radclient is not available
any link
thanks
kamran
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/
Hello,
Apologies if this has come up before, but I'm having some problems
with SER not forwarding an ACK back to a Cisco AS5300 media gateway. This
means that incoming calls break down because the 5300 hasn't received
an ACK from the SIP phone. Outgoing calls are fine, because SER is
forwarding the 5300's ACK back to the SIP phone correctly. Would anyone
know why this is only working in one direction?
With incoming calls, the sequence of events is:
1. I dial the PSTN number on my SIP phone.
2. The SIP phone sends the INVITE to SER.
3. SER rewrites the host and forwards it to the Media Gateway (MGW)
4. The MGW brings up an ISDN channel and connects the call
5. When the call is answered, the MGW sends back the 200/OK to SER
6. SER forwards the 200/OK on to the SIP phone and I can converse on the call
7. The SIP phone sends the ACK back to SER, but SER doesn't send it on to
the MGW.
8. The MGW waits 19 secs before disconnecting the call because it hasn't
received an ACK.
In the reverse direction everything works fine, because SER sends on the
ACK it receives from the AS5300.
My configuration is appended below. Running IOS 12.3(9) on the 5300, the
SIP phone is a Siemens Optipoint 400. SER version is 0.8.10 on Fedora
Core 3.
Thanks,
Colin
--- config ---
#
# $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=7
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"
# ------------------ 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 -------------------
# 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)
if (uri==myself) {
if (method=="REGISTER") {
save("location");
break;
};
if (uri=~"^sip:9[0-9]*@*") { # pstn escape = 9
# strip(9);
rewritehostport("159.134.250.247:5060");
log(1,"Forwarding to PSTN/n");
forward(159.134.250.247, 5060);
} else {
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
forward(uri:host,uri:port);
};
# 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();
};
};
}
Hi,
Ok ... so it is a bug ... now how to fix it?
> static inline int after_loose(struct sip_msg* _m, int preloaded)
> .....
> if (enable_double_rr && is_2rr(&puri.params)) {
> ....
> if (res > 0) { /* No next route found */
> DBG("after_loose: No next URI found\n");
> return (preloaded ? NOT_RR_DRIVEN : RR_DRIVEN);
> or simply
> return (preloaded RR_DRIVEN);
Cesc
Unclassified
>>> Jan Janak <jan(a)iptel.org> 05/23/05 07:25PM >>>
Hello, comments inline.
On 23-05-2005 18:57, Cesc Santasusana wrote:
> Hi,
>
> I found what i think is a bug in the return value of loose_route() ....
> bear with me because it is a rather long email.
>
> First, the scenario:
>
> phone1 ----- SER1 ----- SER2 ----- phone2
>
> p1 to s1 and p2 to s2 use UDP
> s1 to s2 uses tcp or tls
>
> The bug comes into place when there is a change of protocol in ser,
> from UDP into TCP or TLS.
> We do not use a preloaded route set from the phones.
> What ser does is it adds 2 route headers, using the r2 parameter.
> Route: <route1>, <route2>
>
> CASE A: --------------------------------------------
> In this scenario, say p1 places a call to p2, going through s1 and s2,
> creating the route set with the record-route.
> Now, let's say p2 generates the BYE message.
> When the BYE gets to s1, the last hop, in the config we do:
> if( loose_route () ) {
> t_relay();
> }
> But, and here is the inconsistency, loose_route (remember we are using
> TCP/TLS, so there are 2 routes in one header field) returns FALSE.
>
> CASE B: --------------------------------------------
> If this experiment is repeated using ALL UDP, the route headers when they
> get to s1 contain only one route, and the call to loose_route() returns ..... TRUE!
>
>
> Unless the config file does not allow blind sip message relaying, both cases end
> up working ... the BYE gets to the final destination. But if the config file does not
> accept relaying ... the request-uri in the BYE is not taken as a local domain ... and
> thus the message is rejected ... (To Alex Mack: could this be the solution to your problem?
> the BYEs not reaching the phone? add some log output and check it ... )
>
> ================================================================
> So, this is not consistent. Now, what is the solution?
> I think that both case A and B should return the same, but what, true or false?
Yes, they should return the same value in this case and it should be
true (see below). It looks like you discovered a bug.
> As I see it, the solution causing less trouble is that both return true. So, the last proxy
> considers this BYE as being loose_routed.
> For this ... change the code in:
> rr::loose_route.c:: static inline int after_loose(struct sip_msg* _m, int preloaded)
> .....
> if (enable_double_rr && is_2rr(&puri.params)) {
> ....
> if (res > 0) { /* No next route found */
> DBG("after_loose: No next URI found\n");
> return (preloaded ? NOT_RR_DRIVEN : RR_DRIVEN);
> or simply
> return (preloaded RR_DRIVEN);
>
>
> And now ... the other option is that both return false ... but this would make big changes.
> Correct me if i am wrong, but wouldn't this be the compliant solution?
> Considering that the r-uri is not part of the route set, when the last proxy processes
> all route headers and there are no more left, there is no loose routing done. The
> destination is taken from the r-uri, not the route set ... thus loose_route should return
> false.
> Or I am getting it all wrong? rfc and goal of loose_route() ?
The meaning of the return value of loose_route is as follows (or
should be):
1 - Record routing was used to route the message
0 - Record routing was not (usually requests establishing a dialog or
transactional requests).
So the function should return true in the mentioned case, because
record routing was used although the message does not contain any
Route header fields anymore.
In other words the purpose of loose_route return value is to distinguish
mid-dialog requests (such as ACK or BYE) from dialog-establishing
requests (such as INVITE). The reason why we have to do this is that we
typically do not apply all the logic in the script to mid-dialog
requests (because you should not change the request-uri of the request
anymore once the dialog has been established -- changes caused by
loose_route do not count).
You may also wonder why don't we use the contents of the Request-URI
for this -- there should be the Contact value of phone1 in the
Request-URI in mid-dialog requests and the value should not match
uri==myself so all we need to do is to enclose all the processing
logic within if (uri == myself) condition.
This would work in a perfect world without the need to be backwards
compatible with strict routers. In our world we have to be backwards
compatible with strict routers and we have to deal with broken
implementations too (that strip ;lr parameters). Due to backwards
compatibility with strict routers it can happen that the Request-URI
will contain the URI of the proxy that is currently processing the
request and subsequent if (uri==myself) would be true.
Jan.
Hello!
I would like to output log() and xlog() to mysql instead of syslog; is
there a way to achieve it this way?
Thx
--
# Lol Zimmerli // S y s C o ® // http://www.sysco.ch/
Make sure special cases are truly special.
- The Elements of Programming Style (Kernighan & Plaugher)
Hi!
i need access to the callee sdp before the connection is established, so
i guess i need to do the following:
UAa -> sends INVITE
SER -> holds the INVITE and sends an OPTIONS to UAb
UAb -> responds to OPTIONS
SER sends INVITE to UAb
is this possible?
i need access to the callee sdp before the connection is established.
thanks in advance,
Joao Salgueiro
Hi List
Is it possible to do Call Hunting with SER.
_________________________________________________________________
Adore Arshad Warsi? http://server1.msn.co.in/sp05/iifa/ Think he is the
funniest?
Hello.
If I will login as Admin I get follow errormessages:
Bad username or password
Username: admin
Password: heslo
SER version: 0.8.14; serweb_2004-07-27
In the php.ini i have Register_globals=on
Whats wrong...?
Hello list,
I'm new in SER, and i have problem setting up the application.
I have asterisk pbx using SIP and a billing application for voip using
radius authentication. The billing use MSSQL database and the Radius
server is under Linux.
I installed radiusclient on the same machine with ser-0.8.11-0.rpm.
The problem is that when I do: ser start, I have this:
127.0.0.1 [127.0.0.1]:5060
XXX.XXX.XXX.XX [XXX.XXX.XXX.XX]:5060
Aliases: host-XXX-XXX-XXX-XX.interpacket.net:5060 localhost:5060
localhost.localdomain:5060 SER:5060
XX is the IP of the SER machine. But when I do "serctl monitor", I got
this:
[cycle #: 1; if constant make sure server lives and fifo is on]
And nothing happen. This tells me that ser is not running.
Can somebody help me with my setup.
Thanks.
Daniel
If you had it working with mediaproxy 1.3.1, try upgrading it again. Also,
there is a debug option for mediaproxy so you can see what happens, but I
don't recall what it is now.
g-)
Roger Lewau wrote:
> Hello Greger,
>
> Thanks for your ideas, however all SIP messages are ok, including SDP
> line as you mentioned. There is no firewall blocking UDP>1000 infront
> of mediaproxy. The situation is actually that mediaproxy dont relay
> RTP packets. Both clients send their packets to mediaproxy to the
> ports specified in the RDP line, I can detect them with ngrep. Also
> there is no error from the dispatcher since it is not used.
> Mediaproxy and SER sits on the same machine...
>
> I tried using the dispatcher but got the same result as without it.
> It must be a configuration issue with mediaproxy, because when I used
> the mediaproxy sample ser.cfg it worked quite nicely. However that
> was on a previous verison of SER and mediaproxy 1.3.1. Also SIP
> conversation is good between SER and clients. It seems there is a
> problem in the communication between ser and mediaproxy. Mediaproxy
> just listen but do not send... There are sadly enough no entries in
> the log that relates to this issue...
>
> Any more ideas? Or anybody else?
>
> -----Ursprungligt meddelande-----
> Från: Greger V. Teigre [mailto:greger@teigre.com]
> Skickat: den 29 maj 2005 09:51
> Till: Roger Lewau; serusers(a)lists.iptel.org
> Ämne: Re: [Serusers] No sound with ser 0.9.0 and mediaproxy 1.2.1
>
> Firewall in front of mediaproxy with closed ports UDP > 1000? DoS
> protection that kicks in (lots of small UDP packets). I know Zyxel
> will do that sometimes.
> Could also be a problem in the setup of your clients. Do they find a
> common codec?
> Look in /var/log/messages for errors from proxydispatcher or
> mediaproxy. You could have a problem with the communication.
> Check the INVITE from ser to callee and the OK from callee to caller.
> Both should have an SDP line with m= and then the IP address of your
> mediaproxy. g-)
>
> Roger Lewau wrote:
>> Hello list...
>>
>> I've installed SER 0.9.0 and mediaproxy 1.2.1 and dowloaded the
>> getting started scripts (issue 04a) from onsip.org.
>> Setup everything as instructed, added a couple of users to the
>> database and tried to setup a call between one public and one NATed
>> UA.
>> Both phones register properly and signalling seems to be working
>> fine, I ring each device from the other, problem is there is no
>> sound.
>>
>> So I checked the mediaproxy sessions... and it looks like this
>>
>>
>> Caller Via Called
>> Status Duration Codec Type Traffic
>> ----------------------------------------------------------------------
>> ------
>> ----------------------------------
>> 82.182.194.x:5004 - 212.247.91.x:35014 - 82.182.194.x:49160 inactive
>> 0'07" Unknown Audio 0/0/0
>>
>> Total traffic: 0bps/0bps/0bps (in1/in2/out) Session count: 1
>>
>> I dont really understand the output but I think "inactive" as well as
>> "Unknown Audio" is not a good sign.
>>
>> How ever, I then used Ngrep to see if there are some rtp traffic
>> going on and sure enough, there is traffic comming in from both UAs
>> but no traffic is leaving the proxy. Strange!
>>
>> Anyone with some bright idea on why mediaproxy is not relaying the
>> sound?
>>
>> My ser.cfg
>> ===================================
>>
>> debug=3
>> fork=yes
>> log_stderror=no
>>
>> listen=212.247.91.<hidden> # INSERT YOUR IP ADDRESS HERE
>> port=5060
>> children=4
>> alias=sip.<somedomain>.com
>> dns=no
>> rev_dns=no
>>
>> fifo="/tmp/ser_fifo"
>> fifo_db_url="mysql://ser:heslo@localhost/ser"
>>
>> 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/auth.so"
>> loadmodule "/usr/local/lib/ser/modules/auth_db.so"
>> loadmodule "/usr/local/lib/ser/modules/uri.so"
>> loadmodule "/usr/local/lib/ser/modules/uri_db.so"
>> loadmodule "/usr/local/lib/ser/modules/mediaproxy.so"
>> loadmodule "/usr/local/lib/ser/modules/nathelper.so"
>> loadmodule "/usr/local/lib/ser/modules/textops.so"
>> loadmodule "/usr/local/lib/ser/modules/avpops.so"
>> loadmodule "/usr/local/lib/ser/modules/domain.so"
>> loadmodule "/usr/local/lib/ser/modules/permissions.so"
>>
>> modparam("auth_db|permissions|uri_db|usrloc", "db_url",
>> "mysql://ser:heslo@localhost/ser")
>> modparam("auth_db", "calculate_ha1", 1) modparam("auth_db",
>> "password_column", "password")
>>
>> #modparam("nathelper", "rtpproxy_disable", 1) #modparam("nathelper",
>> "natping_interval", 0)
>>
>> modparam("mediaproxy","natping_interval", 30)
>> modparam("mediaproxy","mediaproxy_socket",
>> "/var/run/mediaproxy.sock")
>> modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/ser/sip-client
>> s")
>> modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/ser/rtp-client
>> s")
>>
>> modparam("usrloc", "db_mode", 2)
>>
>> modparam("registrar", "nat_flag", 6)
>>
>> modparam("rr", "enable_full_lr", 1)
>>
>> modparam("tm", "fr_inv_timer", 27)
>> modparam("tm", "fr_inv_timer_avp", "inv_timeout")
>>
>> modparam("permissions", "db_mode", 1)
>> modparam("permissions", "trusted_table", "trusted")
>>
>> route {
>> # -----------------------------------------------------------------
>> # Sanity Check Section
>> # -----------------------------------------------------------------
>> if (!mf_process_maxfwd_header("10")) { sl_send_reply("483", "Too
>> Many Hops"); break; };
>>
>> if (msg:len > max_len) {
>> sl_send_reply("513", "Message Overflow"); break; };
>>
>> # -----------------------------------------------------------------
>> # Record Route Section
>> # -----------------------------------------------------------------
>> if (method=="INVITE" && client_nat_test("3")) { # INSERT YOUR IP
>> ADDRESS HERE
>> record_route_preset("212.247.91.<hidden>:5060;nat=yes"); } else if
>> (method!="REGISTER") { record_route();
>> };
>>
>> # -----------------------------------------------------------------
>> # Call Tear Down Section
>> # -----------------------------------------------------------------
>> if (method=="BYE" || method=="CANCEL") { end_media_session(); };
>>
>> # -----------------------------------------------------------------
>> # Loose Route Section
>> # -----------------------------------------------------------------
>> if (loose_route()) {
>>
>> if (has_totag() && (method=="INVITE" || method=="ACK")) {
>>
>> if (client_nat_test("3")||search("^Route:.*;nat=yes")){
>> setflag(6);
>> use_media_proxy();
>> };
>> };
>>
>> route(1);
>> break;
>> };
>>
>> # -----------------------------------------------------------------
>> # Call Type Processing Section
>> # -----------------------------------------------------------------
>>
>> if (uri!=myself) {
>> route(1);
>> break;
>> };
>>
>> if (uri==myself) {
>> if (method=="ACK") {
>> route(6);
>> break;
>> } else if (method=="CANCEL") {
>> route(3);
>> break;
>> } else if (method=="INVITE") {
>> route(3);
>> break;
>> } else if (method=="REGISTER") {
>> route(2);
>> break;
>> };
>>
>> lookup("aliases");
>> if (uri!=myself) {
>> route(1);
>> break;
>> };
>>
>> if (!lookup("location")) {
>> sl_send_reply("404", "User Not Found");
>> break;
>> };
>> };
>> log("NO MATCH");
>> route(1);
>> }
>>
>> route[1] {
>>
>> # -----------------------------------------------------------------
>> # Default Message Handler
>> # -----------------------------------------------------------------
>>
>> t_on_reply("1");
>>
>> if (!t_relay()) {
>>
>> if (method=="INVITE" || method=="ACK") {
>> end_media_session();
>> };
>>
>> sl_reply_error();
>> };
>> }
>>
>> route[2] {
>>
>> # -----------------------------------------------------------------
>> # REGISTER Message Handler
>> # -----------------------------------------------------------------
>>
>> sl_send_reply("100", "Trying");
>>
>> if (!search("^Contact:\ +\*") && client_nat_test("7")) { setflag(6);
>> fix_nated_register(); force_rport(); };
>>
>> if (!www_authorize("","subscriber")) { www_challenge("","0");
>> break; };
>>
>> if (!check_to()) {
>> sl_send_reply("401", "Unauthorized"); break; };
>>
>> consume_credentials();
>>
>> if (!save("location")) {
>> sl_reply_error();
>> };
>> }
>>
>> route[3] {
>>
>> # -----------------------------------------------------------------
>> # CANCEL and INVITE Message Handler
>> # -----------------------------------------------------------------
>>
>> if (client_nat_test("3")) {
>> setflag(7);
>> force_rport();
>> fix_nated_contact();
>> };
>>
>> if (method=="INVITE" && !allow_trusted()) {
>>
>> if (!proxy_authorize("","subscriber")) {
>> proxy_challenge("","0");
>> break;
>> } else if (!check_from()) {
>> sl_send_reply("403", "Use From=ID");
>> break;
>> };
>>
>> consume_credentials();
>> };
>>
>> lookup("aliases");
>> if (uri!=myself) {
>> route(1);
>> break;
>> };
>>
>> if (uri=~"^sip:[+|00][0-9]*@") { # International PSTN inleds antingen
>> med + eller 00 route(4); break; };
>>
>> if (!lookup("location")) {
>>
>> if (uri=~"^sip:0[1-9]*@") { # Domestic PSTN startar med 0
>> route(4);
>> break;
>> };
>>
>> sl_send_reply("404", "User Not Found"); break; };
>>
>> if (method=="CANCEL") {
>> route(1);
>> break;
>> };
>>
>> route(5);
>> route(1);
>> }
>>
>> route[4] {
>>
>> # -----------------------------------------------------------------
>> # PSTN Handler
>> # -----------------------------------------------------------------
>>
>> rewritehost("192.0.2.245"); # INSERT YOUR PSTN GATEWAY IP ADDRESS
>>
>> avp_write("i:45", "inv_timeout");
>>
>> route(5);
>> route(1);
>> }
>>
>> route[5] {
>>
>> # -----------------------------------------------------------------
>> # RTP Proxy Enabler
>> # -----------------------------------------------------------------
>>
>> if (isflagset(6) || isflagset(7)) {
>> use_media_proxy();
>> };
>> }
>>
>> route[6] {
>>
>> #
>> ----------------------------------------------------------------------
>> --
>> # ACK Handler #
>> ----------------------------------------------------------------------
>> --
>>
>> #
>> ----------------------------------------------------------------------
>> --
>> # Aliases Section #
>> ----------------------------------------------------------------------
>> --
>> lookup("aliases");
>> if (uri!=myself) {
>> route(1);
>> break;
>> };
>>
>> lookup("location");
>>
>> route(1);
>> }
>>
>>
>> onreply_route[1] {
>>
>> if ((isflagset(6) || isflagset(7)) &&
>> (status=~"(180)|(183)|2[0-9][0-9]")) {
>>
>> if (!search("^Content-Length:\ +0")) {
>> use_media_proxy();
>> };
>> };
>>
>> if (client_nat_test("1")) {
>> fix_nated_contact();
>> };
>> }
>>
>> ==================================
>>
>> My mediaproxy.ini
>> ==================================
>> ;
>> ; Configuration file for MediaProxy
>> ;
>>
>> [Dispatcher]
>>
>> [MediaProxy]
>> start = yes
>> socket = /var/run/mediaproxy.sock
>> group = ser
>> ;listen = None
>> allow = Any
>> proxyIP = 212.247.91.<hidden>
>> portRange = 35000:65000
>> TOS = 0xb8
>> idleTimeout = 60
>> holdTimeout = 3600
>> ;forceClose = 0
>> accounting = off
>>
>> [Accounting]
>> user = dbuser
>> password = dbpass
>> host = dbhost
>> database = radius
>> table = radacct
>>
>> ==================================
>>
>>
>> _______________________________________________
>> Serusers mailing list
>> serusers(a)lists.iptel.org
>> http://lists.iptel.org/mailman/listinfo/serusers