[Freeswitch-users] Fw: mod_lcr and nibblebill

FERNANDO VILLARROEL fvillarroel at yahoo.com
Thu Sep 11 21:41:54 MSD 2014


Dear.

I need someone to help me




On Wednesday, September 10, 2014 5:24 PM, FERNANDO VILLARROEL <fvillarroel at yahoo.com> wrote:
 


Dear all.

I am trying to use the both modules, but i have problems:

Always the balance decreases and when i cancel the call the destination number ringing anyway.
Also if the customer does not have balance, to try to make a call this goes smoothly
in other words the calls always comes. 


The log http://pastebin.freeswitch.org/23267

My lcr.conf.xml

<configuration name="lcr.conf" description="LCR Configuration">
  <settings>
    <!--<param name="odbc-dsn" value="freeswitch-mysql:freeswitch:Fr33Sw1tch"/>-->
    <param name="odbc-dsn" value="freeswitch:freeswitch:vmo123"/>
  </settings>
  <profiles>
    <profile name="default">
      <param name="id" value="0"/>
      <param name="order_by" value="rate,quality,reliability"/>
    </profile>
    <profile name="qual_rel">
      <param name="id" value="1"/>
      <param name="order_by" value="quality,reliability"/>
    </profile>
    <profile name="rel_qual">
      <param name="id" value="2"/>
      <param name="order_by" value="reliability,quality"/>
    </profile>


    <profile name="pg_prefix2">
        <param name="order_by" value="rate,quality,reliability"/>

        <param name="export_fields" value="nibble_account,nibble_rate,lowbal_amt,nobal_amt"/>
        <param name="custom_sql" value="
        SELECT l.digits AS lcr_digits,
               c.id AS lcr_carrierid_field,
               c.carrier_name AS lcr_carrier_name,
               l.${lcr_rate_field} as lcr_rate_field,
               cg.prefix AS lcr_gw_prefix, cg.suffix AS lcr_gw_suffix,
               l.lead_strip AS lcr_lead_strip, l.trail_strip AS lcr_trail_strip,
               l.prefix AS lcr_prefix, l.suffix AS lcr_suffix,
               a.id AS nibble_account,
               l.${lcr_rate_field} AS nibble_rate,
               a.warn_limit AS lowbal_amt,
            a.nobal_limit AS nobal_amt,
               a.id_tarifa AS tarifa 
          FROM lcr l
            JOIN carriers c ON l.carrier_id=c.id
            JOIN carrier_gateway cg ON c.id=cg.carrier_id
            JOIN auth_user a ON a.id = ${accountcode} 
            JOIN tarifas t ON t.id = a.id_tarifa 
          WHERE c.enabled = '1' AND cg.enabled = '1' AND l.enabled = '1'
            AND l.digits @> '${lcr_query_digits}'
            AND CURRENT_TIMESTAMP BETWEEN date_start AND date_end
          ORDER BY digits DESC, ${lcr_rate_field}, random();
      "/>
    </profile> 
 </profiles>
</configuration>

My Dialplan:


  <extension name="tests">
      <condition field="destination_number" expression="^([23]\d{3})$">
          <action application="lcr" data="$1 pg_prefix2"/>

          <action application="bridge" data="${lcr_auto_route}"/>
      </condition>
    </extension>


What i doing wrong i am follow http://wiki.freeswitch.org/wiki/Mod_lcr#Integrating_with_mod_nibblebill
 
 
I appreciate some help.

regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140911/addda098/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list