Tag

asterBilling

config trunk and failover trunk in asterbilling

By | Tutorials | No Comments

in the new asterbilling, we provide a reselleroutbound.agi, so you can specific different reseller use different trunk (ex. each reseller use a account in a2billing), and you can config a failover trunk for the reseller.

Howto::

a) in your asterisk, add a context in your dialplan for reselleroutbound.agi, in directory scripts, we also provided a conf file named “extensions_astercc.conf”, [asterbilling- outbound] is the context for reselleroutbound.agi, if you have installed astercc via the shell script install.sh, this conf file will be moved to your asterisk etc folder, and add a new line in your extensions.conf  “#include extensions_astercc.conf”, now you can use [asterbilling-outbound] as the context for asterbilling, if you are using asterCC-Box, it’s configed already. If you installed astercc manually, you would like to copy  extensions_astercc.conf  to asterisk etc folder(usually it’s /etc/asterisk ), and add the include line in your extensions.conf (#include extensions_astercc.conf, if it’s a system based freepbx, please add this line to /etc/asterisk/extensions_custom.conf)

extensions_astercc.conf

extensions_astercc.conf

b)config the trunk for reseller

reseller_trunk1

when clid dialout, it’ll use turnk1 first and if  dail failed, it’ll try to dial by trunk2

There are three type of trunk: auto,default and customize

auto:reselleroutbound.agi don’t proccess anything,and  goto next step of context

default:your can select a default trunk that set in [resellertrunk] segment asterbilling.conf.php,  could be set tow default system trunk:

[resellertrunk] trunk1_type = sip
trunk1= reselleroutbound1
trunk2_type = sip
trunk2= reselleroutbound2

customize:add new trunk for this reseller,should click “reload” button to generate asterisk conf file when saved trunk infomation

reseller_trunk2en

