Before I started the setup, I upgraded A2Billing from 1.07 to 1.2.2 following the instructions at http://www.sureteq.com/asterisk/a2b.htm. Note, the instructions now tell you how to upgrade to 1.2.3.  If you want to upgrade from 1.2.2 to 1.2.3, look at the 8/17/06 post here:
http://www.trixbox.org/modules/newbb/viewtopic.php?topic_id=1997&forum=1&viewmode=flat&order=ASC&start=10

PART I. (Part I added 8/14/06; Mod 12/20/06)

Before setting up A2Billing, you will need to "activate" A2Billing in Trixbox.

1. Go to Trixbox main page. http://<ipaddress>
2. Click on System Administration
    You will be prompted for login name (maint) and password.
3. Click on Config Edit
4. Click on extensions_trixbox.conf
5. Modify the following to this:
BEFORE:
; un-comment the 6 lines below to work on incoming DIDs
;[custom-callingcard]
;exten => s,1,Answer
;exten => s,2,Wait,2
;exten => s,3,DeadAGI,a2billing.php
;exten => s,4,Wait,2
;exten => s,5,Hangup

AFTER:
; un-comment the 6 lines below to work on incoming DIDs
[custom-callingcard]
exten => s,1,Answer
exten => s,2,Wait,2
exten => s,3,DeadAGI,a2billing.php
exten => s,4,Wait,2
exten => s,5,Hangup

6. Click on Update at bottom of page.
7. Click on Re-Read Configs in header.
8. [added 12/20/06] If you have a dedicated DID for A2B, don't forget to set up an Inbound Route to direct the calls to "custom-callingcard,s,1"
     

 

PART II.

1. Log into A2Billing by going to http://<ip address>/a2billing
2. Log in using the password you used after the upgrade
3. Click on "+" sign next to TRUNK
4. Click on Create Provider
a. Enter Name of one of your IAX2/SIP providers. I entered Voipstreet
b. Enter a description, if desired.
c. Click on Confirm Data to save.
I'm not sure of the importance of this step. I think it is here to help keep track of your trunks?
5. Click on List Trunk. You will see a trunk labeled "default" already listed.
6. Click on the edit icon for the default trunk.
a. Voip-Provider. Select the voip provider you set up in step 4. I selected Voipstreet
b. Enter Label. I entered the name of one of my trunk providers, voipstreet
c. Add prefix. I didn't need to add anything here, you may have to.
d. Remove prefix. Again, I didn't need to add anything here either.
e. Provider tech. I left it as IAX2 since that is how I connect to voipstreet
  f. Provider IP. I used the "trunk name" as entered in the Outgoing Settings of my voipstreet trunk I set up in Trixbox. For me, I entered "voipstreet".
g. Additional parameters. Again, I left this one blank.
  h. Failover Trunk. You can leave this as "Not Defined" or select another trunk you have set up. If this is the first trunk you are setting up, then there is nothing for you to select.
i. Click on Confirm Data to save.
  I would enter a new trunk for every provider you may have. If you are going to run a calling card business, you better have more than one.
7. Click on "+" sign next to RATECARD.
8. Click on Create New RateCard.
  a. TariffName. I set up the first one as "USA_tariff1". I used this name because I may set up other USA rates later. You can come back and set up other rates later for different trunks. I also set up a rate card for USA toll free.
  b. Starting Date. Default is current date/time. I would leave as-is.
  c. Expiration Date. Default's to 25 years from now. I guess you could set up an expiration date if maybe you were running a "sale" on rates for defined period of time?
  d. Trunk. Select a Trunk you have set up in step 6.
  e. Description. Optional
  f. DNID prefix. I left as "all".
  g. Click on Confirm Data to save.
9. Click on Add Rate
  If you are setting up A-Z type service, you will probably want to learn how to use Import Ratecard function.
  a. Ratecard. Select the ratecard you set up in step 8. I selected "USA_tariff1".
  b. Dialprefix. Since this is a USA rate, I entered "1". This is were you would enter the country code. This setting is what A2Billing uses to determine what to charge the caller. I set up my calling card system for dialing Russia first because a friend on mine is from Moscow. As with many countries, the rates can vary drastically by which number you dial. I set up different rates for different parts of Russia. i.e. I set up on to match Moscow, 0117095. Moscow is much cheaper than other areas of Moscow. If I had only set up one for 0117 (matching anywher in Russia), I could have screwed myself if I only charged for Moscow rates. Be carefull of using "1" because several US territories use 1 but have significantly higher rates.
  c. Destination. I entered "USA48-toll" so I would remember this rate is just for continental 48, non toll-free numbers.
  d. Buying Rate. Enter the rate at which your voip provider will charge you. In my case, voipstreet charges $0.019.
  e. Buyrate Min Duration. Enter the minimum duration your voip provider charges you. voipstreet min is 60 seconds.
  f. Buyrate Billing Block. Billing increment after initial (min) duration. voipstreet block is 15 seconds.
  g. Selling Rate. Enter value you will charge your customer. (This is where you make your money :)).
  h. Sellrate Min Duration. Enter value of minimum charge duration. Should be equal to or greater than (e) above.
  i. Sellrate Billing Block. Again, should be equal to or greater than (f) above.
  j. Connect charge. If you want to charge a connection charge just for making call, enter value here.
  k. Disconnect charge. Same as connect charge, except occurs at hangup.
  l. Start Date. Default is date of rate set up.
  m. Stop Date. Default is 10 years from set up date.
  n. Start Time. I would leave as "0".
  o. End Time. I would leave as "10079"
  p. Trunk. Select Trunk. I selected my voipstreet trunk I set up in Step 6.
  q. Click on Confirm Data to save.
