<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Fernando,<br>
      <br>
      I suggest you run &lt;action application="info"/&gt; after lcr
      query and set "fsctl loglevel 7". Then do a test call.<br>
      <br>
      This way you will see where your "tarifa" var goes.<br>
      <br>
      -Victor<br>
      <br>
      <br>
      On 13-11-16 01:09 PM, FERNANDO VILLARROEL wrote:<br>
    </div>
    <blockquote
      cite="mid:1384625359.98108.YahooMailNeo@web162005.mail.bf1.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff;
        font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
        Lucida Grande, sans-serif;font-size:12pt">
        <div><span>Hi Victor thank you for you answer.</span></div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; background-color: transparent;
          font-style: normal; "><span><br>
          </span></div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; background-color: transparent;
          font-style: normal; ">If i have:</div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; background-color: transparent;
          font-style: normal; "><br>
        </div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &lt;profile
          name="pg_prefix2"&gt;</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &lt;param
          name="order_by" value="rate,quality,reliability"/&gt;</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &lt;param
          name="export_fields"
value="nibble_account,nibble_rate,lowbal_amt,nobal_amt,lcr_carrierid_field,tarifa"/&gt;</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &lt;param
          name="custom_sql" value="</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; SELECT l.digits AS
          lcr_digits,</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c.id AS
          lcr_carrierid_field,</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c.carrier_name
          AS lcr_carrier_name,</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
          &nbsp;l.${lcr_rate_field} as lcr_rate_field,</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cg.prefix AS
          lcr_gw_prefix, cg.suffix AS lcr_gw_suffix,</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;l.lead_strip
          AS lcr_lead_strip, l.trail_strip AS lcr_trail_strip,</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;l.prefix AS
          lcr_prefix, l.suffix AS lcr_suffix,</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a.id AS
          nibble_account,</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
          &nbsp;l.${lcr_rate_field} AS nibble_rate,</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a.warn_limit
          AS lowbal_amt,</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a.nobal_limit
          AS nobal_amt,</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a.id_tarifa AS
          tarifa&nbsp;</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM lcr l</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JOIN carriers c
          ON l.carrier_id=c.id</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JOIN
          carrier_gateway cg ON c.id=cg.carrier_id</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JOIN auth_user a
          ON a.id = ${accountcode}&nbsp;</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JOIN tarifas t ON
          t.id = a.id_tarifa&nbsp;</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE c.enabled =
          '1' AND cg.enabled = '1' AND l.enabled = '1'</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND l.digits
          @&gt; '${lcr_query_digits}'</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND
          CURRENT_TIMESTAMP BETWEEN date_start AND date_end</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ORDER BY digits
          DESC, ${lcr_rate_field}, random();</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &nbsp; "/&gt;</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal;
          background-color: transparent; ">&nbsp; &nbsp; &lt;/profile&gt;</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal; "><br>
        </div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal; "><br>
        </div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal; ">How i can
          set &nbsp;variable tarifa in my dialplan like</div>
        <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
          'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
          sans-serif; font-size: 16px; font-style: normal; "><br>
        </div>
        <div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="lcr" data="$1
            pg_prefix2"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="set"
            data="tarifa=${tarifa}"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="bridge"
            data="${lcr_auto_route}"/&gt;</div>
          <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
            'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
            sans-serif; font-size: 16px; font-style: normal; "><br>
          </div>
          <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
            'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
            sans-serif; font-size: 16px; font-style: normal; ">Regards</div>
          <div style="color: rgb(0, 0, 0); font-family: HelveticaNeue,
            'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
            sans-serif; font-size: 16px; font-style: normal; "><br>
          </div>
        </div>
        <div class="yahoo_quoted" style="display: block; "> <br>
          <br>
          <div style="font-size: 12pt; font-family: HelveticaNeue,
            'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
            sans-serif; ">
            <div style="font-size: 12pt; font-family: HelveticaNeue,
              'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
              sans-serif; ">
              <div dir="ltr"> <font face="Arial" size="2"> On Saturday,
                  November 16, 2013 2:58 PM, Victor Chukalovskiy
                  <a class="moz-txt-link-rfc2396E" href="mailto:victor.chukalovskiy@gmail.com">&lt;victor.chukalovskiy@gmail.com&gt;</a> wrote:<br>
                </font> </div>
              <div class="y_msg_container">mod_lcr sets variable that
                you can use as a dial-strings:<br clear="none">
                ${lcr_auto_route}<br clear="none">
                ${lcr_route_1}<br clear="none">
                ${lcr_route_2} etc.<br clear="none">
                <br clear="none">
                You can check all the variables with "info" dialplan
                app.<br clear="none">
                <br clear="none">
                Not sure if this answers your question.<br clear="none">
                <div class="yqt8628578465" id="yqtfd09880"><br
                    clear="none">
                  On 13-11-16 12:30 PM, Fernando Villarroel wrote:<br
                    clear="none">
                  &gt; Hi.<br clear="none">
                  &gt;<br clear="none">
                  &gt; How i can set a channel variable from lcr select&nbsp;
                  (mod_lcr)<br clear="none">
                  &gt;<br clear="none">
                  &gt; Or how i can set some variable from
                  ${lcr_auto_route}<br clear="none">
                  &gt;<br clear="none">
                  &gt; Any idea how i can do?<br clear="none">
                  &gt;<br clear="none">
                  &gt; Enviado desde mi iPhone</div>
                <br clear="none">
                &gt;<br clear="none">
                &gt;