when you add the trunk for the first time, when you reload, if will have two conf file: sip_astercc_registrations.conf  and  sip_astercc_trunks.conf , if you are not using astercc-box, please include these files to your sip.conf(for freepbx based system, please add  #include sip_astercc_registrations.conf to /etc/asterisk/sip_registrations_custom.conf, and add #include sip_astercc_trunks.conf  to /etc/asterisk/sip_custom.conf, and then do sip reload in asterisk , for the next time you add trunk, just need click the “reload” button.

why i cant see booth history when can see the calling call?

By | asterBilling | 2 Comments

some customers find that they can see live booth calls(screen 1) but when call is done, nothing appears in the booth box(screen 2).

live call in booth window

nothing in booth box

this happens coz the admin set sip account in “clid” when it should be “caller id” check table “mycdr” you will find that the “src” filed would be a number which doesnt match with “channel” field to fix this, just go to “clid” in asterbilling and change the clid to be the number in src field

how to upgrade astercc

By | asterBilling, asterCRM | 2 Comments
  • upgrade database unzip the package u could see folder “sql” where we put all database files, in asterCC 0.X it would looks like: astercc0.1b-0.1.sql astercc0.1-0.11.sql astercc0.11-0.12b.sql astercc0.12b.-0.12sql astercc0.13-0.14b.sql astercc….0.X.sql astercc.sql say you are using 0.1b now, so you have to execute astercc0.1b-0.1.sql, astercc0.1-0.11.sql, astercc0.11-0.12b.sql, astercc0.12b.-0.12sql until astercc…0.X.sql, then u get database of v0.X the command line for this is like mysql -uroot -p astercc < astercc….0.X.sql
  • stop astercc daemons /opt/asterisk/scripts/astercc/asterccd stop
  • cp the new html & daemon files, please notice that you may want to backup astercrm.conf.php, astercc.conf and asterbilling.conf.php first example: cp astercrm /var/www/html -rf cp asterbilling /var/www/html -rf cp scripts/* /opt/asterisk/scripts/astercc * from astercc-0.21, the package includes both 32bit and 64bit scrips, you will copy the scripts out of 32/ or 64/ to your daemon folder (usually /opt/asterisk/scripts/astercc)
  • config conf files check your astercc.conf, asterbilling.conf.php, astercrm.conf.php, make sure you have the correct config
  • start astercc daemons /opt/asterisk/scripts/astercc/asterccd start
  • check crontab we provides some cron script to deal with recording files and CDRs, so open README, make sure you have the scripts configed in your crontab
  • login web and check if any errors

new feature in asterbilling

By | asterBilling | No Comments

we provide a new feature in asterbilling, you can read your buy rate when add a sell rate manually.

say admin set three rates for reseller:
default     0.2        for all resellers
0086        0.25     for reseller1
00852     0.3        for all resellers

new_feature_rate_hint_1

then reseller1 logged in and want to add sell rate for his callshop

1. we add rate for North Americe, which prefix is 001, it will give the buy rate for 001 after input box (we didnt set prefix 001 in rate to reseller, so it will use default rate)

new_feature_rate_hint_2

2. we add rate for China, which prefix is 0086, it will give the buy rate for 0086 after input box

new_feature_rate_hint_3

3. we add rate for HK, which prefix is 00852, it will give the buy rate for 00852after input box

new_feature_rate_hint_4

also, when groupadmin add customer sell rate, he can also see his buy rate from reseller
new_feature_rate_hint_4

Why I cant see some records in CDR page in my asterBilling?

By | asterBilling | 3 Comments

sometimes when you go CDR page to check CDRs for resellers, groups or some clid in your system, but nothing there or some records missed, and then u go database and checked, find there’s data in cdr table “mycdr”, so why it’s missed in asterBilling interface? Reason 1: historyCdr issue check your asterbilling.conf.php in asterbilling web scripts folder sc1 by default the option is “useHistoryCdr = 1”, and asterbilling CDR page will go table “historycdr” to fetch data, but astercc daemon only put data to table “mycdr” untill someone “checkout” the records, the data will be moved to table “historycdr”, so if u cant find all data in web interface, change this option to “0” or “checkout” the records. click Clear to checkout Reason 2: clid issue Even though the astercc daemon will put all CDR it get to database, but not all records will be billed, only after you set the “clid” in asterbilling. So if u see the value of fields “resellerid” and “groupid” in “mycdr” is -1, please check if u set the “clid” correctly, the “src” field should be matched with clid. sc3

asterbilling and asterisk2billing (a2billing) for asterisk billing

By | asterBilling | One Comment

a2billing is a widly used billing system, so what’s the difference between a2billing and asterbilling?

system theory:

a2billing work with asterisk through AGI, each call would be handled by a2billing.agi, so you need change your astierks context so that when your phone make calls it will go to a2billing.agi, of course you need to copy a2billing scripts to your asterisk server.

asterbilling runs as linux daemons, connect to asterisk via AMI over tcp,  no need change anything on your asterisk, asterbilling can bill it. Even asterbilling could work with a2billing.

license & free:

a2billing: 100% open source and free to use.

asterbilling: only web scripts are open source, and provides 5 free simultaneous channels, have to purchase when need more channels.

performance:

a2billing: like 100 simultaneous calls on single server? i didnt test, 🙁

asterbilling: passed 240 simultaneous calls testing, but didnt test more.

best usage:

a2billing: calling card, callback or wholesale solutions

asterbilling: billing for embedded astiersk, pbx (like all freepbx based system), callshop, hosted callshop soltution

other keywords:

a2billing: openser

asterbilling: realtime billing, reseller

Rates setting in asterbilling for asterisk billing

By | asterBilling | 3 Comments

There are three rates in asterBilling, reseller rate, callshop rate and customer rate.

  • reseller rate: the rate admin sell to reseller
  • callshop rate (group rate): the rate reseller sell to callshop (group)
  • customer rate: the rate callshop sell to customers

Rates in asterBilling could be inherited, for example, here’s two records in resellerrate

dialpreifx = 0086
number length = 0
connect charge = 0.2
init block = 60
rate = 0.2
billing block = 60
resellerid = 0

dialpreifx = 0049
number length = 0
connect charge = 0.4
init block = 60
rate = 0.4
billing block = 60
resellerid = 0

Because we dont specify which reseller is this rate for (resellerid = 0), this rate could be used for all resellers.  So what if some resellers want to change this rate rather than use this “default” rate? quite simple, just add another rate for the reseller:

dialpreifx = 0086
number length = 0
connect charge = 0.2
init block = 60
rate = 0.2
billing block = 60
resellerid = 1

so for this reseller (resellerid=1), when customer dial a number begin with 0086, it will use this new rate, we  can call it “overwrite”, but for other resellers who dont set their rate, it would use the one admin setted.

Just like reseller rate, group rate could also be inherited.

A:
dialpreifx = 0086
number length = 0
connect charge = 0.2
init block = 60
rate = 0.2
billing block = 60
resellerid = 1
grouprid = 1

B:


dialpreifx = 0086
number length = 0
connect charge = 0.4
init block = 60
rate = 0.4
billing block = 60
resellerid = 1
grouprid = 0

C:

dialpreifx = 0086
number length = 0
connect charge = 0.4
init block = 60
rate = 0.4
billing block = 60
resellerid = 0
groupid = 0

so rate C is a rate for all reseller and all group,  rate B is for all groups in reseller 1, rate A is only for group 1.

Through inherit rate, admin could be much easier to control the rates, like just set one rate for all resellers, and adjust some when they require some difference, also reseller could just set one rate for his callshops, and only do minor change to provide different rate plan.

asterbilling hosted callshop solution for asterisk

By | asterBilling | 22 Comments

asterBilling is a realtime billing software for asterisk. Through asterBilling, it’s very easy to build a hosted callshop solution for asterisk. benefits of asterBilling hosted callshop solution:

  • reseller, callshop, customer three level billing
  • all web based
  • high performance
  • all asterisk system compatible

here, i’ll introduce u how to build a hosted callshop solution using asterisk and asterbilling. 1. step1, install asterisk 2. step2, set trunk and dialplan in asterisk edit /etc/asterisk/sip.conf and add your trunk there then set dialplan, go to /etc/asterisk/extensions.conf and add a context there 3. step3, install asterBilling 4. step4, check asterbilling.conf.php We need to modify asterbilling config file to meet our system, so check the “asterbilling.conf.php” in asterbilling folder, find section “sipbuddy” change context to be “context = from-booth”, so the sip peer generated by asterbilling will use context “from-booth” for outbound calls. * if you are using freepbx, you can use “context=from-internal” here, then it you can set outbound in your freepbx and all booth will use that. By default, asterbilling will generate all sip peers to the file “/etc/asterisk/sip_astercc”, you can change to other name if you want, or leave it blank if u dont want asterbilling generate the sip peers also we need to include the conf file in sip.conf so that asterisk could load peers asterbilling generated modify /etc/asterisk/sip.conf and add #include sip_astercc.conf 5. step5, set resellers and groups 6. step6, add clid as reseller reseller 7. step7, set rates asterbilling provides three level billing: rate to reseller: the rate you sell to resellers rate to callshop: the rate resellers sell to callshops rate to customer: the rate callshops sell to customers 8. step8, login as groupadmin/operate check callshop interface callshop 9. step9, check reports

import data in asterCC

By | asterBilling, asterCRM | No Comments

You can import your data via web page in asterCC, in asterCRM, you can import customers, contacts and diallist, in asterBilling, you can import customerrate, grouprate and resellerrate, when import in asterCC, it will require you define how to map your data in excel/csv file to fileds in database.

say you have a rate table what to import as rate for callshop, filename is callshoprate.csv, the content is like

93,0,Afghanistan,0,1,14.5,60,1,2,15.03.08 18:22
9370,0,Afghanistan - Cellular,0,1,11,60,1,2,15.03.08 18:22
9379,0,Afghanistan - Cellular,0,1,11,60,1,2,15.03.08 18:22
35538,0,Albania - Cellular,0,1,10.5638,60,1,2,15.03.08 18:22

1. select your data file, asterCC support excel or csv format OR you can select a exsited file in your “upload” folderand then click “Upload”

then select callshoprate from the drop down menu on left

If this rate is for specific reseller/group, we can selec the reseller and group at the buttom, but here we leave is as “All”, means all groups in all reseller will use this rate by default

click “Import” to import the data, then u might get a Success prompt and see such page

if you only get 0 records from the message, go back and check if anything is wrong.

In astercrm, there’re some more options

How to set asterBilling working with Freepbx, Trixbox, Elastix …

By | asterBilling | 21 Comments

asterBilling is a realtime billing solution for asterisk, could be used as a hosted callshop or just a simple billing system for your asterisk pbx. Many people are using freepbx based system as their pbx, like trixbox, elastix … so here i’ll introduce you how to use asterBilling to bill your asterisk pbx.

the first thing is, you must have freepbx installed and have a user their, say you want to bill these two users: solo <8000> and donnie <8001>

next go to asterBilling manager login (like http://asterccserver/asterbilling/manager_login.php) and login as “admin”

Although we only want to bill our pbx,  still have to add a reseller first, go to “reseller” and click “Add” button, pur some message in the form and click “continue”

i left “Credit Lmit” to be null and “Limit Type” to “No limt” coz i just want to know how much each phone dialed each month.

then go to “Account Group” and add a group there

Read More