<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi @Jo&atilde;o,<br>
    <br>
    first thank you for your quick response.<br>
    <br>
    I have add ${sip_authorized} condition, but still no luck, as when
    302 happens FS indicate user as inbound call who is calling on
    redirected number due to this I can not use password which is set
    for phone who is having redirect set and is connected on FS. SO, I
    can only use variables which are set for incoming call.<br>
    <br>
    This is my public dialplan:<br>
    <br>
    <small>&lt;include&gt;<br>
      <br>
      <br>
      &lt;extension name="check_auth" continue="true"&gt;<br>
      &nbsp; &lt;condition field="${sip_authorized}" expression="^true$"
      break="never"&gt;<br>
      &nbsp;&nbsp;&nbsp; &lt;anti-action application="respond" data="407"/&gt;<br>
      &nbsp; &lt;/condition&gt;<br>
      &lt;/extension&gt;<br>
      <br>
      <br>
      <br>
      &nbsp; &lt;extension name="trunk_sbc_1"&gt;<br>
      <br>
      <br>
      &lt;!-- &lt;condition field="${user_exists(id
      ${destination_number}.fs_kabelvoip1
      fs_kabelvoip1.fs1.softnet.si)}" expression="true"&gt;--&gt;<br>
      &lt;condition field="${user_exists(id
      ${destination_number}.fs_kabelvoip1
      fs_kabelvoip1.fs1.softnet.si)}" expression="true"&gt;<br>
      &lt;!-- &lt;condition field="destination_number"
      expression="$"&gt; --&gt;<br>
      &lt;action application="log" /&gt; <br>
      <br>
      &lt;action application="set"
      data="domain_name=fs_kabelvoip1.fs1.softnet.si"/&gt;<br>
      &lt;action application="set"
      data="domain=fs_kabelvoip1.fs1.softnet.si"/&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="export"
      data="destination_number"=$1"/&gt;<br>
      &lt;!--&nbsp; &lt;action application="transfer" data="1000 XML
      default"/&gt; --&gt;<br>
      &lt;action application="set" data="process_cdr=false"/&gt;<br>
      &nbsp;&lt;action application="set" data="domain_name=$${domain}"/&gt;<br>
      &nbsp;&lt;action application="info"/&gt; <br>
      &nbsp;&nbsp;&nbsp; &lt;action application="bridge"
      data="sofia/internal/${destination_number}.fs_kabelvoip1%fs_kabelvoip1.fs1.softnet.si"/&gt;
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- This example maps the DID 5551212 to ring 1000 in
      the default context --&gt;<br>
      <br>
      <br>
      &lt;anti-action application="log" data="INFO #################
      CALL FORWARD ################\n"/&gt;<br>
      &lt;!-- &lt;anti-action application="log" data=" INFO
      sip_redirect_contact_={ip_redirect_contact_}" /&gt; --&gt;<br>
      &lt;!-- &lt;anti-action application="set"
      data="sip_redirect_contex=default" /&gt;&nbsp;&nbsp; --&gt;<br>
      &lt;anti-action application="info"/&gt;<br>
      &nbsp;&lt;anti-action application="set" data="process_cdr=false"/&gt; <br>
      &nbsp;&lt;anti-action application="execute_extension"
      data="{origination_callee_id_name='${sip_req_user}'}IZVEDI_PREUSMERITEV
      XML default"/&gt; <br>
      <br>
      <br>
      <br>
      &nbsp;&lt;/condition&gt;<br>
      &nbsp; &lt;/extension&gt;<br>
      &lt;/include&gt;<br>
    </small><br>
    <br>
    I have also add log to pastebin:
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a href="http://pastebin.freeswitch.org/18575">http://pastebin.freeswitch.org/18575</a><br>
    <br>
    Thanks!<br>
    Miha<br>
    <br>
    On 03/04/2012 09:31 PM, Jo&atilde;o Mesquita wrote:
    <blockquote
      cite="mid:1F1CE9939D004E86A0679267391ABA92@freeswitch.org"
      type="cite">
      <div style="font-family: 'Courier New'; font-size: 13px; ">Yes<br>
      </div>
      <div>
        <div><br>
        </div>
        <div>--&nbsp;</div>
        <div>Jo&atilde;o Mesquita</div>
        <div>Sent with <a moz-do-not-send="true"
            href="http://www.sparrowmailapp.com/?sig">Sparrow</a></div>
        <div><br>
        </div>
      </div>
      <p style="color: #A0A0A8;">On Sunday, March 4, 2012 at 2:17 PM,
        Miha wrote:</p>
      <blockquote type="cite"
