asterisk2billing.org • View topic - How to charge different rates based on access number?
How to charge different rates based on access number?
Post subject: How to charge different rates based on access number?
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.
Just to add to what i have said earlier.
I want to charge 2c/min extra for customer that call in on my free phone access number as oppose to those that call in on a local access number.
so local access comes in on exten => _X,2,DeadAGI(a2billing.php|1) and free phone access comes in on exten => _X,2,DeadAGI(a2billing.php|2).
My problem is where do i set the 2c/min extra for calls coming in on freephone access number, as currently i only seem to have separated the calls based on incoming number.
Last edited by anonymous_a on Mon Jan 15, 2007 4:21 pm, edited 1 time in total.
Thanks for the instruction, really appreciated.
I will try to follow this now and see how it goes.
I have one question though before i start, i still don't see where the different charge is going to come in.
Should i set up a different set of ratecards for every destination and then have each line using rate cards accordingly or is there somewhere for me to add 2p/min to all my existing ratecard if call comes in on my freephone access number.
Apologies if i am asking really dumb question but i am not seeing/understanging how to fully achieve this.
...Should i set up a different set of ratecards for every destination..
also i'll put line exten => s,1,Goto(_X.,1) in both sections in exapmle.
I have done as you suggested now. Thanks for the help.
When i call from lets say local access the call goes through fine but when i call through the other number (free phone for example) none of my calls get placed.
I keep getting message saying that "the number i am calling is not available"
Any ideas what could be the reason??
It's me again for the final time on this topic. I think i have got this problem solved now.
Thank you verymuch for your help anest and anyone elase who had an input.
Sorry guys but i have one more issue.
At the moment moment calls coming on Line 1 doesn't get connected to the system while calls coming in on Line 2 does.
If i switched the channels assigned in zapata.conf around so channes assigned to Line 1 comes in on Line 2 then the reverse happens (calls on Line 2 doesn't get connected but Line 1 works fine).
I am not sure where the problem is, can you please help me resolve this issue.
My original problem is solved as i have prooved that extra rate is been applied for calls coming in on freephone access number but i can't get both lines to work at the moment - it's just one or the other.
Any other suggestions, as i still don't know how to solve the problem.
Just to add a bit more information. The calls are not coming into the system at all on one of my lines. It is either one or the other. When one number is dialled i get number not in use when the other is dialled it get connected. If a swith around the channels in zapata.conf then the reverse happens, the other line gives 'number not in use message' and calls go through on the other one.
please post your actual zapata.conf,extensions.conf file here.
Anyone have any ideas why both lines won't work, any possible solution to this problem?