Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

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


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
yivzhenko at mksat.net
Guest





PostPosted: Thu Apr 02, 2009 7:09 am    Post subject: [Freeswitch-users] Use rates from lcr in nibblebill module Reply with quote

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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
rupa at rupa.com
Guest





PostPosted: Thu Apr 02, 2009 7:46 am    Post subject: [Freeswitch-users] Use rates from lcr in nibblebill module Reply with quote

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/gateway/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/gateway/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/gateway/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@mksat.net (yivzhenko@mksat.net)> wrote:
Quote:
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@lists.freeswitch.org (Freeswitch-users@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
Back to top
yivzhenko at mksat.net
Guest





PostPosted: Fri Apr 03, 2009 8:00 am    Post subject: [Freeswitch-users] Use rates from lcr in nibblebill module Reply with quote

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:
Quote:
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@mksat.net>wrote:
Quote:
Quote:
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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services