_________________________________________________________________________<br
                  clear="none">
                &gt; Professional FreeSWITCH Consulting Services:<br
                  clear="none">
                &gt; <a moz-do-not-send="true" shape="rect"
                  ymailto="mailto:consulting@freeswitch.org"
                  href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br
                  clear="none">
                &gt; <a moz-do-not-send="true" shape="rect"
                  href="http://www.freeswitchsolutions.com/"
                  target="_blank">http://www.freeswitchsolutions.com</a><br
                  clear="none">
                &gt;<br clear="none">
                &gt; FreeSWITCH-powered IP PBX: The CudaTel
                Communication Server<br clear="none">
                &gt; <a moz-do-not-send="true" shape="rect"
                  href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br
                  clear="none">
                &gt;<br clear="none">
                &gt; Official FreeSWITCH Sites<br clear="none">
                &gt; <a moz-do-not-send="true" shape="rect"
                  href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br
                  clear="none">
                &gt; <a moz-do-not-send="true" shape="rect"
                  href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br
                  clear="none">
                &gt; <a moz-do-not-send="true" shape="rect"
                  href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br
                  clear="none">
                &gt;<br clear="none">
                &gt; FreeSWITCH-users mailing list<br clear="none">
                &gt; <a moz-do-not-send="true" shape="rect"
                  ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org"
                  href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br
                  clear="none">
                &gt; <a moz-do-not-send="true" shape="rect"
                  href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
                  target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br
                  clear="none">
                &gt; UNSUBSCRIBE:<a moz-do-not-send="true" shape="rect"
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
                  target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br
                  clear="none">
                &gt; <a moz-do-not-send="true" shape="rect"
                  href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br
                  clear="none">
                <br clear="none">
                <br clear="none">
_________________________________________________________________________<br
                  clear="none">
                Professional FreeSWITCH Consulting Services:<br
                  clear="none">
                <a moz-do-not-send="true" shape="rect"
                  ymailto="mailto:consulting@freeswitch.org"
                  href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br
                  clear="none">
                <a moz-do-not-send="true" shape="rect"
                  href="http://www.freeswitchsolutions.com/"
                  target="_blank">http://www.freeswitchsolutions.com</a><br
                  clear="none">
                <br clear="none">
                FreeSWITCH-powered IP PBX: The CudaTel Communication
                Server<br clear="none">
                <a moz-do-not-send="true" shape="rect"
                  href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br
                  clear="none">
                <br clear="none">
                Official FreeSWITCH Sites<br clear="none">
                <a moz-do-not-send="true" shape="rect"
                  href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br
                  clear="none">
                <a moz-do-not-send="true" shape="rect"
                  href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br
                  clear="none">
                <a moz-do-not-send="true" shape="rect"
                  href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br
                  clear="none">
                <br clear="none">
                FreeSWITCH-users mailing list<br clear="none">
                <a moz-do-not-send="true" shape="rect"
                  ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org"
                  href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br
                  clear="none">
                <a moz-do-not-send="true" shape="rect"
                  href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
                  target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br
                  clear="none">
                UNSUBSCRIBE:<a moz-do-not-send="true" shape="rect"
                  href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
                  target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br
                  clear="none">
                <a moz-do-not-send="true" shape="rect"
                  href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a>
                <div class="yqt8628578465" id="yqtfd52677"><br
                    clear="none">
                </div>
                <br>
                <br>
              </div>
            </div>
          </div>
        </div>
      </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>