[Freeswitch-users] mod_lcr problem

Rupa Schomaker rupa at rupa.com
Fri Jan 29 16:37:07 PST 2010


turn console logging up to debug and redo the lcr lookup.  The sql
statements along with status info will show up.  This should give
enough information to debug what is happening.

I'm assuming the npanxx table is actually populated and not just existing?

When doing the lookup from the cli you have to tell lcr what CID to
use (remember, it is relative to the src/dest number).  I'm pretty
sure you get something on the console log when you don't specify a CID
when using the commandline.  Anyway:

lcr 617642  default 6176421212

should give you intralata.

Note that the definition of intralata doesn't mean "local" for some
providers.  Some providers define local to "same ratecenter" which is
even more restrictive.

On Fri, Jan 29, 2010 at 4:43 PM, Mouncif Benniane <mouncifbb at gmail.com> wrote:
> i can't make use of mod_lcr using Intra/Interstate rating, I am using
> svn: FreeSWITCH Version 1.0.trunk (16517)
>
> lcr mysql table structure:
> CREATE TABLE `lcr` (
>   `id` INT(11) NOT NULL AUTO_INCREMENT,
>   `digits` VARCHAR(15) DEFAULT NULL,
>   `rate` FLOAT(11,5) DEFAULT NULL,
>   `intrastate_rate` FLOAT(11,5) DEFAULT NULL,
>   `intralata_rate` FLOAT(11,5) DEFAULT NULL,
>   `carrier_id` INT(11) NOT NULL,
>   `lead_strip` INT(11) NOT NULL,
>   `trail_strip` INT(11) NOT NULL,
>   `prefix` VARCHAR(16) NOT NULL,
>   `suffix` VARCHAR(16) NOT NULL,
>   `lcr_profile` VARCHAR(32) DEFAULT NULL,
>   `date_start` DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00',
>   `date_end` DATETIME NOT NULL DEFAULT '2030-12-31 00:00:00',
>   `quality` FLOAT(10,6) NOT NULL,
>   `reliability` FLOAT(10,6) NOT NULL,
>   `cid` VARCHAR(32) NOT NULL DEFAULT '',
>   `enabled` TINYINT(1) NOT NULL DEFAULT '1',
>   PRIMARY KEY  (`id`),
>   KEY `carrier_id` (`carrier_id`),
>   KEY `digits` (`digits`),
>   KEY `lcr_profile` (`lcr_profile`),
>   KEY `digits_profile_cid_rate` USING BTREE (`digits`),
>   CONSTRAINT `carrier_id` FOREIGN KEY (`carrier_id`) REFERENCES `carriers`
> (`id`) ON DELETE CASCADE ON UPDATE CASCADE
> ) ENGINE=INNODB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1
>
>
> lcr_admin show profiles
> Name:           default
>  custom sql:    SELECT l.digits, c.carrier_name, l.${lcr_rate_field},
> cg.prefix AS gw_prefix, cg.suffix AS gw_suffix, l.lead_strip, l.trail_strip,
> l.prefix, l.suffix , cg.codec , l.cid FROM lcr l JOIN carriers c ON
> l.carrier_id=c.id JOIN carrier_gateway cg ON c.id=cg.carrier_id WHERE
> c.enabled = '1' AND cg.enabled = '1' AND l.enabled = '1' AND digits IN
> (${lcr_query_expanded_digits}) AND CURRENT_TIMESTAMP BETWEEN date_start AND
> date_end ORDER BY digits DESC,  ${lcr_rate_field},  quality DESC,
>  reliability DESC, rand();
>  has %:         false
>  has vars:      true
>  has intrastate:        true
>  has intralata: true
>  has npanxx:    true
>  Reorder rate:  enabled
>  Info in headers:       disabled
>  Quote IN() List:       disabled
>
>
>
> lcr 617642  default  returns rate from the rate field table and not
> intra/inter state fields rates.
>
> Any ideas? thanks!
>
>
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>



-- 
-Rupa




More information about the FreeSWITCH-users mailing list