|
@@ -59,11 +59,12 @@ Daniel-Constantin Mierla
|
|
|
1.10. uri_extra parameter usage
|
|
|
1.11. use_sip_uri_host parameter usage
|
|
|
1.12. common_response parameter usage
|
|
|
- 1.13. radius_load_caller_avps() usage
|
|
|
- 1.14. radius_load_callee_avps() usage
|
|
|
- 1.15. radius_is_user_in() usage
|
|
|
- 1.16. radius_does_uri_exist() usage
|
|
|
- 1.17. radius_does_uri_user_exist() usage
|
|
|
+ 1.13. radius response with common_response value 1
|
|
|
+ 1.14. radius_load_caller_avps() usage
|
|
|
+ 1.15. radius_load_callee_avps() usage
|
|
|
+ 1.16. radius_is_user_in() usage
|
|
|
+ 1.17. radius_does_uri_exist() usage
|
|
|
+ 1.18. radius_does_uri_user_exist() usage
|
|
|
|
|
|
Chapter 1. Admin Guide
|
|
|
|
|
@@ -293,13 +294,39 @@ modparam("misc_radius", "use_sip_uri_host", 1)
|
|
|
3.11. common_response (integer)
|
|
|
|
|
|
Set it to 1 if you need common radius response attributes to be added
|
|
|
- as AVPs.
|
|
|
+ as AVPs in radius_load_caller_avps and radius_load_callee_avps with
|
|
|
+ name as radius attribute name and value as radius attribute value.
|
|
|
|
|
|
Default value is "0".
|
|
|
|
|
|
Example 1.12. common_response parameter usage
|
|
|
...
|
|
|
-modparam("misc_radius", "common_response", 21)
|
|
|
+modparam("misc_radius", "common_response", 1)
|
|
|
+...
|
|
|
+radius_load_caller_avps($fU);
|
|
|
+...
|
|
|
+
|
|
|
+ Example 1.13. radius response with common_response value 1
|
|
|
+...
|
|
|
+ Sending Access-Accept of id 60 to 192.168.25.32 port 59736
|
|
|
+ Session-Timeout = 4261674
|
|
|
+ next-hop-ip = "SIP/00111222333444@cisco-out"
|
|
|
+ SIP-AVP = "email:[email protected] session-timeout#161 next-hop-
|
|
|
+ip:h323/[email protected]"
|
|
|
+ session-protocol = "SIP"
|
|
|
+...
|
|
|
+
|
|
|
+$avp(Session-Timeout) has integer value 4261674
|
|
|
+$avp(next-hop-ip) has string value "SIP/005555777888@cisco-out"
|
|
|
+$avp(session-protocol) has string value "SIP"
|
|
|
+$avp(SIP-AVP) has string value "email:[email protected] session-tim
|
|
|
+eout#161 next-hop-ip:h323/[email protected]"
|
|
|
+
|
|
|
+...
|
|
|
+ When recieving negative response, check appropriate avp's:
|
|
|
+ $avp(Reply-Message) = "Not enough money on deposit '-89.83'. Rejected"
|
|
|
+ $avp(Filter-Id) = "neg_deposit"
|
|
|
+...
|
|
|
|
|
|
4. Functions
|
|
|
|
|
@@ -317,7 +344,7 @@ modparam("misc_radius", "common_response", 21)
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.13. radius_load_caller_avps() usage
|
|
|
+ Example 1.14. radius_load_caller_avps() usage
|
|
|
...
|
|
|
radius_load_caller_avps("$fU@$fd"); # take caller from From URI
|
|
|
...
|
|
@@ -332,7 +359,7 @@ radius_load_caller_avps("$au@$ar"); # take caller from Authorization
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.14. radius_load_callee_avps() usage
|
|
|
+ Example 1.15. radius_load_callee_avps() usage
|
|
|
...
|
|
|
radius_load_callee_avps("$rU@$rd"); # take callee from Request-URI
|
|
|
...
|
|
@@ -347,7 +374,7 @@ radius_load_callee_avps("$rU@$rd"); # take callee from Request-URI
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
|
|
|
BRANCH_ROUTE, and LOCAL_ROUTE.
|
|
|
|
|
|
- Example 1.15. radius_is_user_in() usage
|
|
|
+ Example 1.16. radius_is_user_in() usage
|
|
|
...
|
|
|
radius_is_user_in("$rU@$rd", "1"); # take user from Request-URI
|
|
|
...
|
|
@@ -362,7 +389,7 @@ radius_is_user_in("$au@$ar", "group_x");# take user from credentials
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE and LOCAL_ROUTE.
|
|
|
|
|
|
- Example 1.16. radius_does_uri_exist() usage
|
|
|
+ Example 1.17. radius_does_uri_exist() usage
|
|
|
...
|
|
|
if (radius_does_uri_exist()) ... # check Request-URI
|
|
|
...
|
|
@@ -379,7 +406,7 @@ if (radius_does_uri_exist("$avp(i:99)")) ... # check URI in $avp(i:99)
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE and LOCAL_ROUTE.
|
|
|
|
|
|
- Example 1.17. radius_does_uri_user_exist() usage
|
|
|
+ Example 1.18. radius_does_uri_user_exist() usage
|
|
|
...
|
|
|
if (radius_does_uri_user_exist()) ... # check Request-URI userpart
|
|
|
...
|