style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
        <span>
          <div>
            <div>
              <div>Thank you for that!</div>
              <div><br>
              </div>
              <div>After that I will be able to use variables from
                user/dir?</div>
              <div><br>
              </div>
              <div>Regards,</div>
              <div>Miha</div>
              <div><br>
              </div>
              <div>On Sun, 4 Mar 2012 01:14:13 -0300</div>
              <div> Jo?o Mesquita &lt;<a moz-do-not-send="true"
                  href="mailto:jmesquita@freeswitch.org">jmesquita@freeswitch.org</a>&gt;
                wrote:</div>
              <blockquote type="cite">
                <div>
                  <div>You won't get the user's password in plain text
                    like that</div>
                  <div>EVER. If we did that, we would be considered to
                    be</div>
                  <div>insanely insecure.</div>
                  <div><br>
                  </div>
                  <div>I am guessing you are using SIP only so you can
                    take a</div>
                  <div>look at the dialplan/public.xml file of the
                    default</div>
                  <div>configs. On the end of that file you will see
                    that there</div>
                  <div>is a verification to do dial plan based
                    authentication.</div>
                  <div><br>
                  </div>
                  <div>Look for this extension in particular:</div>
                  <div><br>
                  </div>
                  <div>&lt;extension name="check_auth"
                    continue="true"&gt;</div>
                  <div> &lt;condition field="${sip_authorized}"</div>
                  <div>expression="^true$" break="never"&gt;</div>
                  <div> &lt;anti-action application="respond"
                    data="407"/&gt;</div>
                  <div> &lt;/condition&gt;</div>
                  <div>&lt;/extension&gt;</div>
                  <div>&lt;extension name="transfer_to_default"&gt;</div>
                  <div> &lt;condition&gt;</div>
                  <div> &lt;action application="transfer"</div>
                  <div>data="${destination_number} XML default"/&gt;</div>
                  <div> &lt;/condition&gt;</div>
                  <div>&lt;/extension&gt;</div>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  <div>Regards, </div>
                  <div><br>
                  </div>
                  <div>-- </div>
                  <div>Jo?o Mesquita</div>
                  <div>Sent with Sparrow (<a moz-do-not-send="true"
                      href="http://www.sparrowmailapp.com/?sig">http://www.sparrowmailapp.com/?sig</a>)</div>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  <div>On Friday, March 2, 2012 at 7:09 AM, Miha Zoubek
                    wrote:</div>
                  <div><br>
                  </div>
                  <blockquote type="cite">
                    <div>
                      <div>Hi,</div>
                      <div> </div>
                      <div>in my directory I set variable password
                        (&lt;variable</div>
                    </div>
                  </blockquote>
                  <div>name="password" value="52166"/&gt;) for every
                    user.</div>
                  <blockquote type="cite">
                    <div>
                      <div> </div>
                      <div>After I am doing 302 redirect in my public
                        dialplan and</div>
                    </div>
                  </blockquote>
                  <div>transfer call to extension, I can not use varible</div>
                  <div>pasword.</div>
                  <blockquote type="cite">
                    <div>How can I get varible password, so that I can</div>
                  </blockquote>
                  <div>authenticate call.</div>
                  <blockquote type="cite">
                    <div>
                      <div> </div>
                      <div>public dialplan:</div>
                      <div> </div>
                      <div>&lt;anti-action application="log" data="INFO</div>
                    </div>
                  </blockquote>
                  <div>################# CALL FORWARD
                    ################\n"/&gt;</div>
                  <blockquote type="cite">
                    <div>&lt;!-- &lt;anti-action application="log"
                      data=" INFO</div>
                  </blockquote>
                  <div>sip_redirect_contact_={ip_redirect_contact_}"
                    /&gt; --&gt;</div>
                  <blockquote type="cite">
                    <div>&lt;!-- &lt;anti-action application="set"</div>
                  </blockquote>
                  <div>data="sip_redirect_contex=default" /&gt; --&gt;</div>
                  <blockquote type="cite">
                    <div>
                      <div>&lt;anti-action application="info"/&gt;</div>
                      <div> &lt;anti-action application="set"</div>
                    </div>
                  </blockquote>
                  <div>data="process_cdr=false"/&gt;</div>
                  <blockquote type="cite">
                    <div> &lt;anti-action
                      application="execute_extension"</div>
                  </blockquote>
                  <div>data="IZVEDI_PREUSMERITEV XML default"/&gt; </div>
                  <blockquote type="cite">
                    <div>
                      <div> </div>
                      <div>default dialplan:</div>
                      <div> </div>
                      <div>&lt;condition field="destination_number"</div>
                    </div>
                  </blockquote>
                  <div>expression="IZVEDI_PREUSMERITEV" /&gt;</div>
                  <blockquote type="cite">
                    <div>&lt;condition
                      field="${sip_redirect_contact_user_0}"</div>
                  </blockquote>
                  <div>expression="^0(\d+)$" &gt;</div>
                  <blockquote type="cite">
                    <div>
                      <div>&lt;action application="set"
                        data="process_cdr=true"/&gt;</div>
                      <div> &lt;action inline="true" application="set"</div>
                    </div>
                  </blockquote>
                  <div>data="CALLINGNUMBER=${sip_redirect_contact_user_0}"/&gt;</div>
                  <blockquote type="cite">
                    <div> &lt;action inline="true" application="set"</div>
                  </blockquote>
                  <div>data="USERNAME=${sip_req_user}"/&gt;</div>
                  <blockquote type="cite">
                    <div>
                      <div> </div>
                      <div> </div>
                      <div> </div>
                      <div> </div>
                      <div>&lt;action application="info"/&gt;</div>
                      <div> </div>
                      <div>&lt;action application="set"</div>
                    </div>
                  </blockquote>
                  <div>data="effective_caller_id_name=${sip_req_user}"/&gt;</div>
                  <blockquote type="cite">
                    <div>&lt;action application="set"</div>
                  </blockquote>
                  <div>data="origination_caller_id_name=${sip_req_user}
                    "/&gt;</div>
                  <blockquote type="cite">
                    <div>
                      <div> </div>
                      <div> </div>
                      <div> &lt;action inline="true" application="set"</div>
                    </div>
                  </blockquote>
                  <div>data="PASSWD=${password}"/&gt;</div>
                  <blockquote type="cite">
                    <div> &lt;action application="execute_extension"</div>
                  </blockquote>
                  <div>data="RADIUS_ANI_AUTH XML default"/&gt;</div>
                  <blockquote type="cite">
                    <div> &lt;action application="enum"</div>
                  </blockquote>
                  <div>data="386${sip_redirect_contact_user_0:1}</div>
                  <div>enumsbc.softnet.si (<a moz-do-not-send="true"
                      href="http://enumsbc.softnet.si">http://enumsbc.softnet.si</a>)"/&gt;</div>
                  <blockquote type="cite">
                    <div>
                      <div> </div>
                      <div>&lt;action application="bridge"</div>
                    </div>
                  </blockquote>
                </div>
              </blockquote>
              <div>data="{origination_callee_id_name='${effective_caller_id_name}'}${enum_auto_route}"/&gt;</div>
              <blockquote type="cite">
                <blockquote type="cite">
                  <div>
                    <div> </div>
                    <div> </div>
                    <div>&lt;action application="info"/&gt;</div>
                    <div>&lt;action application="bridge"</div>
                  </div>
                </blockquote>
              </blockquote>
              <div>data="sofia/external/386${sip_redirect_contact_user_0:1}@<a
                  moz-do-not-send="true" href="http://xxx.xxx.xxx.xxx">xxx.xxx.xxx.xxx</a>"</div>
              <div>(<a moz-do-not-send="true"
href="mailto:sofia/external/386$%7Bsip_redirect_contact_user_0:1%7D@xxx.xxx.xxx.xxx">mailto:sofia/external/386${sip_redirect_contact_user_0:1}@xxx.xxx.xxx.xxx</a>)</div>
              <blockquote type="cite">
                <div>
                  <div>/&gt;</div>
                  <blockquote type="cite">
                    <div> </div>
                  </blockquote>
                </div>
              </blockquote>
              <div>_________________________________________________________________________</div>
              <blockquote type="cite">
                <div>
                  <blockquote type="cite">
                    <div>
                      <div>Professional FreeSWITCH Consulting Services:</div>
                      <div><a moz-do-not-send="true"
                          href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a></div>
                    </div>
                  </blockquote>
                  <div>(<a moz-do-not-send="true"
                      href="mailto:consulting@freeswitch.org">mailto:consulting@freeswitch.org</a>)</div>
                  <blockquote type="cite">
                    <div>
                      <div><a moz-do-not-send="true"
                          href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a></div>
                      <div> </div>
                      <div>FreeSWITCH-powered IP PBX: The CudaTel
                        Communication</div>
                    </div>
                  </blockquote>
                  <div>Server</div>
                  <blockquote type="cite">
                    <div>
                      <div><a moz-do-not-send="true"
                          href="http://www.cudatel.com">http://www.cudatel.com</a></div>
                      <div> </div>
                      <div>Official FreeSWITCH Sites</div>
                      <div><a moz-do-not-send="true"
                          href="http://www.freeswitch.org">http://www.freeswitch.org</a></div>
                      <div><a moz-do-not-send="true"
                          href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a></div>
                      <div><a moz-do-not-send="true"
                          href="http://www.cluecon.com">http://www.cluecon.com</a></div>
                      <div> </div>
                      <div>FreeSWITCH-users mailing list</div>
                      <div><a moz-do-not-send="true"
                          href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></div>
                    </div>
                  </blockquote>
                  <div>(<a moz-do-not-send="true"
                      href="mailto:FreeSWITCH-users@lists.freeswitch.org">mailto:FreeSWITCH-users@lists.freeswitch.org</a>)</div>
                </div>
              </blockquote>
              <div><a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></div>
              <div>UNSUBSCRIBE:<a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></div>
              <blockquote type="cite">
                <blockquote type="cite">
                  <div>
                    <div><a moz-do-not-send="true"
                        href="http://www.freeswitch.org">http://www.freeswitch.org</a></div>
                    <div> </div>
                    <div> </div>
                  </div>
                </blockquote>
              </blockquote>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>_________________________________________________________________________</div>
              <div>Professional FreeSWITCH Consulting Services:</div>
              <div><a moz-do-not-send="true"
                  href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a></div>
              <div><a moz-do-not-send="true"
                  href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a></div>
              <div><br>
              </div>
              <div>FreeSWITCH-powered IP PBX: The CudaTel Communication
                Server</div>
              <div><a moz-do-not-send="true"
                  href="http://www.cudatel.com">http://www.cudatel.com</a></div>
              <div><br>
              </div>
              <div>Official FreeSWITCH Sites</div>
              <div><a moz-do-not-send="true"
                  href="http://www.freeswitch.org">http://www.freeswitch.org</a></div>
              <div><a moz-do-not-send="true"
                  href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a></div>
              <div><a moz-do-not-send="true"
                  href="http://www.cluecon.com">http://www.cluecon.com</a></div>
              <div><br>
              </div>
              <div>FreeSWITCH-users mailing list</div>
              <div><a moz-do-not-send="true"
                  href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></div>
              <div><a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></div>
              <div>UNSUBSCRIBE:<a moz-do-not-send="true"
                  href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></div>
              <div><a moz-do-not-send="true"
                  href="http://www.freeswitch.org">http://www.freeswitch.org</a></div>
            </div>
          </div>
        </span> </blockquote>
      <div> <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>