mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 15:48:44 +05:00
Add integration tests for Auth and Challange with Radius
This commit is contained in:
committed by
Dan Christian Bogos
parent
d8f50310c8
commit
83a41eb191
62
data/conf/samples/dispatchers/radagent/accounting.json
Normal file
62
data/conf/samples/dispatchers/radagent/accounting.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "KamailioAccountingStart",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Start"],
|
||||
"flags": ["*initiate", "*attributes", "*resources", "*accounts"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStop",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
|
||||
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference",
|
||||
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
62
data/conf/samples/dispatchers/radagent/authchallenge.json
Normal file
62
data/conf/samples/dispatchers/radagent/authchallenge.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "Challenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678",
|
||||
"*empty:~*req.User-Password:"],
|
||||
"flags": ["*none", "*log"],
|
||||
"reply_fields":[
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode",
|
||||
"type": "*constant", "value": "AccessChallenge"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message",
|
||||
"type": "*constant", "value": "Missing User-Password"}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "CGRAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessorChallenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth","*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/dispatchers/radagent/authchap.json
Normal file
51
data/conf/samples/dispatchers/radagent/authchap.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRCHAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusCHAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*radauth", "*chap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/dispatchers/radagent/authmschapv2.json
Normal file
51
data/conf/samples/dispatchers/radagent/authmschapv2.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRMSCHAPV2PAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*radauth", "*mschapv2", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/dispatchers/radagent/authpapauth.json
Normal file
51
data/conf/samples/dispatchers/radagent/authpapauth.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRPAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusPAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
@@ -54,107 +54,6 @@
|
||||
"radius_agent": {
|
||||
"enabled": true,
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "KamailioAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*variable",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
||||
"flags": ["*radauth", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStart",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Start"],
|
||||
"flags": ["*initiate", "*attributes", "*resources", "*accounts"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*variable",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStop",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
|
||||
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*variable",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference",
|
||||
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
],
|
||||
|
||||
},
|
||||
|
||||
"apiers": {
|
||||
|
||||
62
data/conf/samples/radagent_internal/accounting.json
Normal file
62
data/conf/samples/radagent_internal/accounting.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "KamailioAccountingStart",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Start"],
|
||||
"flags": ["*initiate", "*attributes", "*resources", "*accounts"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStop",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
|
||||
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference",
|
||||
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
62
data/conf/samples/radagent_internal/authchallenge.json
Normal file
62
data/conf/samples/radagent_internal/authchallenge.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "Challenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678",
|
||||
"*empty:~*req.User-Password:"],
|
||||
"flags": ["*none", "*log"],
|
||||
"reply_fields":[
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode",
|
||||
"type": "*constant", "value": "AccessChallenge"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message",
|
||||
"type": "*constant", "value": "Missing User-Password"}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "CGRAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessorChallenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth","*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_internal/authchap.json
Normal file
51
data/conf/samples/radagent_internal/authchap.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRCHAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusCHAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*radauth", "*chap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_internal/authmschapv2.json
Normal file
51
data/conf/samples/radagent_internal/authmschapv2.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRMSCHAPV2PAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*radauth", "*mschapv2", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_internal/authpapauth.json
Normal file
51
data/conf/samples/radagent_internal/authpapauth.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRPAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusPAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
@@ -66,106 +66,6 @@
|
||||
"radius_agent": {
|
||||
"enabled": true,
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "KamailioAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*variable",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
||||
"flags": ["*radauth", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStart",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Start"],
|
||||
"flags": ["*initiate", "*attributes", "*resources", "*accounts"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*variable",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStop",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
|
||||
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*variable",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference",
|
||||
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
|
||||
62
data/conf/samples/radagent_internal_gob/accounting.json
Normal file
62
data/conf/samples/radagent_internal_gob/accounting.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "KamailioAccountingStart",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Start"],
|
||||
"flags": ["*initiate", "*attributes", "*resources", "*accounts"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStop",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
|
||||
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference",
|
||||
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
62
data/conf/samples/radagent_internal_gob/authchallenge.json
Normal file
62
data/conf/samples/radagent_internal_gob/authchallenge.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "Challenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678",
|
||||
"*empty:~*req.User-Password:"],
|
||||
"flags": ["*none", "*log"],
|
||||
"reply_fields":[
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode",
|
||||
"type": "*constant", "value": "AccessChallenge"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message",
|
||||
"type": "*constant", "value": "Missing User-Password"}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "CGRAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessorChallenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth","*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_internal_gob/authchap.json
Normal file
51
data/conf/samples/radagent_internal_gob/authchap.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRCHAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusCHAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*radauth", "*chap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_internal_gob/authmschapv2.json
Normal file
51
data/conf/samples/radagent_internal_gob/authmschapv2.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRMSCHAPV2PAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*radauth", "*mschapv2", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_internal_gob/authpapauth.json
Normal file
51
data/conf/samples/radagent_internal_gob/authpapauth.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRPAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusPAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
@@ -74,106 +74,6 @@
|
||||
"radius_agent": {
|
||||
"enabled": true,
|
||||
"sessions_conns": ["conn1"],
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "KamailioAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*variable",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
||||
"flags": ["*radauth", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStart",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Start"],
|
||||
"flags": ["*initiate", "*attributes", "*resources", "*accounts"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*variable",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStop",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
|
||||
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*variable",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference",
|
||||
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
|
||||
62
data/conf/samples/radagent_mongo/accounting.json
Normal file
62
data/conf/samples/radagent_mongo/accounting.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "KamailioAccountingStart",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Start"],
|
||||
"flags": ["*initiate", "*attributes", "*resources", "*accounts"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStop",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
|
||||
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference",
|
||||
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
62
data/conf/samples/radagent_mongo/authchallenge.json
Normal file
62
data/conf/samples/radagent_mongo/authchallenge.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "Challenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678",
|
||||
"*empty:~*req.User-Password:"],
|
||||
"flags": ["*none", "*log"],
|
||||
"reply_fields":[
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode",
|
||||
"type": "*constant", "value": "AccessChallenge"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message",
|
||||
"type": "*constant", "value": "Missing User-Password"}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "CGRAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessorChallenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth","*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_mongo/authchap.json
Normal file
51
data/conf/samples/radagent_mongo/authchap.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRCHAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusCHAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*radauth", "*chap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_mongo/authmschapv2.json
Normal file
51
data/conf/samples/radagent_mongo/authmschapv2.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRMSCHAPV2PAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*radauth", "*mschapv2", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_mongo/authpapauth.json
Normal file
51
data/conf/samples/radagent_mongo/authpapauth.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRPAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusPAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
@@ -69,106 +69,6 @@
|
||||
"radius_agent": {
|
||||
"enabled": true,
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "KamailioAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*variable",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
||||
"flags": ["*radauth", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStart",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Start"],
|
||||
"flags": ["*initiate", "*attributes", "*resources", "*accounts"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*variable",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStop",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
|
||||
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*variable",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference",
|
||||
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
|
||||
62
data/conf/samples/radagent_mongo_gob/accounting.json
Normal file
62
data/conf/samples/radagent_mongo_gob/accounting.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "KamailioAccountingStart",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Start"],
|
||||
"flags": ["*initiate", "*attributes", "*resources", "*accounts"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStop",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
|
||||
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference",
|
||||
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
62
data/conf/samples/radagent_mongo_gob/authchallenge.json
Normal file
62
data/conf/samples/radagent_mongo_gob/authchallenge.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "Challenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678",
|
||||
"*empty:~*req.User-Password:"],
|
||||
"flags": ["*none", "*log"],
|
||||
"reply_fields":[
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode",
|
||||
"type": "*constant", "value": "AccessChallenge"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message",
|
||||
"type": "*constant", "value": "Missing User-Password"}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "CGRAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessorChallenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth","*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_mongo_gob/authchap.json
Normal file
51
data/conf/samples/radagent_mongo_gob/authchap.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRCHAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusCHAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*radauth", "*chap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_mongo_gob/authmschapv2.json
Normal file
51
data/conf/samples/radagent_mongo_gob/authmschapv2.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRMSCHAPV2PAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*radauth", "*mschapv2", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_mongo_gob/authpapauth.json
Normal file
51
data/conf/samples/radagent_mongo_gob/authpapauth.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRPAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusPAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
@@ -77,106 +77,6 @@
|
||||
"radius_agent": {
|
||||
"enabled": true,
|
||||
"sessions_conns": ["conn1"],
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "KamailioAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*variable",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
||||
"flags": ["*radauth", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStart",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Start"],
|
||||
"flags": ["*initiate", "*attributes", "*resources", "*accounts"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*variable",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStop",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
|
||||
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*variable",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference",
|
||||
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
|
||||
62
data/conf/samples/radagent_mysql/accounting.json
Normal file
62
data/conf/samples/radagent_mysql/accounting.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "KamailioAccountingStart",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Start"],
|
||||
"flags": ["*initiate", "*attributes", "*resources", "*accounts"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStop",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
|
||||
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference",
|
||||
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
62
data/conf/samples/radagent_mysql/authchallenge.json
Normal file
62
data/conf/samples/radagent_mysql/authchallenge.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "Challenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678",
|
||||
"*empty:~*req.User-Password:"],
|
||||
"flags": ["*none", "*log"],
|
||||
"reply_fields":[
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode",
|
||||
"type": "*constant", "value": "AccessChallenge"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message",
|
||||
"type": "*constant", "value": "Missing User-Password"}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "CGRAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessorChallenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth","*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_mysql/authchap.json
Normal file
51
data/conf/samples/radagent_mysql/authchap.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRCHAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusCHAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*radauth", "*chap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_mysql/authmschapv2.json
Normal file
51
data/conf/samples/radagent_mysql/authmschapv2.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRMSCHAPV2PAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*radauth", "*mschapv2", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_mysql/authpapauth.json
Normal file
51
data/conf/samples/radagent_mysql/authpapauth.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRPAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusPAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
@@ -65,106 +65,6 @@
|
||||
"radius_agent": {
|
||||
"enabled": true,
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "KamailioAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*variable",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
||||
"flags": ["*radauth", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStart",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Start"],
|
||||
"flags": ["*initiate", "*attributes", "*resources", "*accounts"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*variable",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStop",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
|
||||
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*variable",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference",
|
||||
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
|
||||
62
data/conf/samples/radagent_mysql_gob/accounting.json
Normal file
62
data/conf/samples/radagent_mysql_gob/accounting.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "KamailioAccountingStart",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Start"],
|
||||
"flags": ["*initiate", "*attributes", "*resources", "*accounts"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
{
|
||||
"id": "KamailioAccountingStop",
|
||||
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
|
||||
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*composed",
|
||||
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference",
|
||||
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
||||
{"tag": "RemoteAddr" , "path": "*cgreq.RemoteAddr", "type": "*remote_host"},
|
||||
],
|
||||
"reply_fields":[],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
62
data/conf/samples/radagent_mysql_gob/authchallenge.json
Normal file
62
data/conf/samples/radagent_mysql_gob/authchallenge.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "Challenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678",
|
||||
"*empty:~*req.User-Password:"],
|
||||
"flags": ["*none", "*log"],
|
||||
"reply_fields":[
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode",
|
||||
"type": "*constant", "value": "AccessChallenge"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message",
|
||||
"type": "*constant", "value": "Missing User-Password"}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "CGRAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessorChallenge",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth","*string:~*req.Sip-From-Tag:12345678"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_mysql_gob/authchap.json
Normal file
51
data/conf/samples/radagent_mysql_gob/authchap.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRCHAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusCHAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585362"],
|
||||
"flags": ["*radauth", "*chap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_mysql_gob/authmschapv2.json
Normal file
51
data/conf/samples/radagent_mysql_gob/authmschapv2.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRMSCHAPV2PAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585363"],
|
||||
"flags": ["*radauth", "*mschapv2", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
}
|
||||
51
data/conf/samples/radagent_mysql_gob/authpapauth.json
Normal file
51
data/conf/samples/radagent_mysql_gob/authpapauth.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
|
||||
"radius_agent": {
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "CGRPAPAuth",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*auth", "*attributes", "*accounts", "*continue"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*prepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
|
||||
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed",
|
||||
"value": "~*req.User-Name", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*composed",
|
||||
"value": "~*req.Called-Station-Id", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed",
|
||||
"value": "~*req.Event-Timestamp", "mandatory": true},
|
||||
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant",
|
||||
"value": "*attributes"}
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "MaxUsage", "path": "*rep.SIP-AVP", "type": "*composed",
|
||||
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "RadiusPAPAuthProcessor",
|
||||
"filters": ["*string:~*vars.*radReqType:*radAuth", "*string:~*req.Sip-From-Tag:51585361"],
|
||||
"flags": ["*radauth", "*pap", "*log"],
|
||||
"request_fields":[
|
||||
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
||||
"value": "~*cgrep.Attributes.PasswordFromAttributes"},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag":"RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
||||
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*constant", "value": "AccessReject"},
|
||||
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
||||
"type": "*variable", "value": "~*cgrep.Error"}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user