Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Mar 19, 2024 3:33 am
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: How to bill for call extension after dialing in from PSTN
PostPosted: Sat Sep 17, 2011 4:41 pm 
Offline

Joined: Sat Sep 17, 2011 5:12 am
Posts: 11
Please correct me if I post in incorrect section...

I have successfully configured incoming call router, and then call from PSTN is routed to a2billing, and outgoing call can be dialed sucessfully after PIN number is inputted, and Billing for outgoing call through SIP trunk is also sucessful.

However, I also want a2billing to bill for extension call after dialed in from PSTN, which is used to bill for some professional service provided by extension number.
Therefore, could you help to tell me how to configue to bill for customer (Dialling in from PSTN) to dial extension number?

I tested this way but failed: set "PROVIDER IP" to asterisk's IP address in a2billing's trunk UI, and of course added Rate, RateCard, and updated Call Plan, but extension number phone will not ring, though Caller from PSTN heared calling tone :(

I am using Asterisk2Billing - Version 1.3.0 (Yellowjacket) - Release : July 2007, which is provided by elastix 2.0.0.


Top
 Profile  
 
 Post subject: Re: How to bill for call extension after dialing in from PSTN
PostPosted: Sun Sep 18, 2011 9:52 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

Version 1.9.4 has A-Leg billing, which will allow you to set a rate on the inbound leg.

On your version, which I advise you upgrade, you can divert through trunk of tech "local", and in the IP address you want %diallngnumber%@context of extension.

Joe


Top
 Profile  
 
 Post subject: Re: How to bill for call extension after dialing in from PSTN
PostPosted: Sun Sep 18, 2011 2:41 pm 
Offline

Joined: Sat Sep 17, 2011 5:12 am
Posts: 11
Hi Joe,

Thanks a lot for your reply!
I don't prefer to billing for inbound leg, because in my application, extension 200 may have different rate from extension 201, so I guess billing for inbound leg is not proper, right?

On my version, could you give me more detail configuration in a2billing and freePBX?
e.g. should I set "PROVIDER IP" to "%diallngnumber%@a2billing" in a2billing's trunk UI?

BTW, I have used configuration in /etc/asterisk/extensions_a2billing.conf below to route my pstn incoming call to a2billing:
[a2billing]
exten => s,1,Answer
exten => s,n,Wait(1)
exten => s,n,DeadAGI(a2billing.php,1)
exten => s,n,Hangup


Top
 Profile  
 
 Post subject: Re: How to bill for call extension after dialing in from PSTN
PostPosted: Sun Sep 18, 2011 3:47 pm 
Offline

Joined: Sat Sep 17, 2011 5:12 am
Posts: 11
Hi Joe,

after I set "PROVIDER IP" to "%dialingnumber%" in a2billing's trunk UI, the billing for extension number is OK, and I can see the call logs from "CDR Report". That is Great!!

However, when I try to call ring group, I will get "veryone is busy/congested at this time".
So Can I billing for call to ring group, after I dialed in from pstn to a2billing?


Top
 Profile  
 
 Post subject: Re: How to bill for call extension after dialing in from PSTN
PostPosted: Sun Sep 18, 2011 6:01 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

The principles are exactly the same as previously described, simply call the ring group with a dial string of ring-group-extension@context-of-ring-group, and use technology, local

Joe


Top
 Profile  
 
 Post subject: Re: How to bill for call extension after dialing in from PSTN
PostPosted: Mon Sep 19, 2011 3:15 am 
Offline

Joined: Sat Sep 17, 2011 5:12 am
Posts: 11
Hi Joe,

last night, I tried %dialingnumber%@context-of-ring-group, and I even see the trace "Called 600@ext-group", in which 600 is my ring group number, and ext-group is the context-of-the-ring-group, but call still can't be estiblished.

I may try again...if the direction is correct.

Brandon


Top
 Profile  
 
 Post subject: Re: How to bill for call extension after dialing in from PSTN
PostPosted: Mon Sep 19, 2011 3:18 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

Can you show us an extract of the "full" log?

Joe


Top
 Profile  
 
 Post subject: Re: How to bill for call extension after dialing in from PSTN
PostPosted: Mon Sep 19, 2011 3:16 pm 
Offline

Joined: Sat Sep 17, 2011 5:12 am
Posts: 11
Hi Joe,

Thanks for your great support!
Below is my trace, and you can see "Called 600@ext-group", and at that time, I can hear the waiting tone from caller, but no any ring on my 600 ring group.

a2billing.php,1: file:Class.A2Billing.php - line:656 - && && 7&& 0
-- <DAHDI/1-1> Playing 'prepaid-enter-dest.gsm' (language 'en')
Elastix*CLI>
Elastix*CLI>
Elastix*CLI>
Elastix*CLI>
a2billing.php,1: file:Class.A2Billing.php - line:663 - RES DTMF : 00600
a2billing.php,1: file:Class.A2Billing.php - line:681 - DESTINATION ::> 00600
a2billing.php,1: file:Class.A2Billing.php - line:683 - RULES APPLY ON DESTINATION ::> 600
a2billing.php,1: file:Class.A2Billing.php - line:721 - OK - RESFINDRATE::> 1
a2billing.php,1: file:Class.A2Billing.php - line:743 - RES_ALL_CALCULTIMEOUT ::> 1
a2billing.php,1: file:Class.A2Billing.php - line:760 - TIMEOUT::> 89460 : minutes=1491 - seconds=0
-- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
-- <DAHDI/1-1> Playing 'digits/1.gsm' (language 'en')
-- <DAHDI/1-1> Playing 'digits/thousand.gsm' (language 'en')
-- <DAHDI/1-1> Playing 'digits/4.gsm' (language 'en')
-- <DAHDI/1-1> Playing 'digits/hundred.gsm' (language 'en')
-- <DAHDI/1-1> Playing 'digits/90.gsm' (language 'en')
-- <DAHDI/1-1> Playing 'digits/1.gsm' (language 'en')
-- Playing 'prepaid-minutes' (escape_digits=#) (sample_offset 0)
a2billing.php,1: file:Class.RateEngine.php - line:960 - app_callingcard: Dialing 'SIP/600@ext-group|60|HRrL(89460000:61000:30000)' with timeout of '89460'.
a2billing.php,1:
a2billing.php,1: file:Class.RateEngine.php - line:985 - app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'.
-- AGI Script Executing Application: (Dial) Options: (SIP/600@ext-group|60|HRrL(89460000:61000:30000))
-- Limit Data for this call:
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called 600@ext-group
Elastix*CLI>
Elastix*CLI>
Elastix*CLI>
Elastix*CLI>
-- Remote UNIX connection
-- Remote UNIX connection disconnected
-- SIP/ext-group-00000001 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
a2billing.php,1: file:Class.RateEngine.php - line:1095 - [USEDRATECARD - FAIL =0]
-- Playing 'prepaid-dest-unreachable' (escape_digits=#) (sample_offset 0)
a2billing.php,1: file:Class.RateEngine.php - line:848 - [CC_asterisk_stop QUERY = INSERT INTO cc_call (uniqueid,sessionid,username,nasipaddress,starttime,sessiontime, calledstation, terminatecause, stoptime, calledrate, sessionbill, calledcountry, calledsub, destination, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buyrate, buycost, id_card_package_offer) VALUES ('1316445248.2', 'DAHDI/1-1', '7101165146', '', CURRENT_TIMESTAMP - INTERVAL 0 SECOND , '0', '600', 'CONGESTION', now(), '0.02', '-0', '', '', 'China', '2', '3', '3', '4', '13693619356', '0', '0.014', '0', '0')]
a2billing.php,1: file:Class.RateEngine.php - line:851 - [CC_asterisk_stop 1.1: SQL: DONE : result=1]
a2billing.php,1: file:a2billing.php - line:309 - [a2billing account stop]
a2billing.php,1: file:a2billing.php - line:169 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php,1: file:a2billing.php - line:170 - [CREDIT : 29.82000][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php,1: file:Class.A2Billing.php - line:656 - 0 && && 7&& 1
-- <DAHDI/1-1> Playing 'prepaid-enter-dest.gsm' (language 'en')
Elastix*CLI>
a2billing.php,1: file:Class.A2Billing.php - line:663 - RES DTMF :
a2billing.php,1: file:Class.A2Billing.php - line:681 - DESTINATION ::>
a2billing.php,1: file:Class.A2Billing.php - line:683 - RULES APPLY ON DESTINATION ::>
a2billing.php,1: file:a2billing.php - line:169 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php,1: file:a2billing.php - line:170 - [CREDIT : 29.82000][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php,1: file:Class.A2Billing.php - line:656 - 0 && && 7&& 2
-- <DAHDI/1-1> Playing 'prepaid-enter-dest.gsm' (language 'en')
Elastix*CLI>


Top
 Profile  
 
 Post subject: Re: How to bill for call extension after dialing in from PSTN
PostPosted: Mon Sep 19, 2011 3:49 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Quote:
-- AGI Script Executing Application: (Dial) Options: (SIP/600@ext-group|60|HRrL(89460000:61000:30000))


You are using the tech type SIP,

Quote:
...you can divert through trunk of tech "local",...


Top
 Profile  
 
 Post subject: Re: How to bill for call extension after dialing in from PSTN
PostPosted: Mon Sep 19, 2011 4:21 pm 
Offline

Joined: Sat Sep 17, 2011 5:12 am
Posts: 11
Hi Joe,

It works! That's great!!

Thanks a lot! :)

Brandon


Top
 Profile  
 
 Post subject: Re: How to bill for call extension after dialing in from PSTN
PostPosted: Fri Apr 13, 2012 7:51 pm 
Offline

Joined: Thu Apr 12, 2012 12:19 am
Posts: 2
Hello, I know this post is old but I have search everywhere to try and find a solution but have had no luck.

Here is what I have so far. asterisk 1.8, freepbx 2.9.x and a2billing installed and all are working great! I can call into the system
and enter the extension that I want to call, call goes out and is billed correctly.

Here is what I need. I currently have 126 extensions that point to a followme destination, each extension has the ability
to set the rate that they would like to charge to take the call. I need the ability to set up a rate card for each extension so that
for example some dials ext 1001 they are billed X.XX per minute but if they dial 1002 they are billed Y.YY per minute and so on.

I have tried setting the DNID to the extension number (i.e. 1001) and when I run the simulator it pulls up the correct rate when placing 1001 as the number i would like to call. the problem is that I get the "number you are trying to call is unavailable" message when calling through the system. if I remove the rate card it defaults back to the ratecard with DNID set to all and charges rate based on that cards rates.

I have the following trunk settings: tech is set to local and IP/HOST is set to %dialingnumber%

As I said above, this setting works great until trying to set ratecards for each extension using DNID = extension number XXX

Any tips, I would be greatful. My apologies if this is posted in the wrong area, this is my first post and was not sure what to do!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group