Hi All, Can someone provide a clear guideline on how to setup Radius AAA to work with FS. Please send complete installation & configuration instructions. Thanks for help in advance. Regards--------------Abid SaleemSr. Product ManagerTerminus Technologies
On Wed, Oct 6, 2010 at 7:44 AM, Abid Saleem <abid_freeswitch@live.com>wrote:
Hi All,
Can someone provide a clear guideline on how to setup Radius AAA to work with FS. Please send complete installation & configuration instructions. Thanks for help in advance.
well, yahh... this is still pending on my task list ... sorry guys... the module works quite nice but didn't document it. promise to do it this week-end. T.
I'm afraid no such comprehensive documentation exists. Submissions to our wiki are most welcomed. This is all we have at the moment: http://wiki.freeswitch.org/wiki/Mod_rad_auth Be sure to install freeradius2 (server) and freeradius-client before trying to install mod_auth_rad. -MC On Tue, Oct 5, 2010 at 10:44 PM, Abid Saleem <abid_freeswitch@live.com>wrote:
Hi All,
Can someone provide a clear guideline on how to setup Radius AAA to work with FS. Please send complete installation & configuration instructions. Thanks for help in advance.
Regards -------------- Abid Saleem Sr. Product Manager Terminus Technologies
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Thu, Oct 7, 2010 at 1:15 AM, Michael Collins <msc@freeswitch.org> wrote:
I'm afraid no such comprehensive documentation exists. Submissions to our wiki are most welcomed. This is all we have at the moment:
http://wiki.freeswitch.org/wiki/Mod_rad_auth
Be sure to install freeradius2 (server) and freeradius-client before trying to install mod_auth_rad.
-MC
correct, Im the author of the module and im going to provide the documentation and how-to. in brief, this module does radius auth (not accounting). It is based on freeradius-client library and as such this is the only dependency. you can specify your own list of VSAs to be included in the packet along with the standard ones that are being used. name: just a description value: direct input or variable pec: vendor ID (0 for default, 9 for cisco...) expr: 1 for channel variable, 2 for direct input (string) direction: in for radius-request, out for radius-response Im not going to describe it here... its better i do it on the wiki itself... T.
Hello Tihomir, I've just updated the Mod_rad_auth wiki with installation instructions. Thanks a lot for the mod. I use it in production and it works just great! Regards, Nazim On 10/07/2010 01:48 PM, Tihomir Culjaga wrote:
On Thu, Oct 7, 2010 at 1:15 AM, Michael Collins<msc@freeswitch.org> wrote:
I'm afraid no such comprehensive documentation exists. Submissions to our wiki are most welcomed. This is all we have at the moment:
http://wiki.freeswitch.org/wiki/Mod_rad_auth
Be sure to install freeradius2 (server) and freeradius-client before trying to install mod_auth_rad.
-MC
correct,
Im the author of the module and im going to provide the documentation and how-to.
in brief, this module does radius auth (not accounting). It is based on freeradius-client library and as such this is the only dependency.
you can specify your own list of VSAs to be included in the packet along with the standard ones that are being used.
name: just a description value: direct input or variable pec: vendor ID (0 for default, 9 for cisco...) expr: 1 for channel variable, 2 for direct input (string) direction: in for radius-request, out for radius-response
Im not going to describe it here... its better i do it on the wiki itself...
T.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
2 gold stars for Nazim! -MC On Thu, Oct 7, 2010 at 5:53 AM, Nazim Aghabayov <nazim.aghabayov@gmail.com>wrote:
Hello Tihomir,
I've just updated the Mod_rad_auth wiki with installation instructions. Thanks a lot for the mod. I use it in production and it works just great!
Regards, Nazim
On 10/07/2010 01:48 PM, Tihomir Culjaga wrote:
On Thu, Oct 7, 2010 at 1:15 AM, Michael Collins<msc@freeswitch.org> wrote:
I'm afraid no such comprehensive documentation exists. Submissions to our wiki are most welcomed. This is all we have at the moment:
http://wiki.freeswitch.org/wiki/Mod_rad_auth
Be sure to install freeradius2 (server) and freeradius-client before trying to install mod_auth_rad.
-MC
correct,
Im the author of the module and im going to provide the documentation and how-to.
in brief, this module does radius auth (not accounting). It is based on freeradius-client library and as such this is the only dependency.
you can specify your own list of VSAs to be included in the packet along with the standard ones that are being used.
name: just a description value: direct input or variable pec: vendor ID (0 for default, 9 for cisco...) expr: 1 for channel variable, 2 for direct input (string) direction: in for radius-request, out for radius-response
Im not going to describe it here... its better i do it on the wiki itself...
T.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Thu, Oct 7, 2010 at 2:53 PM, Nazim Aghabayov <nazim.aghabayov@gmail.com>wrote:
Hello Tihomir,
I've just updated the Mod_rad_auth wiki with installation instructions. Thanks a lot for the mod. I use it in production and it works just great!
wow, thats great.... you guys just saved me an hour or two of documenting... Perhaps, we can add an example of a dictionary file and how to add your own Vendor ID definitions Also, the radius dictionary you point need to have all vendor IDs specified ... i found out that sometimes it has issues with $INCLUDEs. <param name="dictionary" value="/usr/local/etc/radiusclient/dictionary.all"/> This is for auth... I have modified mod_xml_cdr as well and added radius and odbc interfaces as well. Now im able to store CDRs on 4 interfacs simultaneously. regarding radius accounting, the logic for VSAs is the same as for mod_rad_auth. I can provide diffs or patches if you like ... and i can give it here to be stored in git. Interested ? T.
Great new features! Of course I'm interested. I've even borrowed some of your code from mod_xml_cdr to implement a simple radius accounting as a plugin for Xmlcdrd: http://wiki.freeswitch.org/wiki/Xmlcdrd Well, shame on me. It's not documented yet. Hoping I'll document it soon ) Nazim On 10/07/2010 11:00 PM, Tihomir Culjaga wrote:
wow, thats great.... you guys just saved me an hour or two of documenting... Perhaps, we can add an example of a dictionary file and how to add your own Vendor ID definitions
Also, the radius dictionary you point need to have all vendor IDs specified ... i found out that sometimes it has issues with $INCLUDEs.
<param name="dictionary" value="/usr/local/etc/radiusclient/dictionary.all"/>
This is for auth... I have modified mod_xml_cdr as well and added radius and odbc interfaces as well. Now im able to store CDRs on 4 interfacs simultaneously. regarding radius accounting, the logic for VSAs is the same as for mod_rad_auth.
I can provide diffs or patches if you like ... and i can give it here to be stored in git.
Interested ?
T.
On Thu, Oct 7, 2010 at 9:11 PM, Nazim Aghabayov <nazim.aghabayov@gmail.com>wrote:
Great new features! Of course I'm interested. I've even borrowed some of your code from mod_xml_cdr to implement a simple radius accounting as a plugin for Xmlcdrd: http://wiki.freeswitch.org/wiki/Xmlcdrd Well, shame on me. It's not documented yet. Hoping I'll document it soon )
i don't remember if i actually uploaded mod_xml_cdr patches ... hmmm anyhow i use odbc to send CDRS to a DB for statistics purpose (calculate ASR/ACD/ROUTING) and radius interface for billing purpose as this hooks to an external billing.
Pardon me ) I was mean to say "imported some of your code from mod_rad_auth". Thank you once again for the module, it's extremely configurable and easy to use. Nazim. On 10/08/2010 12:24 AM, Tihomir Culjaga wrote:
i don't remember if i actually uploaded mod_xml_cdr patches ... hmmm
anyhow i use odbc to send CDRS to a DB for statistics purpose (calculate ASR/ACD/ROUTING) and radius interface for billing purpose as this hooks to an external billing.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I don't suppose one of you RADIUS experts would like to join the FS conf call on a Wednesday and do a presentation on this? You would probably need to do a primer on RADIUS in general to get everyone up to speed. Please let me know. Thanks, MC On Thu, Oct 7, 2010 at 12:39 PM, Nazim Aghabayov <nazim.aghabayov@gmail.com>wrote:
Pardon me ) I was mean to say "imported some of your code from mod_rad_auth". Thank you once again for the module, it's extremely configurable and easy to use.
Nazim.
On 10/08/2010 12:24 AM, Tihomir Culjaga wrote:
i don't remember if i actually uploaded mod_xml_cdr patches ... hmmm
anyhow i use odbc to send CDRS to a DB for statistics purpose (calculate ASR/ACD/ROUTING) and radius interface for billing purpose as this hooks to an external billing.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Despite the fact that I know very little about the Radius I'll gladly join and share my experience with integration of 3d party billing solution with a FreeSWITCH. Thanks, Nazim On 10/08/2010 05:23 AM, Michael Collins wrote:
I don't suppose one of you RADIUS experts would like to join the FS conf call on a Wednesday and do a presentation on this? You would probably need to do a primer on RADIUS in general to get everyone up to speed.
Please let me know.
Thanks, MC
On Thu, Oct 7, 2010 at 12:39 PM, Nazim Aghabayov <nazim.aghabayov@gmail.com>wrote:
Pardon me ) I was mean to say "imported some of your code from mod_rad_auth". Thank you once again for the module, it's extremely configurable and easy to use.
Nazim.
On 10/08/2010 12:24 AM, Tihomir Culjaga wrote:
i don't remember if i actually uploaded mod_xml_cdr patches ... hmmm
anyhow i use odbc to send CDRS to a DB for statistics purpose (calculate ASR/ACD/ROUTING) and radius interface for billing purpose as this hooks to an external billing.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi, I have tried making and installing mod_rad_auth but it gives me the following error when loading the module. 2010-10-15 17:58:02.088712 [CRIT] switch_loadable_module.c:882 Error Loading module /usr/local/freeswitch/mod/mod_rad_auth.so**libfreeradius-client.so.2: cannot open shared object file: No such file or directory** Could you please help what is the issue and any resolution available. I installed freeradius-client-1.1.6 already. Regards------------Abid SaleemSr. Product ManagerTerminus Technologies
Date: Thu, 7 Oct 2010 17:53:56 +0500 From: nazim.aghabayov@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
Hello Tihomir,
I've just updated the Mod_rad_auth wiki with installation instructions. Thanks a lot for the mod. I use it in production and it works just great!
Regards, Nazim
On 10/07/2010 01:48 PM, Tihomir Culjaga wrote:
On Thu, Oct 7, 2010 at 1:15 AM, Michael Collins<msc@freeswitch.org> wrote:
I'm afraid no such comprehensive documentation exists. Submissions to our wiki are most welcomed. This is all we have at the moment:
http://wiki.freeswitch.org/wiki/Mod_rad_auth
Be sure to install freeradius2 (server) and freeradius-client before trying to install mod_auth_rad.
-MC
correct,
Im the author of the module and im going to provide the documentation and how-to.
in brief, this module does radius auth (not accounting). It is based on freeradius-client library and as such this is the only dependency.
you can specify your own list of VSAs to be included in the packet along with the standard ones that are being used.
name: just a description value: direct input or variable pec: vendor ID (0 for default, 9 for cisco...) expr: 1 for channel variable, 2 for direct input (string) direction: in for radius-request, out for radius-response
Im not going to describe it here... its better i do it on the wiki itself...
T.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Fri, Oct 15, 2010 at 3:39 PM, Abid Saleem <abid_freeswitch@live.com>wrote:
Hi,
I have tried making and installing mod_rad_auth but it gives me the following error when loading the module.
2010-10-15 17:58:02.088712 [CRIT] switch_loadable_module.c:882 Error Loading module /usr/local/freeswitch/mod/mod_rad_auth.so **libfreeradius-client.so.2: cannot open shared object file: No such file or directory**
Could you please help what is the issue and any resolution available. I installed freeradius-client-1.1.6 already.
just link the library into freeswitch/lib directory. T.
search to make sure that the libfreeradius-client.so.2 file exists somewhere on your system. If it does not then the freeradius-client install was not successful. -MC On Fri, Oct 15, 2010 at 6:39 AM, Abid Saleem <abid_freeswitch@live.com>wrote:
Hi,
I have tried making and installing mod_rad_auth but it gives me the following error when loading the module.
2010-10-15 17:58:02.088712 [CRIT] switch_loadable_module.c:882 Error Loading module /usr/local/freeswitch/mod/mod_rad_auth.so **libfreeradius-client.so.2: cannot open shared object file: No such file or directory**
Could you please help what is the issue and any resolution available. I installed freeradius-client-1.1.6 already.
Regards ------------ Abid Saleem Sr. Product Manager Terminus Technologies
Date: Thu, 7 Oct 2010 17:53:56 +0500 From: nazim.aghabayov@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
Hello Tihomir,
I've just updated the Mod_rad_auth wiki with installation instructions. Thanks a lot for the mod. I use it in production and it works just great!
Regards, Nazim
On 10/07/2010 01:48 PM, Tihomir Culjaga wrote:
On Thu, Oct 7, 2010 at 1:15 AM, Michael Collins<msc@freeswitch.org> wrote:
I'm afraid no such comprehensive documentation exists. Submissions to our wiki are most welcomed. This is all we have at the moment:
http://wiki.freeswitch.org/wiki/Mod_rad_auth
Be sure to install freeradius2 (server) and freeradius-client before trying to install mod_auth_rad.
-MC
correct,
Im the author of the module and im going to provide the documentation and how-to.
in brief, this module does radius auth (not accounting). It is based on freeradius-client library and as such this is the only dependency.
you can specify your own list of VSAs to be included in the packet along with the standard ones that are being used.
name: just a description value: direct input or variable pec: vendor ID (0 for default, 9 for cisco...) expr: 1 for channel variable, 2 for direct input (string) direction: in for radius-request, out for radius-response
Im not going to describe it here... its better i do it on the wiki itself...
T.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Fri, Oct 15, 2010 at 7:32 PM, Michael Collins <msc@freeswitch.org> wrote:
search to make sure that the libfreeradius-client.so.2 file exists somewhere on your system. If it does not then the freeradius-client install was not successful.
-MC
I was short on time .. sorry
so: 1. find your library ... updatedb && locate libfreeradius-client.s | grep lib by default it goes into /usr/local/lib/ but you never know. 2. create a link to the library cd /usr/local/freeswitch/lib/ ln -sf /usr/local/lib/libfreeradius-client.so.2 libfreeradius-client.so please make sure you input the correct path to the library in question. when you list your freeswitch/lib/ directory, you should have something like this: $ ls -l /usr/local/freeswitch/lib/ | grep radius lrwxrwxrwx 1 root root 40 Mar 7 2010 libfreeradius-client.so.2 -> /usr/local/lib/libfreeradius-client.so.2 the link should be there. Now you can load mod_rad_auth without any issues.
Dear Tihomir, Really appreciate your help but I still get the same error. I did the following steps as below and tried to run freeswitch but same issue. Please help. Thanks. [root@terminus mod_rad_auth]#[root@terminus mod_rad_auth]# updatedb && locate libfreeradius-client.so | grep lib/billing/installers/freeradius-client-1.1.6/lib/.libs/libfreeradius-client.so/billing/installers/freeradius-client-1.1.6/lib/.libs/libfreeradius-client.so.2/billing/installers/freeradius-client-1.1.6/lib/.libs/libfreeradius-client.so.2.0.0/usr/local/lib/libfreeradius-client.so/usr/local/lib/libfreeradius-client.so.2/usr/local/lib/libfreeradius-client.so.2.0.0[root@terminus mod_rad_auth]# cd /usr/local/freeswitch/lib/[root@terminus lib]# pwd/usr/local/freeswitch/lib[root@terminus lib]# lslibfreeswitch.a libfreeswitch.so.1 libjs.la libjs.so.1.0.6 libplc4.a libplds4.solibfreeswitch.la libfreeswitch.so.1.0.0 libjs.so libnspr4.a libplc4.so pkgconfiglibfreeswitch.so libjs.a libjs.so.1 libnspr4.so libplds4.a[root@terminus lib]# ln -sf /usr/local/lib/libfreeradius-client.so.2 libfreeradius-client.so[root@terminus lib]# lslibfreeradius-client.so libfreeswitch.so libjs.a libjs.so.1 libnspr4.so libplds4.alibfreeswitch.a libfreeswitch.so.1 libjs.la libjs.so.1.0.6 libplc4.a libplds4.solibfreeswitch.la libfreeswitch.so.1.0.0 libjs.so libnspr4.a libplc4.so pkgconfig[root@terminus lib]# ls -l /usr/local/freeswitch/lib/ | grep radiuslrwxrwxrwx 1 root root 40 Oct 19 18:00 libfreeradius-client.so -> /usr/local/lib/libfreeradius-client.so.2 Date: Fri, 15 Oct 2010 19:56:10 +0200 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA On Fri, Oct 15, 2010 at 7:32 PM, Michael Collins <msc@freeswitch.org> wrote: search to make sure that the libfreeradius-client.so.2 file exists somewhere on your system. If it does not then the freeradius-client install was not successful. -MC I was short on time .. sorry so: 1. find your library ... updatedb && locate libfreeradius-client.s | grep lib by default it goes into /usr/local/lib/ but you never know. 2. create a link to the library cd /usr/local/freeswitch/lib/ ln -sf /usr/local/lib/libfreeradius-client.so.2 libfreeradius-client.so please make sure you input the correct path to the library in question. when you list your freeswitch/lib/ directory, you should have something like this: $ ls -l /usr/local/freeswitch/lib/ | grep radius lrwxrwxrwx 1 root root 40 Mar 7 2010 libfreeradius-client.so.2 -> /usr/local/lib/libfreeradius-client.so.2 the link should be there. Now you can load mod_rad_auth without any issues. _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Dear Tihomir, Thanks a lot. It is loaded now but when I try to trigger auth in the dialplan, the module is not being called at all. I am using the example config as provided by you and Nazim. Scenerio is that I call from 1000 to 2000. In dialplan for destination_number 2000, I call the auth_function Application as said by Nazim but it is not being called at all. I have no clue why. Please help. Thanks. Regards---------------Abid Saleem Date: Tue, 19 Oct 2010 15:46:19 +0200 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA [root@terminus lib]# ln -sf /usr/local/lib/libfreeradius-client.so.2 libfreeradius-client.so try running this this: ln -sf /usr/local/lib/libfreeradius-client.so.2 libfreeradius-client.so.2 _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi! Could yu please check if module is actually loaded? freeswitch@internal> module_exists mod_rad_auth true On 10/23/2010 07:01 PM, Abid Saleem wrote:
Dear Tihomir, Thanks a lot. It is loaded now but when I try to trigger auth in the dialplan, the module is not being called at all. I am using the example config as provided by you and Nazim. Scenerio is that I call from 1000 to 2000. In dialplan for destination_number 2000, I call the auth_function Application as said by Nazim but it is not being called at all. I have no clue why. Please help. Thanks. Regards---------------Abid Saleem
Date: Tue, 19 Oct 2010 15:46:19 +0200 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
[root@terminus lib]# ln -sf /usr/local/lib/libfreeradius-client.so.2 libfreeradius-client.so
try running this this: ln -sf /usr/local/lib/libfreeradius-client.so.2 libfreeradius-client.so.2
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Sun, Oct 24, 2010 at 10:44 PM, Nazim Aghabayov <nazim.aghabayov@gmail.com
wrote:
Hi! Could yu please check if module is actually loaded?
freeswitch@internal> module_exists mod_rad_auth true
What do you mean by: "it is not being called at all" ? Does it throw an error or what? also, please can you paste your config (dialplan/rad_auth.conf) and yur lvl7 debug here ? if its too large use pastebin. T.
Dear Tihomir, Thanks for your email. Well I was able to load and test the module. It is sending the access request to Radius successfully but module is not caring about any Radius return code. It just routes the call whatever the response code is. For example when I call with an unauthenticated user and Radius returns return code =2, it still routes the call. Where and how can I define the actions based on appropriate return codes from Radius. Any examples are appreciated ALso when try to use the following config to auto hangup the call according to returned credit time, it just does not allow the call at all. Below is my dialplan/default.xml config file entry. Please help. <context name="default"> <extension name="Local_Extension"> <condition field="destination_number" expression="^(10[01][0-9])$"> <action application="set" data="dialed_extension=$1"/> <action application="export" data="dialed_extension=$1"/> <action application="log" data="INFO Before Auth "/> <action inline="true" application="set" data="CALLID=h323-conf-id=${uuid}"/> <action inline="true" application="set" data="SERVICENUM=h323-prompt-id=${destination_number}"/> <action inline="true" application="set" data="TRANSACTIONID=h323-ivr-out=transactionID:1234"/> <!-- <action inline="true" application="set" data="CALLINGNUMBER=${caller_id_number}"/> --> <action inline="true" application="set" data="CALLINGNUMBER=${caller_id_number}"/> <!--action inline="true" application="set" data="USERNAME="/--> <!-- <action inline="true" application="set" data="USERNAME=209354"/> --> <action inline="true" application="set" data="PASSWD="/> <action inline="true" application="set" data="DIALED_NUMBER=${destination_number}"/> <action application="sleep" data="2000"/> <action application="auth_function" data="in ${destination_number}, in ${USERNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="log" data="INFO AUTH_RESULT=${AUTH_RESULT}"/> <action application="log" data="INFO billing_model=${billing_model}"/> <action application="log" data="INFO credit_amount=${credit_amount}"/> <action application="log" data="INFO currency=${currency}"/> <action application="log" data="INFO preffered_lang=${preffered_lang}"/> <action application="log" data="INFO credit_time=${credit_time}"/> <action application="log" data="INFO h323_ivr_duration=${h323_ivr_duration}"/> <action application="log" data="INFO return_code=${return_code}"/> <!--action application="sched_hangup" data="+${credit_time:17:-1} ${Core-UUID}"/>--> <!--action application="execute_extension" data="AUTH XML default"/>--> <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> --> <action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/> <action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> <action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/> <action application="set" data="ringback=${us-ring}"/> <action application="set" data="transfer_ringback=$${hold_music}"/> <action application="set" data="call_timeout=30"/> <!-- <action application="set" data="sip_exclude_contact=${network_addr}"/> --> <action application="set" data="hangup_after_bridge=true"/> <!--<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/> --> <action application="set" data="continue_on_fail=true"/> <action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/> <action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/> <action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/> <!--<action application="export" data="nolocal:sip_secure_media=${user_data(${dialed_extension}@${domain_name} var sip_secure_media)}"/>--> <action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/> <action application="bridge" data="user/${dialed_extension}@${domain_name}"/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="voicemail" data="default ${domain_name} ${dialed_extension}"/> </condition> </extension> Best Regards----------------Abid Saleem Date: Mon, 25 Oct 2010 12:28:49 +0200 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA On Sun, Oct 24, 2010 at 10:44 PM, Nazim Aghabayov <nazim.aghabayov@gmail.com> wrote: Hi! Could yu please check if module is actually loaded? freeswitch@internal> module_exists mod_rad_auth true What do you mean by: "it is not being called at all" ? Does it throw an error or what? also, please can you paste your config (dialplan/rad_auth.conf) and yur lvl7 debug here ? if its too large use pastebin. T. _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi, Any help on the below please. I think FS is not getting any values in the variables like credit_amount and credit_time etc as I can see the following in level 7 debug. 2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:0, (billing_model)2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:519 Handle attribute: credit_amount2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:0, (credit_amount)2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY)2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:0, (PREFFERED_LANG)2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:519 Handle attribute: credit_time2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:0, (credit_time)2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:0, (H323-IVR-IN:DIRATION)2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:519 Handle attribute: radius_return_code2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:0, (radius_return_code)EXECUTE sofia/internal/1000@192.168.0.100 set(execute_on_answer=sched_hangup + /> <action application=)2010-11-02 18:12:01.722180 [DEBUG] mod_dptools.c:816 sofia/internal/1000@192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=]EXECUTE sofia/internal/1000@192.168.0.100 log(INFO billing_model=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 billing_model=EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_amount=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 credit_amount=EXECUTE sofia/internal/1000@192.168.0.100 log(INFO currency=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 currency=EXECUTE sofia/internal/1000@192.168.0.100 log(INFO preffered_lang=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 preffered_lang=EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_time=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 credit_time=EXECUTE sofia/internal/1000@192.168.0.100 log(INFO h323_ivr_duration=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 h323_ivr_duration=EXECUTE sofia/internal/1000@192.168.0.100 log(INFO return_code=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 return_code=EXECUTE sofia/internal/1000@192.168.0.100 bind_meta_app(1 b s execute_extension::dx XML features) From: abid_freeswitch@live.com To: freeswitch-users@lists.freeswitch.org Subject: RE: [Freeswitch-users] Radius AAA Date: Mon, 1 Nov 2010 19:09:33 +0500 Dear Tihomir, Thanks for your email. Well I was able to load and test the module. It is sending the access request to Radius successfully but module is not caring about any Radius return code. It just routes the call whatever the response code is. For example when I call with an unauthenticated user and Radius returns return code =2, it still routes the call. Where and how can I define the actions based on appropriate return codes from Radius. Any examples are appreciated ALso when try to use the following config to auto hangup the call according to returned credit time, it just does not allow the call at all. Below is my dialplan/default.xml config file entry. Please help. <context name="default"> <extension name="Local_Extension"> <condition field="destination_number" expression="^(10[01][0-9])$"> <action application="set" data="dialed_extension=$1"/> <action application="export" data="dialed_extension=$1"/> <action application="log" data="INFO Before Auth "/> <action inline="true" application="set" data="CALLID=h323-conf-id=${uuid}"/> <action inline="true" application="set" data="SERVICENUM=h323-prompt-id=${destination_number}"/> <action inline="true" application="set" data="TRANSACTIONID=h323-ivr-out=transactionID:1234"/> <!-- <action inline="true" application="set" data="CALLINGNUMBER=${caller_id_number}"/> --> <action inline="true" application="set" data="CALLINGNUMBER=${caller_id_number}"/> <!--action inline="true" application="set" data="USERNAME="/--> <!-- <action inline="true" application="set" data="USERNAME=209354"/> --> <action inline="true" application="set" data="PASSWD="/> <action inline="true" application="set" data="DIALED_NUMBER=${destination_number}"/> <action application="sleep" data="2000"/> <action application="auth_function" data="in ${destination_number}, in ${USERNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="log" data="INFO AUTH_RESULT=${AUTH_RESULT}"/> <action application="log" data="INFO billing_model=${billing_model}"/> <action application="log" data="INFO credit_amount=${credit_amount}"/> <action application="log" data="INFO currency=${currency}"/> <action application="log" data="INFO preffered_lang=${preffered_lang}"/> <action application="log" data="INFO credit_time=${credit_time}"/> <action application="log" data="INFO h323_ivr_duration=${h323_ivr_duration}"/> <action application="log" data="INFO return_code=${return_code}"/> <!--action application="sched_hangup" data="+${credit_time:17:-1} ${Core-UUID}"/>--> <!--action application="execute_extension" data="AUTH XML default"/>--> <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> --> <action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/> <action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> <action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/> <action application="set" data="ringback=${us-ring}"/> <action application="set" data="transfer_ringback=$${hold_music}"/> <action application="set" data="call_timeout=30"/> <!-- <action application="set" data="sip_exclude_contact=${network_addr}"/> --> <action application="set" data="hangup_after_bridge=true"/> <!--<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/> --> <action application="set" data="continue_on_fail=true"/> <action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/> <action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/> <action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/> <!--<action application="export" data="nolocal:sip_secure_media=${user_data(${dialed_extension}@${domain_name} var sip_secure_media)}"/>--> <action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/> <action application="bridge" data="user/${dialed_extension}@${domain_name}"/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="voicemail" data="default ${domain_name} ${dialed_extension}"/> </condition> </extension> Best Regards----------------Abid Saleem Date: Mon, 25 Oct 2010 12:28:49 +0200 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA On Sun, Oct 24, 2010 at 10:44 PM, Nazim Aghabayov <nazim.aghabayov@gmail.com> wrote: Hi! Could yu please check if module is actually loaded? freeswitch@internal> module_exists mod_rad_auth true What do you mean by: "it is not being called at all" ? Does it throw an error or what? also, please can you paste your config (dialplan/rad_auth.conf) and yur lvl7 debug here ? if its too large use pastebin. T. _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
hello, auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly. here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN. <extension name="ANIorPIN"> <condition field="destination_number" expression="^ANIorPIN$"> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/> <action application="execute_extension" data="CheckANI XML NXIVR"/> </condition> </extension> <extension name="CheckANI"> <condition field="destination_number" expression="^CheckANI$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/> <action application="execute_extension" data="EnterPIN XML NXIVR"/> <action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/> <anti-action inline="true" application="export" data="PASSWD=1234"/> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/> </condition> </extension> <extension name="EnterPIN"> <condition field="destination_number" expression="^EnterPIN$"> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/> <action application="set" data="credit_amount=h323-credit-amount=0"/> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/> <action application="execute_extension" data="ParsePIN XML NXIVR"/> <action application="log" data="INFO PIN=${PIN}"/> <action application="log" data="INFO UNAME=${UNAME}"/> <action application="log" data="INFO PASSWD=${PASSWD}"/> <action inline="true" application="export" data="DIALED_NUMBER="""/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="auto_hunt=true"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckPIN XML NXIVR"/> </condition> </extension> <extension name="GetDstNum"> <condition field="destination_number" expression="^GetDstNum$"> <action application="set" data="bind_meta_key=#"/> <action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/> <action application="execute_extension" data="TranslateLocal XML NXIVR"/> <action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/> <action application="execute_extension" data="ParseDN XML NXIVR"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckDstNum XML NXIVR"/> </condition> </extension>
Hi, Thanks. This is good for Calling Card type IVR application but I am using it for my SIP UA for authorization only where authorization is required when I make a call from extension 1000. 1000 is a registered user in billing. Can you please provide a simple example with this ANI Authorization scenerio. Also I am getting the following in debug which means radius response values are not being populated in credit_amount, credit_time and return_code attributes. Please help me. 2010-11-04 18:09:53.396212 [DEBUG] mod_rad_auth.c:491 sending radius packet ...2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:497 RADIUS Authentication OK2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE)EXECUTE sofia/internal/1000@192.168.0.100 set(execute_on_answer=sched_hangup + /> <action application=)2010-11-04 18:09:54.571999 [DEBUG] mod_dptools.c:816 sofia/internal/1000@192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=]EXECUTE sofia/internal/1000@192.168.0.100 log(INFO biling_model=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 biling_model=EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_amount=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_amount=EXECUTE sofia/internal/1000@192.168.0.100 log(INFO currency=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 currency=EXECUTE sofia/internal/1000@192.168.0.100 log(INFO preffered_lang=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 preffered_lang=EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_time=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_time= Date: Thu, 4 Nov 2010 00:10:28 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA hello, auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly. here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN. <extension name="ANIorPIN"> <condition field="destination_number" expression="^ANIorPIN$"> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/> <action application="execute_extension" data="CheckANI XML NXIVR"/> </condition> </extension> <extension name="CheckANI"> <condition field="destination_number" expression="^CheckANI$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/> <action application="execute_extension" data="EnterPIN XML NXIVR"/> <action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/> <anti-action inline="true" application="export" data="PASSWD=1234"/> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/> </condition> </extension> <extension name="EnterPIN"> <condition field="destination_number" expression="^EnterPIN$"> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/> <action application="set" data="credit_amount=h323-credit-amount=0"/> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/> <action application="execute_extension" data="ParsePIN XML NXIVR"/> <action application="log" data="INFO PIN=${PIN}"/> <action application="log" data="INFO UNAME=${UNAME}"/> <action application="log" data="INFO PASSWD=${PASSWD}"/> <action inline="true" application="export" data="DIALED_NUMBER="""/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="auto_hunt=true"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckPIN XML NXIVR"/> </condition> </extension> <extension name="GetDstNum"> <condition field="destination_number" expression="^GetDstNum$"> <action application="set" data="bind_meta_key=#"/> <action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/> <action application="execute_extension" data="TranslateLocal XML NXIVR"/> <action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/> <action application="execute_extension" data="ParseDN XML NXIVR"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckDstNum XML NXIVR"/> </condition> </extension> _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
as i said you need to evaluate the returning value from app_function and act accordingly...if the result is "OK" it measn authorizes if its "NOK" it means its failed. Im not going into your application and how you are doing it... you have an example on how to do it in my prev e-mail. you cannot populate variables that doesn't exist in the returning radius messages: No found out attribute id: 109, pec:9 No found out attribute id: 101, pec:9 No found out attribute id: 110, pec:9 and so on ... simply, Access Accept messages doesn't have these attributes that you are trying to map into channel variables. On Thu, Nov 4, 2010 at 2:35 PM, Abid Saleem <abid_freeswitch@live.com>wrote:
Hi,
Thanks. This is good for Calling Card type IVR application but I am using it for my SIP UA for authorization only where authorization is required when I make a call from extension 1000. 1000 is a registered user in billing. Can you please provide a simple example with this ANI Authorization scenerio. Also I am getting the following in debug which means radius response values are not being populated in credit_amount, credit_time and return_code attributes. Please help me.
2010-11-04 18:09:53.396212 [DEBUG] mod_rad_auth.c:491 sending radius packet ... 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:497 RADIUS Authentication OK 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE) EXECUTE sofia/internal/1000@192.168.0.100set(execute_on_answer=sched_hangup + /> <action application=) 2010-11-04 18:09:54.571999 [DEBUG] mod_dptools.c:816 sofia/internal/ 1000@192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=] EXECUTE sofia/internal/1000@192.168.0.100 log(INFO biling_model=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 biling_model= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_amount=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_amount= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO currency=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 currency= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO preffered_lang=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 preffered_lang= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_time=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_time=
------------------------------ Date: Thu, 4 Nov 2010 00:10:28 +0100
From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
hello,
auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly.
here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN.
<extension name="ANIorPIN"> <condition field="destination_number" expression="^ANIorPIN$"> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/> <action application="execute_extension" data="CheckANI XML NXIVR"/> </condition> </extension>
<extension name="CheckANI"> <condition field="destination_number" expression="^CheckANI$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/> <action application="execute_extension" data="EnterPIN XML NXIVR"/>
<action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/> <anti-action inline="true" application="export" data="PASSWD=1234"/> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/> </condition> </extension>
<extension name="EnterPIN"> <condition field="destination_number" expression="^EnterPIN$"> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/> <action application="set" data="credit_amount=h323-credit-amount=0"/> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/> <action application="execute_extension" data="ParsePIN XML NXIVR"/>
<action application="log" data="INFO PIN=${PIN}"/> <action application="log" data="INFO UNAME=${UNAME}"/> <action application="log" data="INFO PASSWD=${PASSWD}"/>
<action inline="true" application="export" data="DIALED_NUMBER="""/>
<action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="auto_hunt=true"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckPIN XML NXIVR"/> </condition> </extension>
<extension name="GetDstNum"> <condition field="destination_number" expression="^GetDstNum$"> <action application="set" data="bind_meta_key=#"/> <action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/>
<action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/> <action application="execute_extension" data="TranslateLocal XML NXIVR"/> <action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/> <action application="execute_extension" data="ParseDN XML NXIVR"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckDstNum XML NXIVR"/> </condition> </extension>
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
This is what I am saying that these variables do exist in returning radius messages. My Radius response is as below for reference Sending Access-Accept of id 224 to 119.158.138.83 port 1027 h323-credit-amount := "h323-credit-amount=5" h323-return-code := "h323-return-code=0" h323-credit-time := "h323-credit-time=120"Finished request 0. Please help me with this. Thanks. Regards------------Abid Saleem Date: Thu, 4 Nov 2010 15:14:57 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA as i said you need to evaluate the returning value from app_function and act accordingly...if the result is "OK" it measn authorizes if its "NOK" it means its failed. Im not going into your application and how you are doing it... you have an example on how to do it in my prev e-mail. you cannot populate variables that doesn't exist in the returning radius messages: No found out attribute id: 109, pec:9 No found out attribute id: 101, pec:9 No found out attribute id: 110, pec:9 and so on ... simply, Access Accept messages doesn't have these attributes that you are trying to map into channel variables. On Thu, Nov 4, 2010 at 2:35 PM, Abid Saleem <abid_freeswitch@live.com> wrote: Hi, Thanks. This is good for Calling Card type IVR application but I am using it for my SIP UA for authorization only where authorization is required when I make a call from extension 1000. 1000 is a registered user in billing. Can you please provide a simple example with this ANI Authorization scenerio. Also I am getting the following in debug which means radius response values are not being populated in credit_amount, credit_time and return_code attributes. Please help me. 2010-11-04 18:09:53.396212 [DEBUG] mod_rad_auth.c:491 sending radius packet ...2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:497 RADIUS Authentication OK2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE)EXECUTE sofia/internal/1000@192.168.0.100 set(execute_on_answer=sched_hangup + /> <action application=) 2010-11-04 18:09:54.571999 [DEBUG] mod_dptools.c:816 sofia/internal/1000@192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=] EXECUTE sofia/internal/1000@192.168.0.100 log(INFO biling_model=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 biling_model= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_amount=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_amount= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO currency=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 currency= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO preffered_lang=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 preffered_lang= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_time=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_time= Date: Thu, 4 Nov 2010 00:10:28 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA hello, auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly. here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN. <extension name="ANIorPIN"> <condition field="destination_number" expression="^ANIorPIN$"> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/> <action application="execute_extension" data="CheckANI XML NXIVR"/> </condition> </extension> <extension name="CheckANI"> <condition field="destination_number" expression="^CheckANI$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/> <action application="execute_extension" data="EnterPIN XML NXIVR"/> <action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/> <anti-action inline="true" application="export" data="PASSWD=1234"/> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/> </condition> </extension> <extension name="EnterPIN"> <condition field="destination_number" expression="^EnterPIN$"> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/> <action application="set" data="credit_amount=h323-credit-amount=0"/> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/> <action application="execute_extension" data="ParsePIN XML NXIVR"/> <action application="log" data="INFO PIN=${PIN}"/> <action application="log" data="INFO UNAME=${UNAME}"/> <action application="log" data="INFO PASSWD=${PASSWD}"/> <action inline="true" application="export" data="DIALED_NUMBER="""/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="auto_hunt=true"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckPIN XML NXIVR"/> </condition> </extension> <extension name="GetDstNum"> <condition field="destination_number" expression="^GetDstNum$"> <action application="set" data="bind_meta_key=#"/> <action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/> <action application="execute_extension" data="TranslateLocal XML NXIVR"/> <action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/> <action application="execute_extension" data="ParseDN XML NXIVR"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckDstNum XML NXIVR"/> </condition> </extension> _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Tihomir and All, Could anyone please help me with this mod_rad_auth problem. I need help badly. Thanks. Regards=========Abid Saleem From: abid_freeswitch@live.com To: freeswitch-users@lists.freeswitch.org Date: Fri, 5 Nov 2010 09:57:23 +0500 Subject: Re: [Freeswitch-users] Radius AAA This is what I am saying that these variables do exist in returning radius messages. My Radius response is as below for reference Sending Access-Accept of id 224 to 119.158.138.83 port 1027 h323-credit-amount := "h323-credit-amount=5" h323-return-code := "h323-return-code=0" h323-credit-time := "h323-credit-time=120"Finished request 0. Please help me with this. Thanks. Regards------------Abid Saleem Date: Thu, 4 Nov 2010 15:14:57 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA as i said you need to evaluate the returning value from app_function and act accordingly...if the result is "OK" it measn authorizes if its "NOK" it means its failed. Im not going into your application and how you are doing it... you have an example on how to do it in my prev e-mail. you cannot populate variables that doesn't exist in the returning radius messages: No found out attribute id: 109, pec:9 No found out attribute id: 101, pec:9 No found out attribute id: 110, pec:9 and so on ... simply, Access Accept messages doesn't have these attributes that you are trying to map into channel variables. On Thu, Nov 4, 2010 at 2:35 PM, Abid Saleem <abid_freeswitch@live.com> wrote: Hi, Thanks. This is good for Calling Card type IVR application but I am using it for my SIP UA for authorization only where authorization is required when I make a call from extension 1000. 1000 is a registered user in billing. Can you please provide a simple example with this ANI Authorization scenerio. Also I am getting the following in debug which means radius response values are not being populated in credit_amount, credit_time and return_code attributes. Please help me. 2010-11-04 18:09:53.396212 [DEBUG] mod_rad_auth.c:491 sending radius packet ...2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:497 RADIUS Authentication OK2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE)EXECUTE sofia/internal/1000@192.168.0.100 set(execute_on_answer=sched_hangup + /> <action application=) 2010-11-04 18:09:54.571999 [DEBUG] mod_dptools.c:816 sofia/internal/1000@192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=] EXECUTE sofia/internal/1000@192.168.0.100 log(INFO biling_model=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 biling_model= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_amount=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_amount= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO currency=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 currency= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO preffered_lang=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 preffered_lang= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_time=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_time= Date: Thu, 4 Nov 2010 00:10:28 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA hello, auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly. here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN. <extension name="ANIorPIN"> <condition field="destination_number" expression="^ANIorPIN$"> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/> <action application="execute_extension" data="CheckANI XML NXIVR"/> </condition> </extension> <extension name="CheckANI"> <condition field="destination_number" expression="^CheckANI$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/> <action application="execute_extension" data="EnterPIN XML NXIVR"/> <action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/> <anti-action inline="true" application="export" data="PASSWD=1234"/> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/> </condition> </extension> <extension name="EnterPIN"> <condition field="destination_number" expression="^EnterPIN$"> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/> <action application="set" data="credit_amount=h323-credit-amount=0"/> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/> <action application="execute_extension" data="ParsePIN XML NXIVR"/> <action application="log" data="INFO PIN=${PIN}"/> <action application="log" data="INFO UNAME=${UNAME}"/> <action application="log" data="INFO PASSWD=${PASSWD}"/> <action inline="true" application="export" data="DIALED_NUMBER="""/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="auto_hunt=true"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckPIN XML NXIVR"/> </condition> </extension> <extension name="GetDstNum"> <condition field="destination_number" expression="^GetDstNum$"> <action application="set" data="bind_meta_key=#"/> <action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/> <action application="execute_extension" data="TranslateLocal XML NXIVR"/> <action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/> <action application="execute_extension" data="ParseDN XML NXIVR"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckDstNum XML NXIVR"/> </condition> </extension> _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
can you provide a wireshark sniff ? On Fri, Nov 5, 2010 at 5:57 AM, Abid Saleem <abid_freeswitch@live.com>wrote:
This is what I am saying that these variables do exist in returning radius messages. My Radius response is as below for reference
Sending Access-Accept of id 224 to 119.158.138.83 port 1027 h323-credit-amount := "h323-credit-amount=5" h323-return-code := "h323-return-code=0" h323-credit-time := "h323-credit-time=120" Finished request 0.
Please help me with this. Thanks.
Regards ------------ Abid Saleem
------------------------------ Date: Thu, 4 Nov 2010 15:14:57 +0100
From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
as i said you need to evaluate the returning value from app_function and act accordingly...if the result is "OK" it measn authorizes if its "NOK" it means its failed. Im not going into your application and how you are doing it... you have an example on how to do it in my prev e-mail.
you cannot populate variables that doesn't exist in the returning radius messages:
No found out attribute id: 109, pec:9 No found out attribute id: 101, pec:9 No found out attribute id: 110, pec:9
and so on ... simply, Access Accept messages doesn't have these attributes that you are trying to map into channel variables.
On Thu, Nov 4, 2010 at 2:35 PM, Abid Saleem <abid_freeswitch@live.com>wrote:
Hi,
Thanks. This is good for Calling Card type IVR application but I am using it for my SIP UA for authorization only where authorization is required when I make a call from extension 1000. 1000 is a registered user in billing. Can you please provide a simple example with this ANI Authorization scenerio. Also I am getting the following in debug which means radius response values are not being populated in credit_amount, credit_time and return_code attributes. Please help me.
2010-11-04 18:09:53.396212 [DEBUG] mod_rad_auth.c:491 sending radius packet ... 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:497 RADIUS Authentication OK 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE) EXECUTE sofia/internal/1000@192.168.0.100set(execute_on_answer=sched_hangup + /> <action application=) 2010-11-04 18:09:54.571999 [DEBUG] mod_dptools.c:816 sofia/internal/ 1000@192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=] EXECUTE sofia/internal/1000@192.168.0.100 log(INFO biling_model=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 biling_model= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_amount=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_amount= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO currency=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 currency= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO preffered_lang=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 preffered_lang= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_time=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_time=
------------------------------ Date: Thu, 4 Nov 2010 00:10:28 +0100
From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
hello,
auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly.
here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN.
<extension name="ANIorPIN"> <condition field="destination_number" expression="^ANIorPIN$"> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/> <action application="execute_extension" data="CheckANI XML NXIVR"/> </condition> </extension>
<extension name="CheckANI"> <condition field="destination_number" expression="^CheckANI$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/> <action application="execute_extension" data="EnterPIN XML NXIVR"/>
<action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/> <anti-action inline="true" application="export" data="PASSWD=1234"/> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/> </condition> </extension>
<extension name="EnterPIN"> <condition field="destination_number" expression="^EnterPIN$"> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/> <action application="set" data="credit_amount=h323-credit-amount=0"/> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/> <action application="execute_extension" data="ParsePIN XML NXIVR"/>
<action application="log" data="INFO PIN=${PIN}"/> <action application="log" data="INFO UNAME=${UNAME}"/> <action application="log" data="INFO PASSWD=${PASSWD}"/>
<action inline="true" application="export" data="DIALED_NUMBER="""/>
<action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="auto_hunt=true"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckPIN XML NXIVR"/> </condition> </extension>
<extension name="GetDstNum"> <condition field="destination_number" expression="^GetDstNum$"> <action application="set" data="bind_meta_key=#"/> <action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/>
<action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/> <action application="execute_extension" data="TranslateLocal XML NXIVR"/> <action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/> <action application="execute_extension" data="ParseDN XML NXIVR"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckDstNum XML NXIVR"/> </condition> </extension>
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi, Please find the ethereal capture attached. Please let me know should you need additional information. Thanks. Regards------------Abid Saleem Date: Mon, 8 Nov 2010 09:37:01 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA can you provide a wireshark sniff ? On Fri, Nov 5, 2010 at 5:57 AM, Abid Saleem <abid_freeswitch@live.com> wrote: This is what I am saying that these variables do exist in returning radius messages. My Radius response is as below for reference Sending Access-Accept of id 224 to 119.158.138.83 port 1027 h323-credit-amount := "h323-credit-amount=5" h323-return-code := "h323-return-code=0" h323-credit-time := "h323-credit-time=120"Finished request 0. Please help me with this. Thanks. Regards------------Abid Saleem Date: Thu, 4 Nov 2010 15:14:57 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA as i said you need to evaluate the returning value from app_function and act accordingly...if the result is "OK" it measn authorizes if its "NOK" it means its failed. Im not going into your application and how you are doing it... you have an example on how to do it in my prev e-mail. you cannot populate variables that doesn't exist in the returning radius messages: No found out attribute id: 109, pec:9 No found out attribute id: 101, pec:9 No found out attribute id: 110, pec:9 and so on ... simply, Access Accept messages doesn't have these attributes that you are trying to map into channel variables. On Thu, Nov 4, 2010 at 2:35 PM, Abid Saleem <abid_freeswitch@live.com> wrote: Hi, Thanks. This is good for Calling Card type IVR application but I am using it for my SIP UA for authorization only where authorization is required when I make a call from extension 1000. 1000 is a registered user in billing. Can you please provide a simple example with this ANI Authorization scenerio. Also I am getting the following in debug which means radius response values are not being populated in credit_amount, credit_time and return_code attributes. Please help me. 2010-11-04 18:09:53.396212 [DEBUG] mod_rad_auth.c:491 sending radius packet ...2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:497 RADIUS Authentication OK2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE)EXECUTE sofia/internal/1000@192.168.0.100 set(execute_on_answer=sched_hangup + /> <action application=) 2010-11-04 18:09:54.571999 [DEBUG] mod_dptools.c:816 sofia/internal/1000@192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=] EXECUTE sofia/internal/1000@192.168.0.100 log(INFO biling_model=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 biling_model= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_amount=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_amount= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO currency=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 currency= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO preffered_lang=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 preffered_lang= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_time=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_time= Date: Thu, 4 Nov 2010 00:10:28 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA hello, auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly. here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN. <extension name="ANIorPIN"> <condition field="destination_number" expression="^ANIorPIN$"> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/> <action application="execute_extension" data="CheckANI XML NXIVR"/> </condition> </extension> <extension name="CheckANI"> <condition field="destination_number" expression="^CheckANI$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/> <action application="execute_extension" data="EnterPIN XML NXIVR"/> <action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/> <anti-action inline="true" application="export" data="PASSWD=1234"/> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/> </condition> </extension> <extension name="EnterPIN"> <condition field="destination_number" expression="^EnterPIN$"> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/> <action application="set" data="credit_amount=h323-credit-amount=0"/> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/> <action application="execute_extension" data="ParsePIN XML NXIVR"/> <action application="log" data="INFO PIN=${PIN}"/> <action application="log" data="INFO UNAME=${UNAME}"/> <action application="log" data="INFO PASSWD=${PASSWD}"/> <action inline="true" application="export" data="DIALED_NUMBER="""/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="auto_hunt=true"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckPIN XML NXIVR"/> </condition> </extension> <extension name="GetDstNum"> <condition field="destination_number" expression="^GetDstNum$"> <action application="set" data="bind_meta_key=#"/> <action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/> <action application="execute_extension" data="TranslateLocal XML NXIVR"/> <action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/> <action application="execute_extension" data="ParseDN XML NXIVR"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckDstNum XML NXIVR"/> </condition> </extension> _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
please paste your rad_auth.conf.xml On Mon, Nov 8, 2010 at 10:41 AM, Abid Saleem <abid_freeswitch@live.com>wrote:
Hi,
Please find the ethereal capture attached. Please let me know should you need additional information. Thanks.
Regards ------------ Abid Saleem
------------------------------ Date: Mon, 8 Nov 2010 09:37:01 +0100
From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
can you provide a wireshark sniff ?
On Fri, Nov 5, 2010 at 5:57 AM, Abid Saleem <abid_freeswitch@live.com>wrote:
This is what I am saying that these variables do exist in returning radius messages. My Radius response is as below for reference
Sending Access-Accept of id 224 to 119.158.138.83 port 1027 h323-credit-amount := "h323-credit-amount=5" h323-return-code := "h323-return-code=0" h323-credit-time := "h323-credit-time=120" Finished request 0.
Please help me with this. Thanks.
Regards ------------ Abid Saleem
------------------------------ Date: Thu, 4 Nov 2010 15:14:57 +0100
From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
as i said you need to evaluate the returning value from app_function and act accordingly...if the result is "OK" it measn authorizes if its "NOK" it means its failed. Im not going into your application and how you are doing it... you have an example on how to do it in my prev e-mail.
you cannot populate variables that doesn't exist in the returning radius messages:
No found out attribute id: 109, pec:9 No found out attribute id: 101, pec:9 No found out attribute id: 110, pec:9
and so on ... simply, Access Accept messages doesn't have these attributes that you are trying to map into channel variables.
On Thu, Nov 4, 2010 at 2:35 PM, Abid Saleem <abid_freeswitch@live.com>wrote:
Hi,
Thanks. This is good for Calling Card type IVR application but I am using it for my SIP UA for authorization only where authorization is required when I make a call from extension 1000. 1000 is a registered user in billing. Can you please provide a simple example with this ANI Authorization scenerio. Also I am getting the following in debug which means radius response values are not being populated in credit_amount, credit_time and return_code attributes. Please help me.
2010-11-04 18:09:53.396212 [DEBUG] mod_rad_auth.c:491 sending radius packet ... 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:497 RADIUS Authentication OK 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE) EXECUTE sofia/internal/1000@192.168.0.100set(execute_on_answer=sched_hangup + /> <action application=) 2010-11-04 18:09:54.571999 [DEBUG] mod_dptools.c:816 sofia/internal/ 1000@192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=] EXECUTE sofia/internal/1000@192.168.0.100 log(INFO biling_model=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 biling_model= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_amount=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_amount= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO currency=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 currency= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO preffered_lang=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 preffered_lang= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_time=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_time=
------------------------------ Date: Thu, 4 Nov 2010 00:10:28 +0100
From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
hello,
auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly.
here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN.
<extension name="ANIorPIN"> <condition field="destination_number" expression="^ANIorPIN$"> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/> <action application="execute_extension" data="CheckANI XML NXIVR"/> </condition> </extension>
<extension name="CheckANI"> <condition field="destination_number" expression="^CheckANI$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/> <action application="execute_extension" data="EnterPIN XML NXIVR"/>
<action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/> <anti-action inline="true" application="export" data="PASSWD=1234"/> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/> </condition> </extension>
<extension name="EnterPIN"> <condition field="destination_number" expression="^EnterPIN$"> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/> <action application="set" data="credit_amount=h323-credit-amount=0"/> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/> <action application="execute_extension" data="ParsePIN XML NXIVR"/>
<action application="log" data="INFO PIN=${PIN}"/> <action application="log" data="INFO UNAME=${UNAME}"/> <action application="log" data="INFO PASSWD=${PASSWD}"/>
<action inline="true" application="export" data="DIALED_NUMBER="""/>
<action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="auto_hunt=true"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckPIN XML NXIVR"/> </condition> </extension>
<extension name="GetDstNum"> <condition field="destination_number" expression="^GetDstNum$"> <action application="set" data="bind_meta_key=#"/> <action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/>
<action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/> <action application="execute_extension" data="TranslateLocal XML NXIVR"/> <action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/> <action application="execute_extension" data="ParseDN XML NXIVR"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckDstNum XML NXIVR"/> </condition> </extension>
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
by looking at Access-Accept message you wil only need this: <param name="CREDIT_AMOUNT" id="101" value="credit_amount" pec="9" expr="0" direction="out"/> <param name="CREDIT_TIME" id="102" value="credit_time" pec="9" expr="0" direction="out"/> <param name="RADIUS_RETURN_CODE" id="103" value="return_code" pec="9" expr="0" direction="out"/> than you will have 3 channel variables set: - credit_amount - credit_time - return_code you need to regexp it to extract values you need. in your prev e-mail you can see in the logs that the mod_rad_auth is complaining about the missing attributes .. and they are actually not there... but you got mapped the attributes present (101, 102, 103) in Access-Accept message. 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE) hope you will manage it ... On Mon, Nov 8, 2010 at 11:15 AM, Tihomir Culjaga <tculjaga@gmail.com> wrote:
please paste your rad_auth.conf.xml
On Mon, Nov 8, 2010 at 10:41 AM, Abid Saleem <abid_freeswitch@live.com>wrote:
Hi,
Please find the ethereal capture attached. Please let me know should you need additional information. Thanks.
Regards ------------ Abid Saleem
------------------------------ Date: Mon, 8 Nov 2010 09:37:01 +0100
From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
can you provide a wireshark sniff ?
On Fri, Nov 5, 2010 at 5:57 AM, Abid Saleem <abid_freeswitch@live.com>wrote:
This is what I am saying that these variables do exist in returning radius messages. My Radius response is as below for reference
Sending Access-Accept of id 224 to 119.158.138.83 port 1027 h323-credit-amount := "h323-credit-amount=5" h323-return-code := "h323-return-code=0" h323-credit-time := "h323-credit-time=120" Finished request 0.
Please help me with this. Thanks.
Regards ------------ Abid Saleem
------------------------------ Date: Thu, 4 Nov 2010 15:14:57 +0100
From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
as i said you need to evaluate the returning value from app_function and act accordingly...if the result is "OK" it measn authorizes if its "NOK" it means its failed. Im not going into your application and how you are doing it... you have an example on how to do it in my prev e-mail.
you cannot populate variables that doesn't exist in the returning radius messages:
No found out attribute id: 109, pec:9 No found out attribute id: 101, pec:9 No found out attribute id: 110, pec:9
and so on ... simply, Access Accept messages doesn't have these attributes that you are trying to map into channel variables.
On Thu, Nov 4, 2010 at 2:35 PM, Abid Saleem <abid_freeswitch@live.com>wrote:
Hi,
Thanks. This is good for Calling Card type IVR application but I am using it for my SIP UA for authorization only where authorization is required when I make a call from extension 1000. 1000 is a registered user in billing. Can you please provide a simple example with this ANI Authorization scenerio. Also I am getting the following in debug which means radius response values are not being populated in credit_amount, credit_time and return_code attributes. Please help me.
2010-11-04 18:09:53.396212 [DEBUG] mod_rad_auth.c:491 sending radius packet ... 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:497 RADIUS Authentication OK 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE) EXECUTE sofia/internal/1000@192.168.0.100set(execute_on_answer=sched_hangup + /> <action application=) 2010-11-04 18:09:54.571999 [DEBUG] mod_dptools.c:816 sofia/internal/ 1000@192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=] EXECUTE sofia/internal/1000@192.168.0.100 log(INFO biling_model=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 biling_model= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_amount=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_amount= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO currency=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 currency= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO preffered_lang=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 preffered_lang= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_time=) 2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_time=
------------------------------ Date: Thu, 4 Nov 2010 00:10:28 +0100
From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
hello,
auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly.
here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN.
<extension name="ANIorPIN"> <condition field="destination_number" expression="^ANIorPIN$"> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/> <action application="execute_extension" data="CheckANI XML NXIVR"/> </condition> </extension>
<extension name="CheckANI"> <condition field="destination_number" expression="^CheckANI$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/> <action application="execute_extension" data="EnterPIN XML NXIVR"/>
<action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/> <anti-action inline="true" application="export" data="PASSWD=1234"/> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/> </condition> </extension>
<extension name="EnterPIN"> <condition field="destination_number" expression="^EnterPIN$"> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/> <action application="set" data="credit_amount=h323-credit-amount=0"/> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/> <action application="execute_extension" data="ParsePIN XML NXIVR"/>
<action application="log" data="INFO PIN=${PIN}"/> <action application="log" data="INFO UNAME=${UNAME}"/> <action application="log" data="INFO PASSWD=${PASSWD}"/>
<action inline="true" application="export" data="DIALED_NUMBER="""/>
<action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="auto_hunt=true"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckPIN XML NXIVR"/> </condition> </extension>
<extension name="GetDstNum"> <condition field="destination_number" expression="^GetDstNum$"> <action application="set" data="bind_meta_key=#"/> <action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/>
<action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/> <action application="execute_extension" data="TranslateLocal XML NXIVR"/> <action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/> <action application="execute_extension" data="ParseDN XML NXIVR"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckDstNum XML NXIVR"/> </condition> </extension>
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-usersUNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Tihomir, I am sorry, I did not understand what you mean. Can you please direct me exactly what you want me to do. Regards-----------Abid Saleem Date: Mon, 8 Nov 2010 11:29:01 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA by looking at Access-Accept message you wil only need this: <param name="CREDIT_AMOUNT" id="101" value="credit_amount" pec="9" expr="0" direction="out"/> <param name="CREDIT_TIME" id="102" value="credit_time" pec="9" expr="0" direction="out"/> <param name="RADIUS_RETURN_CODE" id="103" value="return_code" pec="9" expr="0" direction="out"/> than you will have 3 channel variables set: credit_amountcredit_timereturn_code you need to regexp it to extract values you need. in your prev e-mail you can see in the logs that the mod_rad_auth is complaining about the missing attributes .. and they are actually not there... but you got mapped the attributes present (101, 102, 103) in Access-Accept message. 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE) hope you will manage it ... On Mon, Nov 8, 2010 at 11:15 AM, Tihomir Culjaga <tculjaga@gmail.com> wrote: please paste your rad_auth.conf.xml On Mon, Nov 8, 2010 at 10:41 AM, Abid Saleem <abid_freeswitch@live.com> wrote: Hi, Please find the ethereal capture attached. Please let me know should you need additional information. Thanks. Regards------------Abid Saleem Date: Mon, 8 Nov 2010 09:37:01 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA can you provide a wireshark sniff ? On Fri, Nov 5, 2010 at 5:57 AM, Abid Saleem <abid_freeswitch@live.com> wrote: This is what I am saying that these variables do exist in returning radius messages. My Radius response is as below for reference Sending Access-Accept of id 224 to 119.158.138.83 port 1027 h323-credit-amount := "h323-credit-amount=5" h323-return-code := "h323-return-code=0" h323-credit-time := "h323-credit-time=120"Finished request 0. Please help me with this. Thanks. Regards------------Abid Saleem Date: Thu, 4 Nov 2010 15:14:57 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA as i said you need to evaluate the returning value from app_function and act accordingly...if the result is "OK" it measn authorizes if its "NOK" it means its failed. Im not going into your application and how you are doing it... you have an example on how to do it in my prev e-mail. you cannot populate variables that doesn't exist in the returning radius messages: No found out attribute id: 109, pec:9 No found out attribute id: 101, pec:9 No found out attribute id: 110, pec:9 and so on ... simply, Access Accept messages doesn't have these attributes that you are trying to map into channel variables. On Thu, Nov 4, 2010 at 2:35 PM, Abid Saleem <abid_freeswitch@live.com> wrote: Hi, Thanks. This is good for Calling Card type IVR application but I am using it for my SIP UA for authorization only where authorization is required when I make a call from extension 1000. 1000 is a registered user in billing. Can you please provide a simple example with this ANI Authorization scenerio. Also I am getting the following in debug which means radius response values are not being populated in credit_amount, credit_time and return_code attributes. Please help me. 2010-11-04 18:09:53.396212 [DEBUG] mod_rad_auth.c:491 sending radius packet ...2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:497 RADIUS Authentication OK2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE)EXECUTE sofia/internal/1000@192.168.0.100 set(execute_on_answer=sched_hangup + /> <action application=) 2010-11-04 18:09:54.571999 [DEBUG] mod_dptools.c:816 sofia/internal/1000@192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=] EXECUTE sofia/internal/1000@192.168.0.100 log(INFO biling_model=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 biling_model= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_amount=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_amount= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO currency=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 currency= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO preffered_lang=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 preffered_lang= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_time=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_time= Date: Thu, 4 Nov 2010 00:10:28 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA hello, auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly. here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN. <extension name="ANIorPIN"> <condition field="destination_number" expression="^ANIorPIN$"> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/> <action application="execute_extension" data="CheckANI XML NXIVR"/> </condition> </extension> <extension name="CheckANI"> <condition field="destination_number" expression="^CheckANI$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/> <action application="execute_extension" data="EnterPIN XML NXIVR"/> <action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/> <anti-action inline="true" application="export" data="PASSWD=1234"/> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/> </condition> </extension> <extension name="EnterPIN"> <condition field="destination_number" expression="^EnterPIN$"> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/> <action application="set" data="credit_amount=h323-credit-amount=0"/> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/> <action application="execute_extension" data="ParsePIN XML NXIVR"/> <action application="log" data="INFO PIN=${PIN}"/> <action application="log" data="INFO UNAME=${UNAME}"/> <action application="log" data="INFO PASSWD=${PASSWD}"/> <action inline="true" application="export" data="DIALED_NUMBER="""/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="auto_hunt=true"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckPIN XML NXIVR"/> </condition> </extension> <extension name="GetDstNum"> <condition field="destination_number" expression="^GetDstNum$"> <action application="set" data="bind_meta_key=#"/> <action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/> <action application="execute_extension" data="TranslateLocal XML NXIVR"/> <action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/> <action application="execute_extension" data="ParseDN XML NXIVR"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckDstNum XML NXIVR"/> </condition> </extension> _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi, This is part of my mod_rad_auth.conf.xml. <!-- name: just a description value: direct input or variable pec: vendor ID (0 for default, 9 for cisco...) expr: 0 - direct input (string), 1 - channel variable direction: in for radius-request, out for radius-response --> <!-- mappings for radius request message; input attributes --> <param name="h323-conf-id" id="24" value="CALLID" pec="0" expr="1" direction="in"/> <!--param name="h323-prompt-id" id="104" value="SERVICENUM" pec="9" expr="1" direction="in"/--> <!--param name="Cisco-AVPair" id="1" value="TRANSACTIONID" pec="9" expr="1" direction="in"/--> <param name="Calling-Station-Id" id="31" value="CALLINGNUMBER" pec="0" expr="1" direction="in"/> <!--param name="Called-Station-Id" id="31" value="${destination_number}" pec="0" expr="1" direction="in"/>--> <param name="NAS-Port-Type" id="61" value="0" pec="0" expr="0" direction="in"/> <!--param name="NAS-Port-Id" id="87" value="ISDN 3/0:D:14" pec="0" expr="0" direction="in"/--> <!--param name="Login-User" id="1" value="1000" pec="0" expr="0" direction="in"/--> <!-- mappings for radius-response message; output values from returning outributes --> <param name="BILING_MODEL" id="109" value="biling_model" pec="9" expr="0" direction="out"/> <param name="CREDIT_AMOUNT" id="101" value="credit_amount" pec="9" expr="0" direction="out"/> <param name="CURRENCY" id="110" value="currency" pec="9" expr="0" direction="out"/> <param name="PREFFERED_LANG" id="107" value="preffered_lang" pec="9" expr="0" direction="out"/> <param name="CREDIT_TIME" id="102" value="credit_time" pec="9" expr="0" direction="out"/> <param name="H323-IVR-IN:DIRATION" id="1" value="h323_ivr_duration" pec="9" expr="0" direction="out"/> <param name="RADIUS_RETURN_CODE" id="103" value="return_code" pec="9" expr="0" direction="out"/> <!-- expr param is to be ignored here--> </vsas> </configuration> Date: Mon, 8 Nov 2010 11:15:19 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA please paste your rad_auth.conf.xml On Mon, Nov 8, 2010 at 10:41 AM, Abid Saleem <abid_freeswitch@live.com> wrote: Hi, Please find the ethereal capture attached. Please let me know should you need additional information. Thanks. Regards------------Abid Saleem Date: Mon, 8 Nov 2010 09:37:01 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA can you provide a wireshark sniff ? On Fri, Nov 5, 2010 at 5:57 AM, Abid Saleem <abid_freeswitch@live.com> wrote: This is what I am saying that these variables do exist in returning radius messages. My Radius response is as below for reference Sending Access-Accept of id 224 to 119.158.138.83 port 1027 h323-credit-amount := "h323-credit-amount=5" h323-return-code := "h323-return-code=0" h323-credit-time := "h323-credit-time=120"Finished request 0. Please help me with this. Thanks. Regards------------Abid Saleem Date: Thu, 4 Nov 2010 15:14:57 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA as i said you need to evaluate the returning value from app_function and act accordingly...if the result is "OK" it measn authorizes if its "NOK" it means its failed. Im not going into your application and how you are doing it... you have an example on how to do it in my prev e-mail. you cannot populate variables that doesn't exist in the returning radius messages: No found out attribute id: 109, pec:9 No found out attribute id: 101, pec:9 No found out attribute id: 110, pec:9 and so on ... simply, Access Accept messages doesn't have these attributes that you are trying to map into channel variables. On Thu, Nov 4, 2010 at 2:35 PM, Abid Saleem <abid_freeswitch@live.com> wrote: Hi, Thanks. This is good for Calling Card type IVR application but I am using it for my SIP UA for authorization only where authorization is required when I make a call from extension 1000. 1000 is a registered user in billing. Can you please provide a simple example with this ANI Authorization scenerio. Also I am getting the following in debug which means radius response values are not being populated in credit_amount, credit_time and return_code attributes. Please help me. 2010-11-04 18:09:53.396212 [DEBUG] mod_rad_auth.c:491 sending radius packet ...2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:497 RADIUS Authentication OK2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE)EXECUTE sofia/internal/1000@192.168.0.100 set(execute_on_answer=sched_hangup + /> <action application=) 2010-11-04 18:09:54.571999 [DEBUG] mod_dptools.c:816 sofia/internal/1000@192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=] EXECUTE sofia/internal/1000@192.168.0.100 log(INFO biling_model=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 biling_model= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_amount=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_amount= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO currency=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 currency= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO preffered_lang=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 preffered_lang= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_time=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_time= Date: Thu, 4 Nov 2010 00:10:28 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA hello, auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly. here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN. <extension name="ANIorPIN"> <condition field="destination_number" expression="^ANIorPIN$"> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/> <action application="execute_extension" data="CheckANI XML NXIVR"/> </condition> </extension> <extension name="CheckANI"> <condition field="destination_number" expression="^CheckANI$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/> <action application="execute_extension" data="EnterPIN XML NXIVR"/> <action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/> <anti-action inline="true" application="export" data="PASSWD=1234"/> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/> </condition> </extension> <extension name="EnterPIN"> <condition field="destination_number" expression="^EnterPIN$"> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/> <action application="set" data="credit_amount=h323-credit-amount=0"/> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/> <action application="execute_extension" data="ParsePIN XML NXIVR"/> <action application="log" data="INFO PIN=${PIN}"/> <action application="log" data="INFO UNAME=${UNAME}"/> <action application="log" data="INFO PASSWD=${PASSWD}"/> <action inline="true" application="export" data="DIALED_NUMBER="""/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="auto_hunt=true"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckPIN XML NXIVR"/> </condition> </extension> <extension name="GetDstNum"> <condition field="destination_number" expression="^GetDstNum$"> <action application="set" data="bind_meta_key=#"/> <action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/> <action application="execute_extension" data="TranslateLocal XML NXIVR"/> <action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/> <action application="execute_extension" data="ParseDN XML NXIVR"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckDstNum XML NXIVR"/> </condition> </extension> _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Dear Tihomir, Good day. I am still waiting for your answer on the below subject. Could you please guide me further so I can fix this issue with mod_rad_auth. I hope you understand what is my problem. Regards----------Abid Saleem From: abid_freeswitch@live.com To: freeswitch-users@lists.freeswitch.org Date: Mon, 8 Nov 2010 16:41:51 +0500 Subject: Re: [Freeswitch-users] Radius AAA Hi, This is part of my mod_rad_auth.conf.xml. <!-- name: just a description value: direct input or variable pec: vendor ID (0 for default, 9 for cisco...) expr: 0 - direct input (string), 1 - channel variable direction: in for radius-request, out for radius-response --> <!-- mappings for radius request message; input attributes --> <param name="h323-conf-id" id="24" value="CALLID" pec="0" expr="1" direction="in"/> <!--param name="h323-prompt-id" id="104" value="SERVICENUM" pec="9" expr="1" direction="in"/--> <!--param name="Cisco-AVPair" id="1" value="TRANSACTIONID" pec="9" expr="1" direction="in"/--> <param name="Calling-Station-Id" id="31" value="CALLINGNUMBER" pec="0" expr="1" direction="in"/> <!--param name="Called-Station-Id" id="31" value="${destination_number}" pec="0" expr="1" direction="in"/>--> <param name="NAS-Port-Type" id="61" value="0" pec="0" expr="0" direction="in"/> <!--param name="NAS-Port-Id" id="87" value="ISDN 3/0:D:14" pec="0" expr="0" direction="in"/--> <!--param name="Login-User" id="1" value="1000" pec="0" expr="0" direction="in"/--> <!-- mappings for radius-response message; output values from returning outributes --> <param name="BILING_MODEL" id="109" value="biling_model" pec="9" expr="0" direction="out"/> <param name="CREDIT_AMOUNT" id="101" value="credit_amount" pec="9" expr="0" direction="out"/> <param name="CURRENCY" id="110" value="currency" pec="9" expr="0" direction="out"/> <param name="PREFFERED_LANG" id="107" value="preffered_lang" pec="9" expr="0" direction="out"/> <param name="CREDIT_TIME" id="102" value="credit_time" pec="9" expr="0" direction="out"/> <param name="H323-IVR-IN:DIRATION" id="1" value="h323_ivr_duration" pec="9" expr="0" direction="out"/> <param name="RADIUS_RETURN_CODE" id="103" value="return_code" pec="9" expr="0" direction="out"/> <!-- expr param is to be ignored here--> </vsas> </configuration> Date: Mon, 8 Nov 2010 11:15:19 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA please paste your rad_auth.conf.xml On Mon, Nov 8, 2010 at 10:41 AM, Abid Saleem <abid_freeswitch@live.com> wrote: Hi, Please find the ethereal capture attached. Please let me know should you need additional information. Thanks. Regards------------Abid Saleem Date: Mon, 8 Nov 2010 09:37:01 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA can you provide a wireshark sniff ? On Fri, Nov 5, 2010 at 5:57 AM, Abid Saleem <abid_freeswitch@live.com> wrote: This is what I am saying that these variables do exist in returning radius messages. My Radius response is as below for reference Sending Access-Accept of id 224 to 119.158.138.83 port 1027 h323-credit-amount := "h323-credit-amount=5" h323-return-code := "h323-return-code=0" h323-credit-time := "h323-credit-time=120"Finished request 0. Please help me with this. Thanks. Regards------------Abid Saleem Date: Thu, 4 Nov 2010 15:14:57 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA as i said you need to evaluate the returning value from app_function and act accordingly...if the result is "OK" it measn authorizes if its "NOK" it means its failed. Im not going into your application and how you are doing it... you have an example on how to do it in my prev e-mail. you cannot populate variables that doesn't exist in the returning radius messages: No found out attribute id: 109, pec:9 No found out attribute id: 101, pec:9 No found out attribute id: 110, pec:9 and so on ... simply, Access Accept messages doesn't have these attributes that you are trying to map into channel variables. On Thu, Nov 4, 2010 at 2:35 PM, Abid Saleem <abid_freeswitch@live.com> wrote: Hi, Thanks. This is good for Calling Card type IVR application but I am using it for my SIP UA for authorization only where authorization is required when I make a call from extension 1000. 1000 is a registered user in billing. Can you please provide a simple example with this ANI Authorization scenerio. Also I am getting the following in debug which means radius response values are not being populated in credit_amount, credit_time and return_code attributes. Please help me. 2010-11-04 18:09:53.396212 [DEBUG] mod_rad_auth.c:491 sending radius packet ...2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:497 RADIUS Authentication OK2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG) 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION)2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE)EXECUTE sofia/internal/1000@192.168.0.100 set(execute_on_answer=sched_hangup + /> <action application=) 2010-11-04 18:09:54.571999 [DEBUG] mod_dptools.c:816 sofia/internal/1000@192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=] EXECUTE sofia/internal/1000@192.168.0.100 log(INFO biling_model=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 biling_model= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_amount=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_amount= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO currency=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 currency= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO preffered_lang=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 preffered_lang= EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_time=)2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_time= Date: Thu, 4 Nov 2010 00:10:28 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA hello, auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly. here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN. <extension name="ANIorPIN"> <condition field="destination_number" expression="^ANIorPIN$"> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/> <action application="execute_extension" data="CheckANI XML NXIVR"/> </condition> </extension> <extension name="CheckANI"> <condition field="destination_number" expression="^CheckANI$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/> <action application="execute_extension" data="EnterPIN XML NXIVR"/> <action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/> <anti-action inline="true" application="export" data="PASSWD=1234"/> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/> </condition> </extension> <extension name="EnterPIN"> <condition field="destination_number" expression="^EnterPIN$"> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/> <action application="set" data="credit_amount=h323-credit-amount=0"/> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/> <action application="execute_extension" data="ParsePIN XML NXIVR"/> <action application="log" data="INFO PIN=${PIN}"/> <action application="log" data="INFO UNAME=${UNAME}"/> <action application="log" data="INFO PASSWD=${PASSWD}"/> <action inline="true" application="export" data="DIALED_NUMBER="""/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="auto_hunt=true"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckPIN XML NXIVR"/> </condition> </extension> <extension name="GetDstNum"> <condition field="destination_number" expression="^GetDstNum$"> <action application="set" data="bind_meta_key=#"/> <action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/> <action application="set" data="playback_delimiter=!"/> <action application="set" data="playback_terminators=#*0123456789"/> <action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/> <action application="execute_extension" data="TranslateLocal XML NXIVR"/> <action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/> <action application="execute_extension" data="ParseDN XML NXIVR"/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/> <action application="execute_extension" data="CheckDstNum XML NXIVR"/> </condition> </extension> _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Thu, Nov 11, 2010 at 8:27 AM, Abid Saleem <abid_freeswitch@live.com>wrote:
Dear Tihomir,
Good day. I am still waiting for your answer on the below subject. Could you please guide me further so I can fix this issue with mod_rad_auth. I hope you understand what is my problem.
Abid, i cannot write the dialplan for you. This part you should do by yourself. I have explained how this module is supposed to work... and it really does. you need to evaluate the response from auth_function and act accordingly (bridge or not bridge the call according to auth result) again, here is an example: module config: <configuration name="rad_auth.conf" description="radius authentification module"> <settings> <!-- backward compatibility to allow radiusclient config file instead of an embedded config --> <param name="radius_config" value="/usr/local/etc/radiusclient/radiusclient.conf"/> </settings> <client> <param name="authserver" value="x.x.x.x:1812:gateway"/> <param name="authserver" value="x.x.x.x:1812:gateway"/> <param name="dictionary" value="/usr/local/etc/radiusclient/dictionary.all"/> <param name="seqfile" value="/var/run/radius.seq"/> <param name="mapfile" value="/usr/local/etc/radiusclient/port-id-map"/> <param name="default_realm" value=""/> <param name="radius_timeout" value="2"/> <param name="radius_retries" value="1"/> <param name="radius_deadtime" value="60"/> <param name="bindaddr" value="*"/> </client> <vsas> <!-- name: just a description value: direct input or variable pec: vendor ID (0 for default, 9 for cisco...) expr: 1 for channel variable, 2 for direct input direction: in for radius-request, out for radius-response --> <!-- mappings for radius request message; input attributes --> <param name="h323-conf-id" id="24" value="CALLID" pec="9" expr="1" direction="in"/> <param name="Calling-Station-Id" id="31" value="CALLINGNUMBER" pec="0" expr="1" direction="in"/> <param name="NAS-Port-Type" id="61" value="0" pec="0" expr="0" direction="in"/> <param name="NAS-Port-Id" id="87" value="ISDN 3/0:D:14" pec="0" expr="0" direction="in"/> <param name="Login-User" id="1" value="1" pec="0" expr="0" direction="in"/> <!-- mappings for radius-response message; output values from returning outributes --> <param name="CREDIT_AMOUNT" id="101" value="credit_amount" pec="9" expr="0" direction="out"/> <param name="CREDIT_TIME" id="102" value="credit_time" pec="9" expr="0" direction="out"/> <param name="RADIUS_RETURN_CODE" id="103" value="return_code" pec="9" expr="0" direction="out"/> <!-- expr param is to be ignored here--> </vsas> </configuration> <extension name="RADIUS_ANI_AUTH"> <condition field="destination_number" expression="^RADIUS_ANI_AUTH$"> <action application="log" data="INFO Before Auth "/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${USERNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="execute_extension" data="CHECK_IF_AUTORIZED XML default"/> </condition> </extension> <extension name="CHECK_IF_AUTORIZED"> <condition field="destination_number" expression="^CHECK_IF_AUTORIZED$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# Unauthorized - reject call ################\n"/> <action application="playback" data="/path/to/file/your_call_is_not_authorized.wav"/> <action application="playback" data="/path/to/file/your_call_will_disconnect.wav"/> <action application="hangup" data="CALL_REJECTED"/> <anti-action application="log" data="INFO ################# Authorized - let it go! ################\n"/> <anti-action application="log" data="INFO ################# Radius returned attributes - start ################\n"/> <anti-action application="log" data="INFO AUTH_RESULT=${AUTH_RESULT}"/> <anti-action application="log" data="INFO billing_model=${billing_model}"/> <anti-action application="log" data="INFO credit_amount=${credit_amount}"/> <anti-action application="log" data="INFO currency=${currency}"/> <anti-action application="log" data="INFO preffered_lang=${preffered_lang}"/> <anti-action application="log" data="INFO credit_time=${credit_time}"/> <anti-action application="log" data="INFO h323_ivr_duration=${h323_ivr_duration}"/> <anti-action application="log" data="INFO return_code=${return_code}"/> <anti-action application="log" data="INFO ################# Radius returned attributes - end ################\n"/> </condition> </extension> <extension name="Local_Extension"> <condition field="destination_number" expression="^(10[01][0-9])$"> <action application="set" data="dialed_extension=$1"/> <action application="export" data="dialed_extension=$1"/> <action inline="true" application="set" data="CALLID=h323-conf-id=${uuid}"/> <action inline="true" application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action inline="true" application="set" data="USERNAME=${caller_id_number}"/> <action inline="true" application="set" data="PASSWD=1234"/> <action inline="true" application="set" data="DIALED_NUMBER=${dialed_extension}"/> <action application="execute_extension" data="RADIUS_ANI_AUTH XML default"/> <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> --> <action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/> <action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> <action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/> <action application="set" data="ringback=${us-ring}"/> <action application="set" data="transfer_ringback=$${hold_music}"/> <action application="set" data="call_timeout=30"/> <!-- <action application="set" data="sip_exclude_contact=${network_addr}"/> --> <action application="set" data="hangup_after_bridge=true"/> <!--<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/> --> <action application="set" data="continue_on_fail=true"/> <action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/> <action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/> <action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/> <!--<action application="export" data="nolocal:sip_secure_media=${user_data(${dialed_extension}@${domain_name} var sip_secure_media)}"/>--> <action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/> <action application="bridge" data="user/${dialed_extension}@ ${domain_name}"/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="voicemail" data="default ${domain_name} ${dialed_extension}"/> </condition> </extension> If you still have issues, contact me off the list and provide access to the server... i don't know what to say to you anymore on this topic. its more than clear.
Dear Tihomir, I think you did not understand what my problem is. Let me explain. I know that I can evaluate the response from auth_function and act accordingly (bridge or not bridge the call according to auth result). This part is ok and I can do it because I am getting OK or NOK in AUTH_RESULT. The issue is I need to disconnect the call after scheduled number of seconds returned by radius in h323-credit-time attribute whose value in this case is not being populated into credit_time parameter of FS. If you still do not understand, lets put it this way that even if I use the mod_rad_auth.conf.xml and dialplan configuration you sent, still the FS is not able to obtain the value of credit_amount and credit_time although radius response parameters are received by the server. Also I have checked in mod_rad_auth.c file that all entries related to credit_amount, billing_model etc are commented and credit_time does not even exist in that file. Thanks. Regards-------------Abid Saleem Date: Thu, 11 Nov 2010 12:58:13 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA On Thu, Nov 11, 2010 at 8:27 AM, Abid Saleem <abid_freeswitch@live.com> wrote: Dear Tihomir, Good day. I am still waiting for your answer on the below subject. Could you please guide me further so I can fix this issue with mod_rad_auth. I hope you understand what is my problem. Abid, i cannot write the dialplan for you. This part you should do by yourself. I have explained how this module is supposed to work... and it really does. you need to evaluate the response from auth_function and act accordingly (bridge or not bridge the call according to auth result) again, here is an example: module config: <configuration name="rad_auth.conf" description="radius authentification module"> <settings> <!-- backward compatibility to allow radiusclient config file instead of an embedded config --> <param name="radius_config" value="/usr/local/etc/radiusclient/radiusclient.conf"/> </settings> <client> <param name="authserver" value="x.x.x.x:1812:gateway"/> <param name="authserver" value="x.x.x.x:1812:gateway"/> <param name="dictionary" value="/usr/local/etc/radiusclient/dictionary.all"/> <param name="seqfile" value="/var/run/radius.seq"/> <param name="mapfile" value="/usr/local/etc/radiusclient/port-id-map"/> <param name="default_realm" value=""/> <param name="radius_timeout" value="2"/> <param name="radius_retries" value="1"/> <param name="radius_deadtime" value="60"/> <param name="bindaddr" value="*"/> </client> <vsas> <!-- name: just a description value: direct input or variable pec: vendor ID (0 for default, 9 for cisco...) expr: 1 for channel variable, 2 for direct input direction: in for radius-request, out for radius-response --> <!-- mappings for radius request message; input attributes --> <param name="h323-conf-id" id="24" value="CALLID" pec="9" expr="1" direction="in"/> <param name="Calling-Station-Id" id="31" value="CALLINGNUMBER" pec="0" expr="1" direction="in"/> <param name="NAS-Port-Type" id="61" value="0" pec="0" expr="0" direction="in"/> <param name="NAS-Port-Id" id="87" value="ISDN 3/0:D:14" pec="0" expr="0" direction="in"/> <param name="Login-User" id="1" value="1" pec="0" expr="0" direction="in"/> <!-- mappings for radius-response message; output values from returning outributes --> <param name="CREDIT_AMOUNT" id="101" value="credit_amount" pec="9" expr="0" direction="out"/> <param name="CREDIT_TIME" id="102" value="credit_time" pec="9" expr="0" direction="out"/> <param name="RADIUS_RETURN_CODE" id="103" value="return_code" pec="9" expr="0" direction="out"/> <!-- expr param is to be ignored here--> </vsas> </configuration> <extension name="RADIUS_ANI_AUTH"> <condition field="destination_number" expression="^RADIUS_ANI_AUTH$"> <action application="log" data="INFO Before Auth "/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${USERNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="execute_extension" data="CHECK_IF_AUTORIZED XML default"/> </condition> </extension> <extension name="CHECK_IF_AUTORIZED"> <condition field="destination_number" expression="^CHECK_IF_AUTORIZED$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# Unauthorized - reject call ################\n"/> <action application="playback" data="/path/to/file/your_call_is_not_authorized.wav"/> <action application="playback" data="/path/to/file/your_call_will_disconnect.wav"/> <action application="hangup" data="CALL_REJECTED"/> <anti-action application="log" data="INFO ################# Authorized - let it go! ################\n"/> <anti-action application="log" data="INFO ################# Radius returned attributes - start ################\n"/> <anti-action application="log" data="INFO AUTH_RESULT=${AUTH_RESULT}"/> <anti-action application="log" data="INFO billing_model=${billing_model}"/> <anti-action application="log" data="INFO credit_amount=${credit_amount}"/> <anti-action application="log" data="INFO currency=${currency}"/> <anti-action application="log" data="INFO preffered_lang=${preffered_lang}"/> <anti-action application="log" data="INFO credit_time=${credit_time}"/> <anti-action application="log" data="INFO h323_ivr_duration=${h323_ivr_duration}"/> <anti-action application="log" data="INFO return_code=${return_code}"/> <anti-action application="log" data="INFO ################# Radius returned attributes - end ################\n"/> </condition> </extension> <extension name="Local_Extension"> <condition field="destination_number" expression="^(10[01][0-9])$"> <action application="set" data="dialed_extension=$1"/> <action application="export" data="dialed_extension=$1"/> <action inline="true" application="set" data="CALLID=h323-conf-id=${uuid}"/> <action inline="true" application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action inline="true" application="set" data="USERNAME=${caller_id_number}"/> <action inline="true" application="set" data="PASSWD=1234"/> <action inline="true" application="set" data="DIALED_NUMBER=${dialed_extension}"/> <action application="execute_extension" data="RADIUS_ANI_AUTH XML default"/> <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> --> <action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/> <action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> <action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/> <action application="set" data="ringback=${us-ring}"/> <action application="set" data="transfer_ringback=$${hold_music}"/> <action application="set" data="call_timeout=30"/> <!-- <action application="set" data="sip_exclude_contact=${network_addr}"/> --> <action application="set" data="hangup_after_bridge=true"/> <!--<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/> --> <action application="set" data="continue_on_fail=true"/> <action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/> <action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/> <action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/> <!--<action application="export" data="nolocal:sip_secure_media=${user_data(${dialed_extension}@${domain_name} var sip_secure_media)}"/>--> <action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/> <action application="bridge" data="user/${dialed_extension}@${domain_name}"/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="voicemail" data="default ${domain_name} ${dialed_extension}"/> </condition> </extension> If you still have issues, contact me off the list and provide access to the server... i don't know what to say to you anymore on this topic. its more than clear. _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hello Abid
From the radius log you have sent I see that server returns h323-credit-time=40800. If radius client dictionary includes cisco's attributes you should be able to receive them. Could you enable debug=7 in FS console and analyze the output. Probably something is wrong with mod_rad_auth config or dialplan itself. B.t.w VSA's are not hardcoded into mod_rad_auth.c.
Regards, Nazim On 11/13/2010 12:04 PM, Abid Saleem wrote:
Dear Tihomir, I think you did not understand what my problem is. Let me explain. I know that I can evaluate the response from auth_function and act accordingly (bridge or not bridge the call according to auth result). This part is ok and I can do it because I am getting OK or NOK in AUTH_RESULT. The issue is I need to disconnect the call after scheduled number of seconds returned by radius in h323-credit-time attribute whose value in this case is not being populated into credit_time parameter of FS. If you still do not understand, lets put it this way that even if I use the mod_rad_auth.conf.xml and dialplan configuration you sent, still the FS is not able to obtain the value of credit_amount and credit_time although radius response parameters are received by the server. Also I have checked in mod_rad_auth.c file that all entries related to credit_amount, billing_model etc are commented and credit_time does not even exist in that file. Thanks.
Dear Nazim, Thanks for your message. You are right it was a dictionary problem as in my other email. Can you please send me the dialplan entries for parsing Radius_Return_code that you are using? Regards-----------Abid Saleem
Date: Sat, 13 Nov 2010 15:41:52 +0400 From: nazim.aghabayov@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
Hello Abid
From the radius log you have sent I see that server returns h323-credit-time=40800. If radius client dictionary includes cisco's attributes you should be able to receive them. Could you enable debug=7 in FS console and analyze the output. Probably something is wrong with mod_rad_auth config or dialplan itself. B.t.w VSA's are not hardcoded into mod_rad_auth.c.
Regards, Nazim
On 11/13/2010 12:04 PM, Abid Saleem wrote:
Dear Tihomir, I think you did not understand what my problem is. Let me explain. I know that I can evaluate the response from auth_function and act accordingly (bridge or not bridge the call according to auth result). This part is ok and I can do it because I am getting OK or NOK in AUTH_RESULT. The issue is I need to disconnect the call after scheduled number of seconds returned by radius in h323-credit-time attribute whose value in this case is not being populated into credit_time parameter of FS. If you still do not understand, lets put it this way that even if I use the mod_rad_auth.conf.xml and dialplan configuration you sent, still the FS is not able to obtain the value of credit_amount and credit_time although radius response parameters are received by the server. Also I have checked in mod_rad_auth.c file that all entries related to credit_amount, billing_model etc are commented and credit_time does not even exist in that file. Thanks.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hello Abid Don't mention, say thanks to Tihomir for this nice module ) Example of a dialplan entry is posted on wiki. <action application="log" data="INFO credit_time=${credit_time}"/> <action application="sched_hangup" data="+${credit_time:17:-1} ${Core-UUID}"/> In this scenario you don't have to check for return code, because you will get hangup if authentication fails. Regards, Nazim On 11/14/2010 02:48 PM, Abid Saleem wrote:
Dear Nazim, Thanks for your message. You are right it was a dictionary problem as in my other email. Can you please send me the dialplan entries for parsing Radius_Return_code that you are using?
Regards-----------Abid Saleem
Date: Sat, 13 Nov 2010 15:41:52 +0400 From: nazim.aghabayov@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
Hello Abid
From the radius log you have sent I see that server returns h323-credit-time=40800. If radius client dictionary includes cisco's attributes you should be able to receive them. Could you enable debug=7 in FS console and analyze the output. Probably something is wrong with mod_rad_auth config or dialplan itself. B.t.w VSA's are not hardcoded into mod_rad_auth.c.
Regards, Nazim
On 11/13/2010 12:04 PM, Abid Saleem wrote:
Dear Tihomir, I think you did not understand what my problem is. Let me explain. I know that I can evaluate the response from auth_function and act accordingly (bridge or not bridge the call according to auth result). This part is ok and I can do it because I am getting OK or NOK in AUTH_RESULT. The issue is I need to disconnect the call after scheduled number of seconds returned by radius in h323-credit-time attribute whose value in this case is not being populated into credit_time parameter of FS. If you still do not understand, lets put it this way that even if I use the mod_rad_auth.conf.xml and dialplan configuration you sent, still the FS is not able to obtain the value of credit_amount and credit_time although radius response parameters are received by the server. Also I have checked in mod_rad_auth.c file that all entries related to credit_amount, billing_model etc are commented and credit_time does not even exist in that file. Thanks.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
<action application="log" data="INFO credit_time=${credit_time}"/> <action application="sched_hangup" data="+${credit_time:17:-1} ${Core-UUID}"/>
In this scenario you don't have to check for return code, because you will get hangup if authentication fails.
Nice one Nazim :P T.
I am already using it and its working. Thanks for all your favors. I will surely get back to you should I need any help. Take care. Regards-----------Abid Saleem Date: Mon, 15 Nov 2010 08:53:23 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA <action application="log" data="INFO credit_time=${credit_time}"/> <action application="sched_hangup" data="+${credit_time:17:-1} ${Core-UUID}"/> In this scenario you don't have to check for return code, because you will get hangup if authentication fails. Nice one Nazim :P T. _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi, I am already using sched_hangup and its working. Can you please send me some dialplan you are using for Calling Card IVR application. Thanks. Regards-----------Abid Saleem s.freeswitch.org
Subject: Re: [Freeswitch-users] Radius AAA
Hello Abid
Don't mention, say thanks to Tihomir for this nice module ) Example of a dialplan entry is posted on wiki.
<action application="log" data="INFO credit_time=${credit_time}"/> <action application="sched_hangup" data="+${credit_time:17:-1} ${Core-UUID}"/>
In this scenario you don't have to check for return code, because you will get hangup if authentication fails.
Regards, Nazim
On 11/14/2010 02:48 PM, Abid Saleem wrote:
Dear Nazim, Thanks for your message. You are right it was a dictionary problem as in my other email. Can you please send me the dialplan entries for parsing Radius_Return_code that you are using?
Regards-----------Abid Saleem
Date: Sat, 13 Nov 2010 15:41:52 +0400 From: nazim.aghabayov@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA
Hello Abid
From the radius log you have sent I see that server returns h323-credit-time=40800. If radius client dictionary includes cisco's attributes you should be able to receive them. Could you enable debug=7 in FS console and analyze the output. Probably something is wrong with mod_rad_auth config or dialplan itself. B.t.w VSA's are not hardcoded into mod_rad_auth.c.
Regards, Nazim
On 11/13/2010 12:04 PM, Abid Saleem wrote:
Dear Tihomir, I think you did not understand what my problem is. Let me explain. I know that I can evaluate the response from auth_function and act accordingly (bridge or not bridge the call according to auth result). This part is ok and I can do it because I am getting OK or NOK in AUTH_RESULT. The issue is I need to disconnect the call after scheduled number of seconds returned by radius in h323-credit-time attribute whose value in this case is not being populated into credit_time parameter of FS. If you still do not understand, lets put it this way that even if I use the mod_rad_auth.conf.xml and dialplan configuration you sent, still the FS is not able to obtain the value of credit_amount and credit_time although radius response parameters are received by the server. Also I have checked in mod_rad_auth.c file that all entries related to credit_amount, billing_model etc are commented and credit_time does not even exist in that file. Thanks.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Sat, Nov 13, 2010 at 9:04 AM, Abid Saleem <abid_freeswitch@live.com>wrote:
Dear Tihomir,
I think you did not understand what my problem is. Let me explain.
I know that I can evaluate the response from auth_function and act accordingly (bridge or not bridge the call according to auth result). This part is ok and I can do it because I am getting OK or NOK in AUTH_RESULT. The issue is I need to disconnect the call after scheduled number of seconds returned by radius in h323-credit-time attribute whose value in this case is not being populated into credit_time parameter of FS.
well, you could have pointed the finger on this before :P
2010-11-04 18:09:53.396212 [DEBUG] mod_rad_auth.c:491 sending radius packet ... 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:497 RADIUS Authentication OK 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL *2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL)* 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT 2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT) the attribute with id:109 and pec:9 is not found in the returning radius message. This can just mean 2 things: 1. really not present in the returning radius message 2. the module doesn't have an appropriate dictionary referencing pec 9 and id 102. well, here its the dictionary im positive of that... so find attached the one im using. Put this on your server and its gonna work.
If you still do not understand, lets put it this way that even if I use the mod_rad_auth.conf.xml and dialplan configuration you sent, still the FS is not able to obtain the value of credit_amount and credit_time although radius response parameters are received by the server.
as i said before ... check your dictionary.
Also I have checked in mod_rad_auth.c file that all entries related to credit_amount, billing_model etc are commented and credit_time does not even exist in that file.
you are missing the point of this module ... the VSAs are configurable via config file.
Hi Tihomir, Can you please let me understand what is meant by these two lines you have written in the dialplan. <condition field="destination_number" expression="^RADIUS_ANI_AUTH$"><action application="execute_extension" data="CHECK_IF_AUTORIZED XML default"/> Thanks. Regards---------------Abid Saleem Date: Thu, 11 Nov 2010 12:58:13 +0100 From: tculjaga@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Radius AAA On Thu, Nov 11, 2010 at 8:27 AM, Abid Saleem <abid_freeswitch@live.com> wrote: Dear Tihomir, Good day. I am still waiting for your answer on the below subject. Could you please guide me further so I can fix this issue with mod_rad_auth. I hope you understand what is my problem. Abid, i cannot write the dialplan for you. This part you should do by yourself. I have explained how this module is supposed to work... and it really does. you need to evaluate the response from auth_function and act accordingly (bridge or not bridge the call according to auth result) again, here is an example: module config: <configuration name="rad_auth.conf" description="radius authentification module"> <settings> <!-- backward compatibility to allow radiusclient config file instead of an embedded config --> <param name="radius_config" value="/usr/local/etc/radiusclient/radiusclient.conf"/> </settings> <client> <param name="authserver" value="x.x.x.x:1812:gateway"/> <param name="authserver" value="x.x.x.x:1812:gateway"/> <param name="dictionary" value="/usr/local/etc/radiusclient/dictionary.all"/> <param name="seqfile" value="/var/run/radius.seq"/> <param name="mapfile" value="/usr/local/etc/radiusclient/port-id-map"/> <param name="default_realm" value=""/> <param name="radius_timeout" value="2"/> <param name="radius_retries" value="1"/> <param name="radius_deadtime" value="60"/> <param name="bindaddr" value="*"/> </client> <vsas> <!-- name: just a description value: direct input or variable pec: vendor ID (0 for default, 9 for cisco...) expr: 1 for channel variable, 2 for direct input direction: in for radius-request, out for radius-response --> <!-- mappings for radius request message; input attributes --> <param name="h323-conf-id" id="24" value="CALLID" pec="9" expr="1" direction="in"/> <param name="Calling-Station-Id" id="31" value="CALLINGNUMBER" pec="0" expr="1" direction="in"/> <param name="NAS-Port-Type" id="61" value="0" pec="0" expr="0" direction="in"/> <param name="NAS-Port-Id" id="87" value="ISDN 3/0:D:14" pec="0" expr="0" direction="in"/> <param name="Login-User" id="1" value="1" pec="0" expr="0" direction="in"/> <!-- mappings for radius-response message; output values from returning outributes --> <param name="CREDIT_AMOUNT" id="101" value="credit_amount" pec="9" expr="0" direction="out"/> <param name="CREDIT_TIME" id="102" value="credit_time" pec="9" expr="0" direction="out"/> <param name="RADIUS_RETURN_CODE" id="103" value="return_code" pec="9" expr="0" direction="out"/> <!-- expr param is to be ignored here--> </vsas> </configuration> <extension name="RADIUS_ANI_AUTH"> <condition field="destination_number" expression="^RADIUS_ANI_AUTH$"> <action application="log" data="INFO Before Auth "/> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${USERNAME}, in ${PASSWD}, out AUTH_RESULT"/> <action application="execute_extension" data="CHECK_IF_AUTORIZED XML default"/> </condition> </extension> <extension name="CHECK_IF_AUTORIZED"> <condition field="destination_number" expression="^CHECK_IF_AUTORIZED$"/> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"> <action application="log" data="INFO ################# Unauthorized - reject call ################\n"/> <action application="playback" data="/path/to/file/your_call_is_not_authorized.wav"/> <action application="playback" data="/path/to/file/your_call_will_disconnect.wav"/> <action application="hangup" data="CALL_REJECTED"/> <anti-action application="log" data="INFO ################# Authorized - let it go! ################\n"/> <anti-action application="log" data="INFO ################# Radius returned attributes - start ################\n"/> <anti-action application="log" data="INFO AUTH_RESULT=${AUTH_RESULT}"/> <anti-action application="log" data="INFO billing_model=${billing_model}"/> <anti-action application="log" data="INFO credit_amount=${credit_amount}"/> <anti-action application="log" data="INFO currency=${currency}"/> <anti-action application="log" data="INFO preffered_lang=${preffered_lang}"/> <anti-action application="log" data="INFO credit_time=${credit_time}"/> <anti-action application="log" data="INFO h323_ivr_duration=${h323_ivr_duration}"/> <anti-action application="log" data="INFO return_code=${return_code}"/> <anti-action application="log" data="INFO ################# Radius returned attributes - end ################\n"/> </condition> </extension> <extension name="Local_Extension"> <condition field="destination_number" expression="^(10[01][0-9])$"> <action application="set" data="dialed_extension=$1"/> <action application="export" data="dialed_extension=$1"/> <action inline="true" application="set" data="CALLID=h323-conf-id=${uuid}"/> <action inline="true" application="set" data="CALLINGNUMBER=${caller_id_number}"/> <action inline="true" application="set" data="USERNAME=${caller_id_number}"/> <action inline="true" application="set" data="PASSWD=1234"/> <action inline="true" application="set" data="DIALED_NUMBER=${dialed_extension}"/> <action application="execute_extension" data="RADIUS_ANI_AUTH XML default"/> <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> --> <action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/> <action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> <action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/> <action application="set" data="ringback=${us-ring}"/> <action application="set" data="transfer_ringback=$${hold_music}"/> <action application="set" data="call_timeout=30"/> <!-- <action application="set" data="sip_exclude_contact=${network_addr}"/> --> <action application="set" data="hangup_after_bridge=true"/> <!--<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/> --> <action application="set" data="continue_on_fail=true"/> <action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/> <action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/> <action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/> <!--<action application="export" data="nolocal:sip_secure_media=${user_data(${dialed_extension}@${domain_name} var sip_secure_media)}"/>--> <action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/> <action application="bridge" data="user/${dialed_extension}@${domain_name}"/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="voicemail" data="default ${domain_name} ${dialed_extension}"/> </condition> </extension> If you still have issues, contact me off the list and provide access to the server... i don't know what to say to you anymore on this topic. its more than clear. _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (4)
-
Abid Saleem
-
Michael Collins
-
Nazim Aghabayov
-
Tihomir Culjaga