a2billing customers buttons.

just got the license into a test server to see how fop2 works, I use a2billing and would like to see the customer registering via SIP and IAX2 automatically configured from a2b into asterisk.

How can I make them show in a way I can see on the fly how many simultaneous calls each one is using. it would even be better if I could tell how many are incoming and how many are outgoing separately.

on a second wish:) I see each of my trunks and I see every call that is made outgoing, I would like to see also how many channels are in use in each as incoming.

can I later move the license to the production server?

thanks

Comments

  • Hola!

    Trunks will work both for inbound and outbound if the trunk channel is named the same for both directions. But most of the time asterisk is not configured that way or incorrectly, in the sense that incoming are not matched agains any peer and they come as anonymous. If you can configure asterisk trunks so both inbound and outbound match the same peer, then the trunk buttons will show both types of calls.

    If you have a know peer name for inbound and another for outbound, you could create two trunks and see inbound and outbound in their own buttons.

    Regarding a2billing users... I am not sure how you handle them, but it won't be too hard to modify autoconfig-butotns-freepbx.sh to read a2billing configurations (probably from a mysql db ? ) and create buttons accordingly. Now, if you wan't to see how many simultaneous calls each user is having, you might want to list them as type=trunk or increase the line display in presence.js to more than two.

    Best regards,
  • Hello all,

    I too am using FOP2.20, A2Billing1.8, Asterisk 1.8 and FreePBX 2.8. I would also like to be able to list all A2Billing User/Extensions in FOP2.20 so that end users have control over their A2Billing accounts. Has anyone come up with a solution for this yet? (reading from the A2Billing DB or similar) If anyone has successfully completed this it would be fantastic if you could post some pointers or better yet a small tutorial

    All the best
  • As I said before, it is not hard to modify the autoconfig-buttons-freepbx.sh. I do not use a2billing myself, but looking at the tables it uses and doing some guess work you can come up with something like this, that it will probably not work but it will serve as basis, perhaps I did not get the mysql fields exactly right but they will be close:

    mysql -EB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e \
        "SELECT name as channel,'extension' as type, regexten as extension, context, \
        accountcode as label  FROM mya2billing.cc_sip_buddies \
        ORDER BY accountcode" | sed '/\*\*/d' | sed 's/: /=/g' | sed '/.*=$/d' | while read LINEA
    do
    echo $LINEA | sed '/NULL/d' | sed 's/^channel=\(.*\)/\n[\1]/g' | sed 's/^extrachannel/channel/g'
    echo $LINEA 
    done
    

    Appending something like this to the autoconfig script should output buttons for your sip buddies in a2billing

    Best regards,
Sign In or Register to comment.