Serializing database requests

Mike Chamberlain mikeachamberlain at gmail.com
Tue Sep 20 07:27:38 CEST 2005


Hi there.

We are using FreeRadius on a VoIP network, talking to a database
holding account information.  Consider the following sequence of SQL
statements generated by FreeRadius, which in some cases are producing
a problem for us:

AUTHENTICATE
EXEC Rad_Authenticate '1211170776', '0889810576', '', '34333239
66326330 65380031 34383800', 'h323-ivr-out=ACCESSCODE:4441', '',
'211.26.139.42',  ''

AUTHORIZE
EXEC Rad_Authenticate '1211170776', '0889810576', '00113162558045',
'34333239 66326330 65380031 34383800',
'h323-ivr-out=ACCESSCODE:4441;h323-ivr-out=FOLLOW_ON_FLAG:0', '',
'211.26.139.42',  ''

STOP ACCOUTNING
EXEC Rad_Stop_Accounting '1211170776', '34333239 66326330 65380031
34383800', '34333239 66326330 65380031 34383800', 'answer', 
'0889810576', '4441', '10', '51', '211.26.139.42', 'au-syd-primus1'

We are currently not using start accounting messages.  In the above
case, the authorize messages and stop accounting messages are
generated almost simultaneously because the user has hung up
immediately after dialling the number.  But the authorize procedure
takes longer to process than the stop accounting procedure, meaning
that the stop procedure completes before the authorize.  This means
that in effect the two messages get processed back to front.  In our
scenario this leaves a call open in the database that will never be
closed.

How do other people cope with this?  Is there some way of forcing
FreeRadius to serialize requests from the same username so it won't
issue a new one until it has received a response for an existing one?

Thanks in advance for any help,

Mike




More information about the Freeradius-Users mailing list