2013-04-04 93 views
0

我正在使用freeradius2,我想從Accounting-Request上發送的radius屬性之一提取數據。freeradius在會計上執行腳本

你能否告訴我需要在會計部分有哪些參數,以便我可以執行腳本並提取半徑標題?然後

accounting { 
      acct_unique 
      detail 

     #update request { 
      #execute script here 
} 

      sql_accounting 
      attr_filter.accounting_response 
    } 

回答

1
update request { 
    Tmp-String-0 := `/my/script "%{hex:Attribute}"` 
} 

你的腳本可以分析其獲得通過的hexits並返回正確格式的屬性。

+0

注意,這隻適用於FreeRADIUS> = 2.2.1(即添加了十六進制:xlat函數時)。 – 2013-10-16 10:18:22