I have configured a Cisco voice gateway to use a Cisco ACS on a windows server 2003. Meanwhile, I have configured an external database through an ODBC connection with a MSSQL server. As mentioned in the TCLIVR document, I have to use a stored procedure on Mirosoft SQL server named CSNTAuthUserPap to respond to authorization request from voice gateway. The stored procedure has the following format:
CREATE PROCEDURE [dbo].[CSNTAuthUserPap]
@username varchar(64), @pass varchar(255)
AS SET NOCOUNT ON
IF EXISTS(
SELECT username FROM users WHERE username = @username AND Returnparam = @pass )
SELECT 0,'1','1','No Error'
ELSE
SELECT 3,0,'odbc','ODBC Authen Error'
My question is about reading parameters returned to the ACS server. Th returned record has the following format:
- Returned result: 0 means auth successfull, 1 to 4 means auth unsucessfull
- Group Number for authorization
- Account Information
- Error String
How can I read the Account Information returned by ACS in my TCL Code?
I found it. The answer lies in the AVPairs and creating custom avpairs. I must specify avpair for each group returned from the radius server and read them in the TCL code like this: