<br><br><div class="gmail_quote">On Thu, Nov 11, 2010 at 8:27 AM, Abid Saleem <span dir="ltr"><<a href="mailto:abid_freeswitch@live.com">abid_freeswitch@live.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
Dear Tihomir,<div><br></div><div>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.</div>
<div><br></div><br></div></blockquote></div><br><br>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.<br><br>you need to evaluate the response from auth_function and act accordingly (bridge or not bridge the call according to auth result)<br>
<br><br>again, here is an example:<br><br>module config:<br><br><configuration name="rad_auth.conf" description="radius authentification module"><br> <settings><br> <!-- backward compatibility to allow radiusclient config file instead of an embedded config --><br>
<param name="radius_config" value="/usr/local/etc/radiusclient/radiusclient.conf"/> <br> </settings><br><br> <client><br> <param name="authserver" value="x.x.x.x:1812:gateway"/> <br>
<param name="authserver" value="x.x.x.x:1812:gateway"/><br> <param name="dictionary" value="/usr/local/etc/radiusclient/dictionary.all"/><br> <param name="seqfile" value="/var/run/radius.seq"/><br>
<param name="mapfile" value="/usr/local/etc/radiusclient/port-id-map"/><br> <param name="default_realm" value=""/><br> <param name="radius_timeout" value="2"/><br>
<param name="radius_retries" value="1"/><br> <param name="radius_deadtime" value="60"/><br> <param name="bindaddr" value="*"/> <br> </client><br>
<br> <vsas><br> <!-- <br> name: just a description<br> value: direct input or variable <br> pec: vendor ID (0 for default, 9 for cisco...)<br> expr: 1 for channel variable, 2 for direct input<br>
direction: in for radius-request, out for radius-response<br> --><br><br> <!-- mappings for radius request message; input attributes --><br> <param name="h323-conf-id" id="24" value="CALLID" pec="9" expr="1" direction="in"/><br>
<param name="Calling-Station-Id" id="31" value="CALLINGNUMBER" pec="0" expr="1" direction="in"/> <br> <param name="NAS-Port-Type" id="61" value="0" pec="0" expr="0" direction="in"/><br>
<param name="NAS-Port-Id" id="87" value="ISDN 3/0:D:14" pec="0" expr="0" direction="in"/><br> <param name="Login-User" id="1" value="1" pec="0" expr="0" direction="in"/><br>
<br> <!-- mappings for radius-response message; output values from returning outributes --><br> <param name="CREDIT_AMOUNT" id="101" value="credit_amount" pec="9" expr="0" direction="out"/><br>
<param name="CREDIT_TIME" id="102" value="credit_time" pec="9" expr="0" direction="out"/><br> <param name="RADIUS_RETURN_CODE" id="103" value="return_code" pec="9" expr="0" direction="out"/><br>
<!-- expr param is to be ignored here--><br> </vsas><br></configuration><br><br><br><br><br> <extension name="RADIUS_ANI_AUTH"><br> <condition field="destination_number" expression="^RADIUS_ANI_AUTH$"><br>
<action application="log" data="INFO Before Auth "/><br> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${USERNAME}, in ${PASSWD}, out AUTH_RESULT"/><br>
<action application="execute_extension" data="CHECK_IF_AUTORIZED XML default"/><br> </condition><br> </extension><br><br><br><br> <extension name="CHECK_IF_AUTORIZED"><br>
<condition field="destination_number" expression="^CHECK_IF_AUTORIZED$"/><br> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"><br> <action application="log" data="INFO ################# Unauthorized - reject call ################\n"/><br>
<action application="playback" data="/path/to/file/your_call_is_not_authorized.wav"/><br> <action application="playback" data="/path/to/file/your_call_will_disconnect.wav"/><br>
<action application="hangup" data="CALL_REJECTED"/><br><br> <anti-action application="log" data="INFO ################# Authorized - let it go! ################\n"/><br>
<anti-action application="log" data="INFO ################# Radius returned attributes - start ################\n"/><br> <anti-action application="log" data="INFO AUTH_RESULT=${AUTH_RESULT}"/><br>
<anti-action application="log" data="INFO billing_model=${billing_model}"/><br> <anti-action application="log" data="INFO credit_amount=${credit_amount}"/><br>
<anti-action application="log" data="INFO currency=${currency}"/><br> <anti-action application="log" data="INFO preffered_lang=${preffered_lang}"/><br> <anti-action application="log" data="INFO credit_time=${credit_time}"/><br>
<anti-action application="log" data="INFO h323_ivr_duration=${h323_ivr_duration}"/><br> <anti-action application="log" data="INFO return_code=${return_code}"/><br>
<anti-action application="log" data="INFO ################# Radius returned attributes - end ################\n"/><br> </condition><br> </extension><br><br><br><br><br> <br>
<extension name="Local_Extension"><br> <condition field="destination_number" expression="^(10[01][0-9])$"><br> <action application="set" data="dialed_extension=$1"/><br>
<action application="export" data="dialed_extension=$1"/><br><br> <action inline="true" application="set" data="CALLID=h323-conf-id=${uuid}"/><br> <action inline="true" application="set" data="CALLINGNUMBER=${caller_id_number}"/><br>
<action inline="true" application="set" data="USERNAME=${caller_id_number}"/><br> <action inline="true" application="set" data="PASSWD=1234"/><br>
<action inline="true" application="set" data="DIALED_NUMBER=${dialed_extension}"/> <br><br> <action application="execute_extension" data="RADIUS_ANI_AUTH XML default"/><br>
<br> <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> --><br> <action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/><br>
<action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/><br> <action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/><br>
<action application="set" data="ringback=${us-ring}"/><br> <action application="set" data="transfer_ringback=$${hold_music}"/><br> <action application="set" data="call_timeout=30"/><br>
<br> <!-- <action application="set" data="sip_exclude_contact=${network_addr}"/> --><br><br> <action application="set" data="hangup_after_bridge=true"/><br>
<!--<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/> --><br> <action application="set" data="continue_on_fail=true"/><br>
<br> <action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/><br> <action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/><br>
<action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/><br> <!--<action application="export" data="nolocal:sip_secure_media=${user_data(${dialed_extension}@${domain_name} var sip_secure_media)}"/>--><br>
<action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/><br><br> <action application="bridge" data="user/${dialed_extension}@${domain_name}"/><br>
<action application="answer"/><br> <action application="sleep" data="1000"/><br> <action application="voicemail" data="default ${domain_name} ${dialed_extension}"/><br>
</condition><br> </extension><br><br><br><br><br><br>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.<br><br>
its more than clear.<br><br><br>