Diego,<br><br>Here is how I&#39;d go about doing what I think you want.  As payment, add a section to the wiki when you have it working.  <br><br>Create two profiles in lcr.conf.<br><br>the first profile is your callingcard rate deck.  Give it a profile id of 1.  Then load your data into the lcr tables.  <br>
<br>carriers = define your carrier.  call it whatever you want<br>carrier_gateteway = you won&#39;t care about any real routes, so just load dummy data in here (linked to your carrier).<br>lcr = load your rate deck here.  Set profile id to 1.  <br>
<br>Now, to look up the customer&#39;s code, use the lcr application.  <br><br>application=&quot;lcr&quot; data=&quot;$1 profilename&quot; where profilename  is the profile defined in lcr.conf with id 1.  $1 is the normalized number (I suggest e164 format minus the + -- this is discussed in the wiki).<br>
<br>At this point, you&#39;ll have the results of the lcr query in channel vars.<br><br>${lcr_route_count} tells you the number of routes found (if you loaded your rate deck right it should always be 1).  ${lcr_rate_1} will contain the rate.  <br>
<br>So now you can set that to the var you need for nibblebill to work. <br><br>If you want to use lcr to actually route the actual call, just call it again.  This time with the profile id set to whatever you use to load the full lcr table for all your providers.<br>
<br><div class="gmail_quote">On Tue, Jun 9, 2009 at 6:35 PM, Diego Viola <span dir="ltr">&lt;<a href="mailto:diego.viola@gmail.com">diego.viola@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi everyone,<br><br>I&#39;m trying to write a calling card app with A-Z rates, and I plan to use mod_lcr for this case... the only thing I need mod_lcr to do for me is get the rate based on the destination number / prefix.<br>

<br>Is there a way I could achieve this with mod_lcr? I seen the wiki page and the SQL examples, but the SQL examples does a lot more, so I was thinking if I could use a custom SQL query to only do what I need.<br><br>Thanks,<br>
<font color="#888888">
<br>Diego<br>
</font><br>_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>-Rupa<br>