Dear Lucas,
which radius server you are using ?
iam using the free radius server - 0.9.3
and how are you maintaining the billing server
my radius database radacct is haveing the following
coloumns
+-------------------------+----------------------+------+-+
| Field | Type |
Null | Key | Default | Extra |
+-------------------------+----------------------+------+-+
| RadAcctId | bigint(21) |
| PRI | NULL | auto_increment |
| AcctSessionId | varchar(255) |
| MUL | | |
| AcctUniqueId | varchar(255) |
| MUL | | |
| UserName | varchar(64) |
| MUL | | |
| Realm | varchar(64) | YES
| | | |
| NASIPAddress | varchar(15) |
| MUL | | |
| NASPortId | varchar(50) |
| | | |
| NASPortType | varchar(255) |
| | | |
| AcctStartTime | datetime |
| MUL | 0000-00-00 00:00:00 | |
| AcctStopTime | datetime |
| MUL | 0000-00-00 00:00:00 | |
| AcctSessionTime | int(12) | YES
| | NULL | |
| AcctAuthentic | varchar(32) | YES
| | NULL | |
| ConnectInfo_start | varchar(32) | YES
| | NULL | |
| ConnectInfo_stop | varchar(32) | YES
| | NULL | |
| AcctInputOctets | bigint(12) | YES
| | NULL | |
| AcctOutputOctets | bigint(12) | YES
| | NULL | |
| CalledStationId | varchar(50) |
| | | |
| CallingStationId | varchar(50) |
| | | |
| AcctTerminateCause | varchar(32) |
| | | |
| ServiceType | varchar(32) | YES
| | NULL | |
| FramedProtocol | varchar(32) | YES
| | NULL | |
| FramedIPAddress | varchar(15) |
| MUL | | |
| AcctStartDelay | int(12) | YES
| | NULL | |
| AcctStopDelay | int(12) | YES
| | NULL | |
| SipMethod | varchar(50) |
| | | |
| SipResponseCode | smallint(5) unsigned |
| | 0 | |
| SipToTag | varchar(255) |
| | | |
| SipFromTag | varchar(128) |
| | | |
| SipTranslatedRequestURI | varchar(255) |
| | | |
| SipUserAgents | varchar(128) |
| | | |
| SipApplicationType | varchar(255) |
| | | |
| SipCodecs | varchar(255) |
| | | |
| Timestamp | bigint(20) unsigned |
| | 0 | |
| DestinationId | varchar(255) |
| | | |
| Price | varchar(255) |
| | | |
| Rate | text |
| | | |
| Normalized | enum('0','1')
did you able get sucess on the prepaid issue.
if yes what approach you had to do this?
with regards
--- Lucas Aimaretto <lucas(a)cyneric.com> wrote:
may i know
which b2bua you are using?
1.5.0 (the one from
www.vovida.org)
and how did you configured b2bua with the radius
and the ser exactly?
this is configuration.
B2BUA: 0.0.0.0:5065
SER: 192.165.1.252:5060
SER: 127.0.0.1:5060
RADIUS: 0.0.0.0:1812
RADIUS: 0.0.0.0:1813
TEL SIP: 192.168.1.113:11001
- b2bConfig.xml
<B2BUA_Configuration>
<SIP>
<Local>
<Port>5065</Port>
<Transport>UDP</Transport>
</Local>
// - Outbound Proxy Server
<Proxy_Server>
<Address>192.168.1.252</Address>
<Port>5060</Port>
</Proxy_Server>
<Registration>
<Register>no</Register>
<Address>192.168.1.252</Address>
<Port>5060</Port>
<Expires>600</Expires>
</Registration>
</SIP>
<RADIUS>
<Local>
<Authentication_Port>1812</Authentication_Port>
<Accounting_Port>1812</Accounting_Port>
</Local>
<Billing_Server>
<Address>192.168.1.253</Address>
<Authentication_Port>1813</Authentication_Port>
<Accounting_Port>1813</Accounting_Port>
<Password>rootpass</Password>
</Billing_Server>
</RADIUS>
<PrePaid>
<Billing>
<Option>mandatory</Option>
<Refresh_Time>60</Refresh_Time>
<User_Id_Decode_Scheme>Basic</User_Id_Decode_Scheme>
</Billing>
<Use_SIP_INFO>no</Use_SIP_INFO>
<Use_HTTP>no</Use_HTTP>
</PrePaid>
<Redundancy />
</B2BUA_Configuration>
- ser.cfg
[...]
# -- RADIUS AUTH --
modparam("auth_radius", "radius_config",
"/etc/radiusclient.conf")
modparam("auth_radius", "service_type", 15)
# -- RADIUS ACC --
modparam("acc", "radius_config",
"/etc/radiusclient.conf")
modparam("acc", "radius_flag", 1)
modparam("acc", "radius_missed_flag", 3)
modparam("acc", "log_level", 2)
[...]
route{
setflag(1);
# 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")
{
log(1, "REGISTER message
received\n");
# Lo siguiente es para auth
con RADIUS
if
(!radius_www_authorize(""))
{
www_challenge("",
"0");
break;
};
save("location");
break;
};
if (method=="INVITE")
{
forward(192.168.1.253,5065);
sl_send_reply("181","Forwarding the call to
B2BUA");
};
# native SIP destinations are
handled using our USRLOC
DB
if (!lookup("location"))
{
sl_send_reply("404", "Not
Found");
break;
};
};
t_relay();
}
could you able to establish the communication
properly?
REGISTER:
No problems here, because the telephone talks to
SER, SER talks to
RADIUS (see ser.cfg) and the phone is registered.
Easy.
When TEL sends and INVITE, SER forwards the INVITE
to B2BUA, which sends
an Authorization Request to RADIUS. OK here, because
B2BUA sends and
auth req with calling-station-id and
called-station-id, which is good,
with both acct-start and acct-stop. Now, upon the
BYE message, B2BUA is
not sending the Acct-Session-Time for doing billing.
Which is not good.
Any ideas ?
Now, it this the correct way of doing this ?
Thanx.
=== message truncated ===
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!