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