Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Apr 25, 2024 7:26 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Billing based on incoming number
PostPosted: Fri Jul 07, 2006 10:46 pm 
Offline

Joined: Fri Jul 07, 2006 10:42 pm
Posts: 13
Not sure if it already has the ability to do this, but how about different rates based on the access number dialed. ie. 800# vs Local Access number.

Paul


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 15, 2006 1:26 am 
Offline

Joined: Fri Jul 07, 2006 10:42 pm
Posts: 13
Am I the only one interested in this?

Paul


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 15, 2006 6:40 pm 
Offline

Joined: Tue Mar 21, 2006 7:17 pm
Posts: 141
Location: Washington DC
Paul,

Using extracharge_did and extracharge_fee you can add a surcharge for a certain DID number (like adding 2c extra to the rates for an 1800 number). Also you can have ratecards that can match based on the DID (it's called DNID in the RateCard entry form).


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 15, 2006 9:18 pm 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
marcelbarbulescu,

have you ever made either of these approaches work? if so can you please share the details ...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 16, 2006 12:42 am 
Offline

Joined: Tue Mar 21, 2006 7:17 pm
Posts: 141
Location: Washington DC
Actually I implemented extracharge_did and extracharge_fee and I'm using it in production. What problems do you have with it?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 16, 2006 12:59 am 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
i have been trying to get that extracharge_did feature to work but it does not in my case.

i don't understand how it is supposed to capture the DID i'am calling from

i have gerry-rigged it to work differently where I overtly pass it the number I am calling from in the DeadAGI function call

I know that the portion of the routine that compares the numbers in the a2billing.conf and then computes the additional price works. But I can't get the A2B->dnid to work because I don't have a DNID. when I call my DNID value always says unknown

Quote:
// if an extracharge DID number was called increase rates with the extracharge fee
if (strlen($A2B->dnid)>2 && is_array($A2B->agiconfig['extracharge_did']) && in_array($A2B->dnid, $A2B->agico$
{
$fee=$A2B->agiconfig['extracharge_fee'][array_search($A2B->dnid, $A2B->agiconfig['extracharge_did'])$
$A2B->write_log("[CC_asterisk_rate-engine: Extracharge DID found: ".$A2B->dnid.", extra fee: ".$fee.$
for ($i=0; $i<count($this->ratecard_obj); $i++)


Last edited by gue on Sun Jul 16, 2006 1:11 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 16, 2006 1:06 am 
Offline

Joined: Tue Mar 21, 2006 7:17 pm
Posts: 141
Location: Washington DC
The extension in [a2billing] context in extension.conf should be something like "_X.":

[a2billing]
exten => _X.,1,Answer
etc.

It's not capturing the DID you're calling from but the DID you're calling to.
Just make sure that you land in a2billing context with an extension equal to your DID, and put that DID in extracharge_did.

If, for example, you have 18880123456 landing in [from-sip-external], you'll have something like:

[from-sip-external]
exten => 18880123456,1,Goto(a2billing,${EXTEN},1)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 16, 2006 1:17 am 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
thnx will give it a try


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 16, 2006 4:00 am 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
Ok, tested it and :

I only get valid DNID on SIP channels on IAX channel DNID is always "unknown"

therefore in my case it would only work with incoming SIP calls... not IAX ..


Top
 Profile  
 
 Post subject: How to charge different rates based on access number?
PostPosted: Fri Jan 12, 2007 3:23 pm 
Offline

Joined: Fri Dec 22, 2006 2:43 pm
Posts: 76
Location: London, UK
Can someone please simplify this for me?

I need to charge an extra 2c per minute when someone call in on a free phone acces number. When they call in on a local access number then the rate charged is as normal.

Can someone provide me with a step by step procedure of how to achieve this.

thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 12, 2007 5:20 pm 
Offline

Joined: Tue Aug 08, 2006 4:00 pm
Posts: 117
Location: Bitola,Macedonia
gue wrote:
marcelbarbulescu,

have you ever made either of these approaches work? if so can you please share the details ...


Yes Marcel made this for me and work PERFECT and im very very thankful for theat .


Top
 Profile  
 
 Post subject: charging two different rates based on incoming did
PostPosted: Mon Jan 15, 2007 1:21 pm 
Offline

Joined: Fri Dec 22, 2006 2:43 pm
Posts: 76
Location: London, UK
Syaing this now works for after help from Mracel is great but can you please share how you got it to work. I have tried to resolve it based on following information from previous mail but i still can't get it to work.

Please can you tell me in a step by step fashion how to get this resolved.

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 
Predictive Dialer


All times are UTC


Who is online

Users browsing this forum: No registered users and 18 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group