1. Brekeke Product Name and Version: BSS 3.5.3.0
2. Java version: 1.8
3. OS type and the version: Windows x64
4. UA (phone), gateway or other hardware/software involved: Bria
5. Your problem:
Hi All
I have managed to get an Auth Plugin working - at least it is authorizing the calls ( record.bAuthorized = true) and outputting good logging information.
I am setting the various UserRecord properties such as
record.amountCredit="1000"
record.szCurrency="GBP"
in the plugin...
How would I access these values in a dial-plan? I have spent hours looking through the forums, Wiki, googling etc.
And if it's not too much to ask...
What I really want to do is return some custom data in the UserRecord.ext object and pass this information into a dialplan plugin.
I have the dialplan plugin working - yay - but can't get data from the auth plugin into the dialplan plugin.
Any help, pointers would be very much appreciated.
Kind Regards
Rich
Accessing UserRecord vars in DialPlan
Moderator: Brekeke Support Team
-
- Posts: 5
- Joined: Thu Feb 26, 2015 6:55 pm
- Location: UK
These variables are for working with Radius but you can set them in your own Auth Plugin.
Try the following DialPlan rules for accessing these values.
Rule-1: Call the Auth Plugin
---------------------------------
[Matching Patterns]
$request = ^INVITE
$radius.auth = true
[Deploy Patterns]
$continue = true
---------------------------------
Rule-2: Access to the amountCredit's value
---------------------------------
[Matching Patterns]
$request = ^INVITE
&auth.result = true
&auth.h323-credit-amount = (.+)
[Deploy Patterns]
$log = credit-amount is %1
---------------------------------
Rule-3: Access to the szCurrency's value
---------------------------------
[Matching Patterns]
$request = ^INVITE
&auth.result = true
&auth.h323-currency = (.+)
[Deploy Patterns]
$log = currency is %1
---------------------------------
You can combine these rules to a single rule if you want.
FYI:
http://wiki.brekeke.com/wiki/RADIUS-authentication
If you want to pass a credit-amount value to your DialPlan plugin, Matching Patterns will be like this.
---------------------------------
[Matching Patterns]
$request = ^INVITE
$radius.auth = true
$yourdialplan.method(&auth.h323-credit-amount) = (.+)
---------------------------------
Try the following DialPlan rules for accessing these values.
Rule-1: Call the Auth Plugin
---------------------------------
[Matching Patterns]
$request = ^INVITE
$radius.auth = true
[Deploy Patterns]
$continue = true
---------------------------------
Rule-2: Access to the amountCredit's value
---------------------------------
[Matching Patterns]
$request = ^INVITE
&auth.result = true
&auth.h323-credit-amount = (.+)
[Deploy Patterns]
$log = credit-amount is %1
---------------------------------
Rule-3: Access to the szCurrency's value
---------------------------------
[Matching Patterns]
$request = ^INVITE
&auth.result = true
&auth.h323-currency = (.+)
[Deploy Patterns]
$log = currency is %1
---------------------------------
You can combine these rules to a single rule if you want.
FYI:
http://wiki.brekeke.com/wiki/RADIUS-authentication
If you want to pass a credit-amount value to your DialPlan plugin, Matching Patterns will be like this.
---------------------------------
[Matching Patterns]
$request = ^INVITE
$radius.auth = true
$yourdialplan.method(&auth.h323-credit-amount) = (.+)
---------------------------------
-
- Posts: 5
- Joined: Thu Feb 26, 2015 6:55 pm
- Location: UK
Thank you.
That's really helpful - thank you - I will give it a try.