[Freeswitch-users] Radius/Authentication/Authorization

Abid Saleem abid_freeswitch at live.com
Wed Apr 21 06:23:56 PDT 2010


Dear Tihomir,
It has been so many days since I did not get any response from your side. Could you please help me in this. Did you update the wiki for mod_rad_auth. If not, please help me in this regard. Thanks.
Abid Saleem

From: abid_freeswitch at live.com
To: tculjaga at gmail.com; freeswitch-users at lists.freeswitch.org
CC: neal at wanlink.com
Subject: RE: [Freeswitch-users] Radius/Authentication/Authorization
Date: Sat, 3 Apr 2010 12:02:55 +0500









Dear Tihomir,
Any update and help on the below please.
Abid
From: abid_freeswitch at live.com
To: tculjaga at gmail.com
CC: neal at wanlink.com
Subject: Re: [Freeswitch-users] Radius/Authentication/Authorization
Date: Wed, 31 Mar 2010 19:35:32 +0500








Dear Tihomir,
Thank you very much for the configuration example but in which files to place these configurations. Please bear with me because I am new to FreeSwitch and if you could provide complete steps.
Also when I compile FS and load the module mod_rad_auth in conf/autoload_configs/modules.conf.xml, I get an error while starting FS as follows.
2010-03-31 19:32:29.399466 [CRIT] switch_loadable_module.c:882 Error Loading module /usr/local/freeswitch/mod/mod_rad_auth.so**/usr/local/freeswitch/mod/mod_rad_auth.so: undefined symbol: rc_conf_str**
Please advise. Thanks.
Regards-----------Abid Saleem
--Forwarded Message Attachment--
From: tculjaga at gmail.com
CC: neal at wanlink.com
To: freeswitch-users at lists.freeswitch.org
Date: Tue, 30 Mar 2010 21:42:03 +0200
Subject: Re: [Freeswitch-users] Radius/Authentication/Authorization

hello,

here is an example



<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="10.1.1.10: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="3"/>
    <param name="radius_retries" value="2"/>
    <param name="radius_deadtime" value="0"/>

    <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="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="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="BILING_MODEL" id="109" value="billing_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>




in the dialplan you need to trigger auth as:

      <action application="auth_function" data="in ${DIALED_NUMBER}, in ${USERNAME}, in ${PASSWD}, out AUTH_RESULT"/>



there are two behaviours:

1. authorize the call according to username&pass and dialed number - if authorized, the radius server returns credit time towards the dialed number
2. authorize the call according to username&pass - if authorized, the radius server returns the current account balance







  <extension name="unitest_rad-ANI-auth">
    <condition field="destination_number" expression="^601$">
      <action application="log" data="INFO  PRIJE RAD_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=38516060333"/>
      <action inline="true" application="set" data="USERNAME=38516060333"/>

<!--      <action inline="true" application="set" data="USERNAME=209354"/> -->
      <action inline="true" application="set" data="PASSWD=003282"/>

<!--      <action inline="true" application="set" data="DIALED_NUMBER=16094191500"/>  -->

      <action application="sleep" data="2000"/>
      <action application="auth_function" data="in ${DIALED_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="execute_extension" data="AUTH XML default"/> -->

    </condition>
  </extension>


  <extension name="unitest_rad-ANI-balance">
    <condition field="destination_number" expression="^602$">
      <action application="log" data="INFO  PRIJE RAD_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=38516060333"/>
      <action inline="true" application="set" data="USERNAME=38516060333"/>

<!--      <action inline="true" application="set" data="USERNAME=209354"/> -->
      <action inline="true" application="set" data="PASSWD=003282"/>

      <action inline="true" application="set" data="DIALED_NUMBER=16094191500"/>

      <action application="sleep" data="2000"/>
      <action application="auth_function" data="in ${DIALED_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="execute_extension" data="AUTH XML default"/> -->

    </condition>
  </extension>


will update the wiki by the end of the week.


you have enough information for now.

Tihomir.



On Tue, Mar 30, 2010 at 1:52 PM, Abid Saleem <abid_freeswitch at live.com> wrote:






Hi Neal and other Contributors to FS,
I recieved an answer on the list that mod_rad_auth is ready. I upgraded FS to download and install it by "make current" and it is successfully built and installed. Could you please outline the detailed steps to do all this configuration.

If it is still not ready, is there any other method that somebody has already implemented like perl scripts etc. Any help in this regard is badly required. THanks for your cooperation.

Regards----------Abid SaleemSr. Product Manager
 		 	   		  
Hotmail: Powerful Free email with security by Microsoft. Get it now. 		 	   		  
Hotmail: Powerful Free email with security by Microsoft. Get it now. 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100421/cd2d69d5/attachment.html 


More information about the FreeSWITCH-users mailing list