10. Click on Create TariffGroup under RATECARD
  Tariffgroups can be used to set up different access levels for your customers. i.e. Based on how you set up your rate cards, you can control or limit access to certain countries. Maybe only some customers are allowed to dial US numbers. See 12.d below.
  a. Tariffgroupname. Enter a name. Being the creative guy I am, I entered "TariffGroup1".
  b. LC Type. I would leave as LCR. This is better for seller (you).
  c. Remove Inter Prefix. I left as "no".
  d. Click on Confirm Data to save.
  e. Now click on edit on right hand side to edit TariffGroup (TariffGroup1) you just set up.
  f. You will now see additional option labeled Tariffplan. A list of Tariffplans is below this. Select a Tariffplan and click on Add button.
  g. Click on Confirm Data to save.
11. Click on "+" sign next to CUSTOMERS.
12. Click on Create Customer
  a. You will notice that the first 3 fields (Card Number, Card Alias, and Webui password) are filled in automatically. The Card Number is the "calling card number" as would be shown on the front of a calling card. The Card alias is used as the login name for the web access. The webui password is the password for web access to the customer's account.
  b. Enter initial balance (US $).
  c. Select Language of customer.
  d. Tariffgroup. Select Tariffgroup you previously set up.
  e. Didgroup. (See DID)
  f. Campaign. (See Predict-Dialer)
  g. Callback. ?
  h. Activated. Leave as Yes if you want your customer to be able to use his/her card.
  i. Simultaneous acces. I left as Individual access. I guess depending on circumstances, you could allow simultaneous access.
  j. Currency. I left as USD.
  k. Run Service. ?
  l. Card type. Leave as Prepaid Card unless you want to start giving your customers lines of credit.
  m. Credit limit. Establish credit limit if allowing Postpay.
  n. First use date. Set first date customer allowed to use card.
  o. Expiration days. Enter number of days card will expire. Leave as 0?
  p. VAT. VAT tax for our European friends.
  q. Next 10 fields are self-explanatory
  r. SIP account. Allow customer SIP access. Creates SIP friend. Like allowing BYOD.
  s. IAX account. Similar to SIP account.
  t. In Use. Leave as 0
  u. Click on Confirm Data to save. Should take you back to Customer List.
  v. Now click on edit next to the customer you just set up.
  w. Scroll down to bottom. You now have option to set up caller id info for customer. I think this allows the customer to call in and not have to enter calling card number if he is calling from the DID listed. See customer access web page.
  x. Click on Confirm Data to save any changes.
     

Part III (Part III added 8/15/06)

You will likely need to perform the following instructions if you keep getting "card in use" message and have to manually reset In-Use to 0 to get it working again.  This applies to Trixbox v.1.1.1.

1. From the CLI, type:
wget http://easynews.dl.sourceforge.net/sourceforge/phprpms/php-pcntl-4.3.11-2.5.1.i386.rpm
2. Then type: rpm -ivv php-pcntl-4.3.11-2.5.1.i386.rpm
     

 

Part IV (Part IV added 12/20/06)

I highly recommend following the Bugs forum at http://forum.asterisk2billing.org/index.php. Here you can find/follow needed patches. I am including links here to a few of them.  These apply to v.1.2.3.

1. Signup page doesn't work correctly.  After completing the signup page and click on the Confirm Data button, the screen seems to hang, though the user will be created within A2B.  Discussion and a patch can be found here:
http://forum.asterisk2billing.org/viewtopic.php?t=732
2. To fix the ratecard in the Customer screen, look here: http://forum.asterisk2billing.org/viewtopic.php?t=875
3. Fix for voucher on Customer screen: http://forum.asterisk2billing.org/viewtopic.php?t=759
4. Two users at once.  Read through all the messages on this one before applying fix (hint: the first patch doesn't work correctly).  http://forum.asterisk2billing.org/viewtopic.php?t=798
5. Unknown or no CallerID fix.  See these:
http://forum.asterisk2billing.org/viewtopic.php?t=1242
http://forum.asterisk2billing.org/viewtopic.php?t=1000
6. A charge to one card shows up on all cards:
http://forum.asterisk2billing.org/viewtopic.php?t=1105
7. Add Charge error still being worked on.
http://forum.asterisk2billing.org/viewtopic.php?t=541
   
  Other Miscellaneous facts.
  Must open port 445 to allow Paypayl to send automatic notifications to your A2B system when payments are made.
     

Also see: http://forum.asterisk2billing.org/ for additional help.

Please send email to talkpbx at gmail.com for corrections.

If you are interested in paying for assistance in setting up A2B, contact support @ talkpbx.com.  I'm sure Areski can also be contacted for support as well.  Don't forget to donate to A2B.  Visit http://www.asterisk2billing.org/ for a link to donate to Areski.  While you are in the giving mood, don't forget to throw some dough towards Trixbox and FreePBX.  If you want to help me out, click on the Google ads.

Page last edited: 12/21/2006 02:14 EST