A2Billing video guide Part 3 – Access DDI, customers, test calls and some agi-conf

This is part 3 of the SysAdminMan video guide to getting started with A2Billing. In the previous videos we set up and trunk and a rate card. In this video we set up an access DDI number for calling card customers, we create a customer, and then place some test calls.

We also have a quick look at some of the agi-conf settings that affect how this call is handled.

The system used was a clean install of a SysAdminMan virtual server. You can find more details about this here – http://sysadminman.net/sysadminman-freepbx-a2billing-hosting.html



16 thoughts on “A2Billing video guide Part 3 – Access DDI, customers, test calls and some agi-conf

  1. Ali

    Hello Matt,

    how do you MAP your UK DID number to FREE PBX which is I think is in local area IP .. I mean how do you map did to local IP add of your freePBX ?

  2. matt Post author

    Hi Ali, do you mean how did I do it because 10.x.x.x is a private address? That was just for the documentation, it needs to be forward to an internet accessible address. If your Asterisk server is on a private address you’d need to set up NAT/port forwarding on your firewall to reach it.

  3. James

    Hi matt
    Great tutorial, well explained!! Thanks for that.
    I have a problem,
    (running elastix 2.2 with a2bill 1.9.4, Asterisk
    The trunk is ok, extensions too.
    A2Billing answer the call
    A2B said : Enter PIN Number
    A2B said : You have credit…, please enter the destination You wish to call and press #
    I press 2000#
    A2B said : Everyone is busy/congested at this time

    and before that the log said:

    — Executing [[email protected]:22] Set(“IAX2/trunk1-461”, “pre_num=AMP:Local/”) in new stack
    — Executing [[email protected]:23] Set(“IAX2/trunk1-461”, “the_num=OUTNUM”) in new stack
    — Executing [[email protected]:24] Set(“IAX2/trunk1-461”, “[email protected]/n”) in new stack
    — Executing [[email protected]:25] GotoIf(“IAX2/trunk1-461”, “1?outnum:skipoutnum”) in new stack
    — Goto (macro-dialout-trunk,s,26)
    — Executing [[email protected]:26] Set(“IAX2/trunk1-461”, “the_num=20003|60|HRrL(59400000:61000:30000)”) in new stack
    — Executing [[email protected]:27] Dial(“IAX2/trunk1-461”, “Local/20003|60|HRrL(59400000:61000:30000)@a2billing/n,300,tr”) in new stack
    — Called Local/20003|60|HRrL(59400000:61000:30000)@a2billing/n
    — Executing [20003|60|HRrL(59400000:61000:30000)@a2billing:1] NoOp(“Local/20003|60|HRrL(59400000:61000:30000)@a2billing-7f90;2”, “A2Billing Start”) in new stack
    — Executing [20003|60|HRrL(59400000:61000:30000)@a2billing:2] DeadAGI(“Local/20003|60|HRrL(59400000:61000:30000)@a2billing-7f90;2”, “a2billing.php|1”) in new stack
    — Executing [20003|60|HRrL(59400000:61000:30000)@a2billing:3] Hangup(“Local/20003|60|HRrL(59400000:61000:30000)@a2billing-7f90;2”, “”) in new stack
    == Spawn extension (a2billing, 20003|60|HRrL(59400000:61000:30000), 3) exited non-zero on ‘Local/20003|60|HRrL(59400000:61000:30000)@a2billing-7f90;2’
    — No one is available to answer at this time (1:0/0/0)

    I have set a custom trunk with a Custom Dial String like that “Local/[email protected]/n” to redirect my call through a2b!
    If you can help me with this problem i’d be gratefull. Really gratefull! Thanks a lot in advance!

  4. matt Post author

    Hi James,

    I’m a bit confused about what you’re trying to do. Are you trying to call a2billing and ring x2000, or call out from x2000 via a2billing?

  5. James

    If think I have a pipe problem cause i’m under Ast1.8
    like in this line:
    — Executing [20003|60|HRrL(59400000:61000:30000)@a2billing:2] DeadAGI(“Local/20003|60|HRrL(59400000:61000:30000)@a2billing-c25b;2”, “a2billing.php|1”) in new stack
    Do I only have to modify the Asterisk Version Global in A2B?

  6. matt Post author

    Yes, changing the asterisk version setting in a2billing to 1_6 should sort that out (I don’t think 1_8 works yet), although probably best to change the dial plan to commas to avoid confusion in the future.

  7. James

    I change to 1_6, already but the commas comes with the variables. Should I change the agi?
    Like in the line above I don’t see where this part come from “3|60|HRrL(59400000:61000:30000)” quite strange
    Besides the call still asking me my pin number after a2b tells me how much minutes left (after I entered 2000#)
    Thanks for your consideration matt!!!

  8. James

    Don’t have the problem of pipe anymore but the “3” next to the number to call still here and I think that’s why it is not working.. Do you have an idea on how erase it?

  9. James

    Found it, was using french keyboard and # was understand like 3 … Ringing now thkx for your help!! Continue like that man your tutorial are perfect!

  10. Javid

    hi matt

    Thanks for the great tutorials, they have been helping me alot.

    In your a2billing video 3 you change the destination for inbound route to a custom extension which is a2billing. but I could not understand where did that a2billing destination came from because you didn’t cover that in your tutorials. Could you please let me know in which section you added a custom destination named a2billing.

    my other question was that I have told ukddi.com to route the calls to my public ip. But i dont know which ports should I use to forward to in my asterisk box.

    And last but not least, could you please let me know if i can connect an ip phone to my home landline and then give the asterisk sip settings to the ip phone to connect to my asterisk server. reason I am asking is since I need a local number and uk is not local to me, I was thinking of using my own landline to connect to my asterisk box and receive inbound calls. Thankyou


  11. matt Post author

    Hi Javid,

    There is some integration stuff here that might help – http://sysadminman.net/blog/2009/integrating-freepbx-with-a2billing-621

    For port forwarding you will need port 5060 for SIP and all of the audio ports for the audio (RTP)

    You could connect your local line in to your Asterisk box but you would need an Analogue card, something like this – http://www1.digium.com/en/products/telephony-cards/analog

    Just to mention for points 1 and 2 – the SysAdminMan tempalte has the integration settings already done and does not need NAT port forwarding as all SysAdminMan servers have a dedicated public IP address – http://sysadminman.net/sysadminman-freepbx-a2billing-hosting.html

  12. Javid

    Perfect, Thank you, I was able to get a public address for my asterisk box and take it out of nat and I also found your link for the custom destination very useful.

    About the analog cards, with these cards installed on my asterisk server, would I be able to receive a call and ask for a pin or whatever and then ask them to enter their number and then connect them to their destinations?

    since those cards are very expensive, can I also use a Analog Telephone Adapter like the Linksys PAP2 to enter the sip information of my server (not the providers) so it can receive calls and pass it to the asterisk?

    And lastly with ATA devices, would I be able to keep my landline phone number or I would have to purchase virtual telephone number? Thank you


  13. Javid

    Basically what I want is to be able to keep my landline number and accept incoming calls through PSTN and ask for a number and then dial the number for the user and make outgoing calls through the asterisk. I found SPA3102 to be very useful but I have no idea if it would accept incoming calls from PSTN .Thank ou


Comments are closed.