login | register
Wed 01 of Aug, 2007 [09:14 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.

Web www.voip-info.org
Shoutbox
  • Aykut, Wed 01 of Aug, 2007 [07:53 UTC]: Hi all, does anybody know about Thomson ST2030 SIP phone. I have upgraded it to latest version (1.56) but "Hold" and "Conf" features are not working after the upgrade ?? Do you know any solution or do you have Ver. 1.52 ?? Where can I find it?
  • Edward J Brown, Tue 31 of Jul, 2007 [23:33 UTC]: Has anybody experienced Choppy voice quality when using a Linksys SPA942 in an Asterisk Conference bridge? It works fine with my polycom and Cisco, but sucks with my Linksys.
  • www.astawerks.com, Fri 27 of Jul, 2007 [18:00 UTC]: does anyone use asterisk on top of clark connect? does it work good?
  • simon, Fri 27 of Jul, 2007 [14:16 UTC]: Hi All, Has anyone here managed to get the Cisco79x1 to successfully fail over to the backup proxy. I have 2 asterisk servers , handsets all register and function, except that backup proxy function doesn't work. Any working example would be very apprecia
  • Matthew Richmond, Thu 26 of Jul, 2007 [03:40 UTC]: using the page() application to page across our building...often the meetme conferences don't disconnect after the caller hangs up. Anyone else having this problem. (using Polycom phones)
  • Matthew Richmond, Wed 25 of Jul, 2007 [02:58 UTC]: thanks Nicholas Blasgen! I haven't worked with AGI before, but there's always a first! Thanks again!
  • Nicholas Blasgen, Tue 24 of Jul, 2007 [19:18 UTC]: Matthew Richmond, AGI will handle all that for you.
  • sam, Mon 23 of Jul, 2007 [16:39 UTC]: need help - certain voicemail extension will stop working and recording voicemail on asterisk - anyone know why and how to fix it? Thanks
  • john haji, Mon 23 of Jul, 2007 [14:55 UTC]: free calls to pakistan
  • bong, Sat 21 of Jul, 2007 [19:09 UTC]: hi good day to all can anyone help me how to configured the nortel sip to the signaling server and how to activate in mobile w/ sip compatible without mcs
Server Stats
  • Execution time: 0.59s
  • Memory usage: 2.33MB
  • Database queries: 35
  • GZIP: Disabled
  • Server load: 3.54

Asterisk billing

Asterisk CDR Fields


Asterisk generates a CDR (Call Detail Record) for each call. By default, records are stored in comma-separated value file will be created in /var/log/asterisk/cdr-csv. You can specify account codes and AMA (Automated Message Accounting) flags on a per-channel (Zaptel et al) or per-user (IAX, SIP) basis to help with accounting. Look at the top of cdr/cdr_csv.c to see the format for the records.

Fields

  1. accountcode: What account number to use: account, (string, 20 characters)
  2. src: Caller*ID number (string, 80 characters)
  3. dst: Destination extension (string, 80 characters)
  4. dcontext: Destination context (string, 80 characters)
  5. clid: Caller*ID with text (80 characters)
  6. channel: Channel used (80 characters)
  7. dstchannel: Destination channel if appropriate (80 characters)
  8. lastapp: Last application if appropriate (80 characters)
  9. lastdata: Last application data (arguments) (80 characters)
  10. start: Start of call (date/time)
  11. answer: Anwer of call (date/time)
  12. end: End of call (date/time)
  13. duration: Total time in system, in seconds (integer), from dial to hangup
  14. billsec: Total time call is up, in seconds (integer), from answer to hangup
  15. disposition: What happened to the call: ANSWERED, NO ANSWER, BUSY, FAILED (on some CDR backends, e.g. ODBC, these may be integers; note that more detailed info can be found in the dialplan variable $HANGUPCAUSE)
  16. amaflags: What flags to use: see amaflags: DOCUMENTATION, BILLING, IGNORE etc, specified on a per channel basis like accountcode.
  17. user field: A user-defined field, maximum 255 characters

In some cases, uniqueid is appended:
  • uniqueid: Unique Channel Identifier (32 characters)

Asterisk CDR Storage Methods



Account codes and flags are set in the various channel configuration files or in the extension definition in extensions.conf.

Applications


Limitations

  • A CDR record will not be created if you use a .call file that calls an application instead of an extension. Workaround: Use an extension that then starts the desired application. See also: Bug report 240
  • You can't use exten => h, if you have any hope of getting accurate billing info. Its wise to call ResetCDR(w) in your exten => h, or not use it at all.


Least cost routing (LCR)

Especially for EU countries and small offices/home offices: Since the introduction of Call-By-Call (and Carrier Pre-selection) things have become both a lot cheaper and more complicated. The VoIP providers that offer IP-to-phone services add to the complexity of finding the cheapest route for a call. Finally there's the emerging ENUM system.
Implementing LCR functionality in Asterisk can be accomplished without too much effort using AGI and a mySQL backend
  • Application LCDial Asterisk third-party add-on. Adds LCDial() command, which is just like Dial() but looks up the dialed number in a database, to find a dial-string for that destination.
  • LCR tool for i4l: Collection of LCR a variety of LCR tools for Asterisk, i4l etc
  • cnum.info realtime Call-by-Call rates for the german market provided as ENUM service
  • ZIDial Adds ZIDial() command.Low cost routing with multiple redial (on each route), also multiple redial for multiple provider.


Pre-paid applications

If you have users that you have little or no contact with, or where fraudulent usage can be an issue, it might be worth looking at Pre-paid solutions. With the pre-paid model we need to access a users funds before the call is made in order to see how much cash is available for the call to be made. Next, once the call destination is known, we should start a timer to disconnect the call (or more userfriendly, interrupt the call with an announcement) and finally close the deal.

Some considerations when creating a calling card application:
  • take care of multiple calls using the same credentials (PIN or username)
  • the SIP protocol does not allow for recognition of a client that was disconnected
  • cut off the call when the credit has dropped to 0
  • the hard part is to correctly rate a call, e.g. attaching the correct tariff

See: Asterisk Prepaid Applications

Post-paid (billing)


The Call Detail Record
Asterisk generates CDR (Call Detail Records) that contain data about which extension made or received calls to or from which number for how long. These records are generally stored in plaintext logfiles located in /var/log/asterisk/cdr-csv, but can also be stored in PostgreSQL or (with the asterisk-addon package) MySQL databases.

Rating the CDR
Since Asterisk does not know about its location or the deals the machine has with Telco providers (your PSTN line or perhaps a VoipJet, NuFone, VoicePulse or IConnectHere account), so it cannot know the cost of each call. To solve this problem the CDR's need to be 'rated'. On each combination of parameters you could technically assign a buyers price and a sellers price. This process is generally called 'rating'.

Billing the users
Only when we have neatly rated CDR's the billing process can start, but this is now a reasonably simple process of accounting all prices linked to an account code or source or destination.

Software out there
There are probably some very decent commercial rating/billing packages out there, but only very few open source ones. Most notably there is Trabas Billing, however the Trabas company seems to be taking further development on the software back from the community.

PayPal - IPN - Subscription VoIP Billing Solutions


Important note on transfers

If you are trying to collect records on IAX to IAX calls you need to be aware that by default, IAX will attempt to transfer calls in this situation (if DTMF is not required). When the transfer is completed the call is dumped from the middle machine and thus the call detail records will report a short call time. If you want detailed records you must turn off IAX transfer, but unless your servers are very close together, you will definitely get a latency hit from doing so.

Asterisk Billing Resources

Free information, guides, and resources to help locate the best Asterisk Billing software for your company.


AAAVEER (BILLCALL)

complete billing solution for carrier grade telcos and teir1 and teri2 carriers with resource planning contact today

Phone: +61-290-372-182(Australia),+254-725-202-503(Africa),+91 9825500318(India), +1-818-804-2994 (USA).

Email: mahavirds@panamaxil.com




AstPP:

AstPP is not only a web-based, user friendly billing interface for Asterisk and VOIP. It is also provides a gui editor for REALTIME devices and dialplans. AstPP is Open Source and under constant development. Prepaid, Postpaid and Calling Cards supported as well as resellers, lcr, callbacks,etc.



CenIP SoftSwitch:

CenIP VirtualServer is a full-featured platform for VoIP billing. It provides routes/customers/devices gui manager with support for prepaid, postpaid, callingcard, resellers, lcr, dids and a lot more.


Cybex Development VoIP Billing System

Prepaid & PostPaid Included. Wholesale, End-User, Calling Cards.
We provide the lowest price.


Omniware Billing System

Operates a hosted billing system services for ITSPs and ISPs. Also offered as standalone product. Used in two deployments by Bell Canada, and designed to be very flexible.


Datatex Dynamics


Datatex has been developing software solutions for the telephony industry since 1999.
Topaz Next Generation (TNG)

TNG is the latest Telephone Management System (TMS) or billing system released.
The Asterisk version of TNG has the following features:
  • Generates a call record for each part of a transferred call. (e.g. call transferred 5 times will show 5 call records
with each party reported)
  • Calls transferred or forwarded to queues will properly show the extension the call ended up on.
  • Transferred unanswered calls properly identified.
  • Runs on Windows or Linux.
  • Connects to the standard Asterisk Manager Interface.
  • Report drill down from summary level to detailed calls.
  • Report scheduling to email reports automatically.

Super Technologies - VOIP Billing Solutions

Super Technologies has been in VOIP service since 1999. Was the first company
in the world to offer a DID number on a IP Device similar to vonage, and got an award
on the service from Internet Telephony Magazine and in the Internet Wrold Show in 2001.
With this experience and software in use for over 5 years now, they are now offering
the same software that they use for their own services, to the world to offer billing to their clients.

They have software for VONAGE Type Service, Net2phone and ip centrex services, sample are all working and live
you can check them out on www.phoneopia.com www.superphoneunlimited.com and ip-pabx.com

Web site for software is www.supertec.com/solutions/


  • http://www.vidanetwork.net - Pre-pay, Post-pay Billing, Virtual PBX, network management turnkey solution with Admin, Operator, VPBX admin, Confernece Host and End User Portal. If you are service providers for residential and businesses, this is the right solution for you!





See also





Created by oej, Last modification by mahavir on Tue 31 of Jul, 2007 [07:32 UTC]

Comments Filter

Call Forwarding and CDRs

by Andrey Ship on Monday 23 of April, 2007 [14:13:36 UTC]

I have the same problem like with transfer when Call Forwarding is used.

Here is extract from my extensions.conf

macro-stdexten<br>
;
Standard extension macro (with call forwarding)

; ${ARG1} - Extension(we could have used ${MACRO_EXTEN} here as well
; ${ARG2} - Device(s) to ring
;

   exten => s,1,Set(temp=${DB(CFIM/1${MACRO_EXTEN})})
   ; Chech Unconditional Forward
   exten => s,n,GotoIf(${temp}?cfim:nocfim)
   exten => s,n(cfim),SetVar(CALLERID(num)=1${MACRO_EXTEN}) ; change CallerID
   exten => s,n,SetVar(CALLERID(name)=${MACRO_EXTEN}) ;
   exten => s,n,Dial(local/${temp}@${MACRO_CONTEXT}/n)   ; Unconditional
forward
   exten => s,n(nocfim),NoOp
   ; Check No Answer Forward
   exten => s,n,Set(temp=${DB(CFNOANS/1${MACRO_EXTEN})})
   exten => s,n,GotoIf(${temp}?cfnoans:nocfnoans)
   exten => s,n(nocfnoans),Dial(SIP/${MACRO_EXTEN},,tT)
   exten => s,n(cfnoans),Dial(SIP/${MACRO_EXTEN},15) ; 15sec timeout
   exten => s,n,GotoIf($${DIALSTATUS}=NOANSWER?noanswer:another)
   exten => s,n(noanswer),NoOp
   exten => s,n,Dial(local/${temp}@${MACRO_CONTEXT}/n) ; Forward on noanswer

A calls to B. On B is Call Forwarding Unconditional to C. A and C converse.
A: 13401539
B: 13401538
C: 3328130
In CDR I get two strings:

1."","13401538","3401538","full","""3401538""
<13401538>","SIP/3401539-08703000","Local/3328130@full-3b95,1","Dial","local/332
8130@full/n","2007-04-11 15:47:58",,"2007-04-11 15:48:00",2,0,"NO
ANSWER","DOCUMENTATION"
Like B called to B.
2. "","13401538","3328130","full","""3401538""
<13401538>","Local/3328130@full-3b95,2","SIP/217.199.224.24-0870d000","Dial","SI
P/3328130@217.199.224.24|90","2007-04-11 15:47:58",,"2007-04-11
15:48:00",2,0,"NO ANSWER","DOCUMENTATION"
Like B called to C

But really I want to get such strings:
1. A called to B.
2. B called to C.

blind transfers and CDRs

by darencrew on Monday 12 of February, 2007 [18:29:00 UTC]
it seems that asterisk cdrs are inaccurate where using transfers

for example A calls B, B transfer the call to C, A and C converse then hang up

in CDR you have only one call from A to C, so if A and B are outside your network, and B is inside, so you should bill him, its transfered calls won't be billed because you have no trace of such calls; according to CDR these calls are outside calls to outside...

Do somebody have any idea on how to get rid of such problems

Thanks

BILLING

by Bader Dip on Tuesday 13 of December, 2005 [01:13:38 UTC]
Can asterisk do billing??? For example, for a small telephone company in small town or a company providing a telephone service for a large apartment complex. ( about 1000 - 1500 clients)

sunsaturn

by syle on Tuesday 15 of November, 2005 [10:27:27 UTC]
  • I would keep a close eye on this site:
  • Sunsaturn Asterisk Module
  • Its going to blow the socks off any of these other billing solutions.
  • This is being embedded directly into asterisk, No agi's, no overhead, complete speed!
  • Coder is very well known in the asterisk community.

Edit

Hold Time

by Anonymous on Friday 07 of January, 2005 [20:40:15 UTC]
Is there a way to see how long the call was holding for? For instance I would like to klnow how long a call has sat in my tech support queue before being answered.
Edit

call quotas

by Anonymous on Thursday 09 of December, 2004 [03:56:53 UTC]
My client (a students union0 needed to control calls from the students. The followng is a first cut at the dial plan...it works. The quotas are stored in mysql via a web app...

exten => 888,1,Playback(astcc-tone) ;
exten => 888,2,Authenticate(9955,a)
exten => 888,3,NoOp(${ACCOUNTCODE})
exten => 888,4,MYSQL(Connect connid localhost myusername xxxxxx astcc_user)
exten => 888,5,MYSQL(Query resultid ${connid} select\ bal-time_used\ "bal"\ from\ user\ where\ id\ ="${ACCOUNTCODE}")
exten => 888,6,MYSQL(Fetch more ${resultid} bal)
exten => 888,7,GotoIf($${more} != 1?8:6)
exten => 888,8,MYSQL(Clear ${resultid})
exten => 888,9,GotoIf($[${bal} 888,10,Dial(IAX2/guest@misery.digium.com/s@default,,gL(${bal}:6000:3000))
exten => 888,11,GotoIf($"${ANSWEREDTIME}" != ""?13) ;skip over next line if ANSWEREDTIME not null
exten => 888,12,SetVar(ANSWEREDTIME=0); if ANSWEREDTIME is null set it to 0
exten => 888,13,MYSQL(Query resultid ${connid} update\ user\ set\ time_used\ =time_used+${ANSWEREDTIME}\ where\ id\ ="${ACCOUNTCODE}")
exten => 888,14,Goto(16); skip over next line from here
;got to this line only if not enough minutes
exten => 888,15,Playback(astcc-notenough) ; not enough to make call
exten => 888,16,MYSQL(Disconnect ${connid})



Edit

Mysql with Asterisk

by Anonymous on Thursday 08 of July, 2004 [14:25:59 UTC]
Hi, I`m from Brazil, and I have a Red Hat 9 instaled in my server, and I install the Asterisk, but I would like to use the MySQL for autentication, how can I do this????

I have instaled the Mysql 4.0, mysql-devel, mysql-client, phpmyadmin2.5.7.

Please urgent!!!
Edit

How to enable storing of the field UniqueID

by Anonymous on Wednesday 10 of December, 2003 [19:08:19 UTC]
What would I need this for? For example you are running an AGI script and would like to be able to related AGI data with the CDR table. The problem is that the AGI script will lose connection to the call as soon as the caller hangs up, so you'll need a way to find the correct cdr entry (that'll also be created only after the call has been completed).

Q: It would appear that the "uniqueid" field is not being populated in the MySQL CDR DB.. Is this an obsolete field or is a bug?

A: You need to define MYSQL_LOGUNIQUEID at compile time for it to use that field.

You have two options in /usr/src/asterisk-addons:
1. Add a CFLAGS+=-DMYSQL_LOGUNIQUEID to the Makefile.
2. Add a #define MYSQL_LOGUNIQUEID to the top of the sourcefile.

Finally perform the usual make clean, make, make install. Be sure to check the Makefile for the presence of this flag after having done a CVS update!

Edit

AMAFLAGS values

by Anonymous on Tuesday 02 of December, 2003 [12:31:59 UTC]
AMA flags affects the recording of Call Detail Records. If specified it may be:

default
omit
billing
documentation

Edit

See also: Authenticate()

by Anonymous on Tuesday 02 of December, 2003 [12:29:48 UTC]
Authentiacte offers the a option to set an account code, example:

Authenticate(1234|a)

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2007 Arte Marketing, Inc.

Powered by bitweaver