1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you had a PIAF Forum account in the vBulletin days, log in with your old credentials. Otherwise, sign up again and we'll get you back in business as soon as we can.
  3. A serious FreePBX vulnerability has been reported. Update your Framework Module immediately. Click here for details.

A2Billing - An Adventure in PBX Billing - Part 1

Discussion in 'Add-On Install Instructions' started by tshif, Dec 18, 2008.

  1. jroper Guru

    Well that part sounds right.

    Can you disable calling SIP IAX friends in a2billing.conf in the appropriate agi-conf as I do not think you need that functionality, and this I think is what is causing your problems.

    When you have done this, then you should be prompted for a PIN, Balance read out, prompted for number to call.

    Joe
  2. sri2talk New Member

    Joe,

    Thanks for the tips. However, what baffles me is why is custom-a2billing-2 not working even when it is the same dial plan as custom-a2billing.

    The problem is occurring when we are supposed to jump to the custom-a2billing-2 context. So, it is not the a2billing.php|2 (agi-conf2) issue. I am not an expert but is there a string length limit to context names?

    "dialplan show" diplays the two contexts to be almost identical.

    I am baffled.
  3. therock112 Member

    Ok, in that case, I will hold off.

    I am interested in installing the A2Billing on a production system, but I am not eager to mess up a perfectly working setup.

    I guess till something is officialy released by you (piaf team) , I can wait.
  4. gomonn Member

    Chapeau!

    Yes indeed, hat off for you Tony .....
    How many hours have you spent writing all these detailed instructions ?
    I am planning to install A2billing on a production system, but wanted to go through your instructions first .... I copied and pasted everything you wrote, ended up with a 74 pages document :eek:
    Whatever I write here will not express enough my admiration and gratitude to you ...
    PS: Do you have a wishlist ? :smile5:
  5. tshif Guru

    Thank you so very much for the extreemly gracious and kind words. I do wishyou the very best with your deployment. I hope the article will help folks understand a little better how a2b works under the hood. Cause we all know, when we truly understand whats going on, its way easier to maintain and troubleshoot if needed.

    As to how many hours? Oh many more than I would like to admit. And without the ear, help, and encoragement of Joe Roper to help my poor brain understand certain concepts of a2b so I could right about it more clearly, the article might never have been done at all.

    I do have a wishlist! Everyone should. I just wish I could remember my password to it!

    -tshif
  6. evp New Member

    Hi Tony, great howto. I had tried to install and configure A2B before but gave up. Thanks to you I know have it installed and functioning on a test server. Thanks so much...

    In this section you describe how to connect 2 boxes where only 1 has the outbound trunks. Is their a way to do this and still maintain only 1 install of A2B and have 2,3 or more boxes all with trunks.

    The reason I need this is that in Portugal I can not purchase geographical did's unless I have an office in the specific location. Put another way, if I am in Porto my Lisbon did's can not be routed to me, they have to be routed to Lisbon. So I would of course need a box in Lisbon with isdn trunks and a box in Porto with trunks.
  7. jroper Guru

    Hi

    You can do this with FreePBX in the remote sites, although it is easy enough with A2Billing or vanilla asterisk

    On the remote PBX, set up a custom extension, and in the dial string put sip/35121xxxxxx@ipaddressofA2Billing

    Now bring in your DID to inbound routes, and point it to the extension you just created.

    This will send the call directly to A2Billing.

    Joe
  8. krzykat Guru

    A2billing is now up to release version 1.6.

    Anyone braved doing an install of it yet?
  9. madoleh New Member

    What has to be changed in the install-a2billing script, so we can install the new version? The given is the name of the app, but do we need to update anything with the sql portion of the script?
  10. blanchae Guru

    Using Asterisk 1.6.2.0, FreePBX 2.5.2.2

    After update-scripts16 and update-fixes16, the install-a2billing is in the DOS format (CR+LF) to end lines. When run, it immediately comes up with an error and stops. The fix is to convert it back to unix using:

    dos2unix /usr/local/sbin/install-a2billing

    Then the script works correctly.

    Hit return (note enter and return are different - must use keyboard return not keypad enter), accept all defaults even those that say they can't find the path to an application then "install Bundle:CPAN" There is an option in the beginning to follow or ask about all changes - select follow otherwise you will be babysitting the complete install, hitting the enter key and accepting anyways... Took about 30 minutes to download everything from CPAN (perl repository)

    It will stop at the CPAN> prompt, you are supposed to type:

    install Config::IniFiles
    reload
    quit

    But it didn't work -said it couldn't find Config::IniFiles, so I just typed exit. On a second server when it came to the "install Bundle:CPAN", I did a "install Config::IniFiles" and it worked then I did the "install Bundle:CPAN".

    There were some errors messages on server 1 but none on server 2:

    Can't locate Config/IniFiles.pm @ INC
    starting a2billing-callback-daemon failed

    Not too worried about them as it also gave instructions to reboot at the earliest available time. So I rebooted and it came up fine. Point your web browser to your PiaF server and two new buttons show up on the Kennosoft Admin menu: A2Billing Administration and A2Billing Customers. The default admin username/password is: root/myroot, no customer accounts are setup yet so couldn't login to customer button.

    I had installed the FreePBX A2billing Admin module and it works fine too - same menus as the A2billing Administration button.
  11. bhuffman New Member

    IVR to DISA with Billing

    This is the best source of information on A2billing / asterisk that I've seen anywhere. Thanks so much Tony and Joe!

    I don't know if you guys still read this, but I have a question. I'm setting things up very closely following this document with a few changes here and there. But I'm having problems trying to get DISA working as an option to an IVR.

    I would *like* to use FreePBX's DISA functions and I even modified the DISA function in FreePBX to set an accountcode. But it seems that there's something screwy about the CDR in asterisk for DISA in that it isn't registering the duration correctly for the outgoing call (I always see 0 in A2Billing even if there's a much longer duration).

    So...I figured that I'd try doing only the IVR in FreePBX and then create a custom destination to go to a 2nd agiconf file in A2Billing (b/c I want to force callerID to a new value on the outgoing call). So, I did this and I *still* get a 0 duration on the outgoing call. I've also played with the answer_call variable in the agiconf changing it from "No" to "Yes" for the associated conf file, but it doesn't seem to help.

    Can you make any suggestions? I'm about out of ideas.

    Thanks,
    Brian
  12. jroper Guru

    Hi

    I'd have to recheck the code, but as far as I can remember the DISA code in FreePBX does not actually use the asterisk DISA application, and you are running into the Double Dial issue.

    I would suggest building a short piece of code by hand that uses the Asterisk DISA app, and I think everything will be fine.

    Joe
  13. bhuffman New Member

    Joe,

    What's the Double Dial issue?

    Thanks,
    -b
  14. jroper Guru

    Hi

    The "Dial" command is used twice, once to dial A2Billing, and the second time by A2Billing to dial the trunk. The CDR stop recording on the second dial.

    So you have to use a "goto" a context, rather than "dial" a context to get from one part of the dial plan to another.

    Joe
  15. bhuffman New Member

    I should mention that I'm trying to run both legs through a2billing - the incoming (as done with a2billing-did detailed in this post) and the outgoing via DISA.

    Is it possible to do this? I imagine there are two dial commands since I'm coming in via a2billing-did and then trying to go back out through the A2B trunk.

    -b
  16. bhuffman New Member

    So is it possible to use a2billing to bill both parts of the DISA (call in and call out)? If so, how?

    Thanks,
    Brian
  17. jroper Guru

    Hi

    I've never tried, so you would have to try it and let us know.

    A2Billing does not currently have A Leg billing.

    Joe
  18. bhuffman New Member

    So even if you call A2Billing twice (once on the incoming DID as done in this thread via the a2billing-did custom context and then again on the outgoing trunk via macro-dialout-trunk-predial-hook), you can't get A2billing to bill both calls? They both show up in the CDR, but one has a duration of 0.

    Sorry to go over this so much, but I've just got a small residential install and I'm trying to figure out a way (even if it's not pretty or efficient) to automate my billing tasks to friends and family members. I guess I could even just double the rate on the leg that *does* bill correctly.

    Thanks again,
    Brian
  19. bhuffman New Member

    Joe,

    I know that a2billing doesn't have "A leg billing" - but my understanding is that's just a convenient way of putting both channels together in the same call. Shouldn't you be able to run both legs independently through A2B as long as each leg only has one dial? Isn't that how the follow-me (which includes an external number) works in this write-up?

    Thanks,
    Brian
  20. jroper Guru

    Hi

    I'm not sure of the answer, as I have not given it a great deal of thought. I imagine it should be possible, but you will have to do some experimentation.

    Joe

Share This Page