Question

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:

  1. Returned result: 0 means auth successfull, 1 to 4 means auth unsucessfull
  2. Group Number for authorization
  3. Account Information
  4. Error String

How can I read the Account Information returned by ACS in my TCL Code?

Was it helpful?

Solution

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:

    if { [infotag get aaa_avpair_exists h323-ivr-in] } {
        set CustomerStatus [infotag get aaa_avpair h323-ivr-in]
foreach pairs [split $CustomerStatus]  {
                           set value_list [split $pairs :]
                           set key [lindex $value_list 0]
                           set value [lindex $value_list 1]
                           if { $key == "contractType" } {
                                set contractType $value
                           } 
                   }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top