[Freeswitch-users] Use rates from lcr in nibblebill module

Yuriy Ivzhenko (WP) yivzhenko at mksat.net
Fri Apr 3 05:43:51 PDT 2009


Thanks for variables and explanation. Work fine!
Now wait for nibblebill can hangup connection when  balance hits 0.00 


On Thursday 02 April 2009 15:37:28 Rupa Schomaker wrote:
> Update the to the latest.  I've added more channel vars:
>
> eg:
>
> after doing:
>
>         <action application="lcr" data="12148267722 default2"/>
> (not a real number)
>
> I get the following:
>
> variable_lcr_query_digits: [12148267722]
> variable_lcr_query_profile: [0]
> variable_lcr_query_expanded_digits: [12148267722, 1214826772, 121482677,
> 12148267, 1214826, 121482, 12148, 1214, 121, 12, 1]
> variable_lcr_route_1:
> [[lcr_carrier=teliax,lcr_rate=0.01000,absolute_codec_string=PCMU]sofia/gate
>way/teliax/12148267722] variable_lcr_rate_1: [0.01000]
> variable_lcr_carrier_1: [teliax]
> variable_lcr_codec_1: [PCMU]
> variable_lcr_route_2:
> [[lcr_carrier=vitelity,lcr_rate=0.01440,absolute_codec_string=PCMU]sofia/ga
>teway/vitelity/12148267722] variable_lcr_rate_2: [0.01440]
> variable_lcr_carrier_2: [vitelity]
> variable_lcr_codec_2: [PCMU]
> variable_lcr_route_count: [2]
> variable_lcr_auto_route:
> [[lcr_carrier=teliax,lcr_rate=0.01000,absolute_codec_string=PCMU]sofia/gate
>way/teliax/12148267722|[lcr_carrier=vitelity,lcr_rate=0.01440,absolute_codec
>_string=PCMU]sofia/gateway/vitelity/12148267722] variable_import:
> [lcr_carrier,lcr_rate]
>
> which, I think is what you are asking for.  If you know which route you are
> going to use (eg: 1) then you can get it's rate by using lcr_rate_1.
>
> Alternatively, you can use the lcr_auto_route and then once the b-leg
> connects, query the b-leg variable for lcr_carrier and lcr_rate to see
> which one was actually used.
>
> You really can't use lcr_auto_route and set a single rate since each leg
> can be rated differently (look at example above).
>
> Normally lcr is used for your own rates between you and your carrier.  That
> is independant of the rate table used for your customers.  You can use lcr
> to query both.  First use lcr to query your own rates using a different
> profile.  This would return a *single* route if you setup your route table
> right.  Save the rate in a var to be used with nibble bill.  Then use lcr
> with your external rates so you can route according to your own cost with
> your carrier(s).
>
> On Thu, Apr 2, 2009 at 5:22 AM, Yuriy Ivzhenko (WP) 
<yivzhenko at mksat.net>wrote:
> > Hi,
> >
> > I want to use module lcr to find a best route and his rate , then make a
> > call
> > and bill on that rate with nibblebill module.
> >
> > lcr return variable "lcr_auto_route" that contains "[lcr_rate=xxx]"
> > variable
> > for new channel.
> > To use nibblebill i need to set "nibble_rate"  = "lcr_rate".
> >
> > What is best method to do that?
> > Is there a way to do that with standard tools, without use external
> > scripts?
> >
> >
> > Thanks,
> > Yuriy
> >
> > _______________________________________________
> > 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





More information about the FreeSWITCH-users mailing list