Section 5.3. Administrative Applications


5.3. Administrative Applications

In addition to call-handling applications, we need applications for performing housekeeping. If nothing else, the traditional telephony providers understood accounting and billing!

5.3.1. Call Accounting

The all-important billing system is a required element of a service provider's softPBX. But there's more to call accounting than merely charging customers for the amount of service they use or the number of calls they place. Call accounting includes gauging to whom, when, and to where calls were placed so that utilization of the PBX can be fairly accounted for within the enterprise. Call accounting allows system managers to enforce voluntary system policies, too: abuse of telephone privileges can be documented and so on.

5.3.2. Project 5.1. Analyze Call Detail Records and Call Accounting

5.3.2.1 What you need for this project:
  • Asterisk

  • Excel or similar spreadsheet application

Most commercial softPBX systems provide a detailed logging mechanism for keeping track of when and to whom calls were made and received. Asterisk provides this, too. In /var/log/asterisk/cdr-csv/Master.csv , a flat text log of all call activity is retained. It's a snap to import this into Excel or your favorite spreadsheet for analysis. You can download the file using FTP from your server, or you can run the following command to email it to you. Keep in mind, large logfiles may not work well with this trick:

 #  more /var/log/asterisk/cdr-csv/Master.csv  mail me@mydomain.com  

Of course, replace me@mydomain.com with your email address. If your Linux server has sendmail or a similar SMTP agent running (most do), you'll receive the log in your email. You can then copy and paste it into Excel, as in Figure 5-1. Place the cursor on column A, row 1 before pasting.

Figure 5-1. A portion of the Asterisk ASCII CDR logfile, copied and pasted into the Macintosh version of Excel; the Windows version will work just as well to handle these logfiles

Once you paste the text or open the file, select column A by clicking the A column heading. Then use Excel's Text to Columns function, on its Data menu. This launches a wizard that helps you organize the text file into columns . You'll see a preview of the text you pasted in the bottom portion of the window that appears. Leave the Delimited radio button selected and then click Next.

Select Comma as a delimiting character, make sure there are no other delimiters selected (as in Figure 5-2), and click Finish. Now, you're ready to label the column headings according to their purposes. Insert a blank row at the top of the spreadsheet, and you can label them as follows .

Figure 5-2. The second step of the Text to Columns Wizard breaks up the CDR log text into meaningful cells of data

5.3.2.2 Asterisk CDR default fields


Account Code

A tag that can be used in billing and analysis



Source

The unique identifier of the endpoint placing the call



Destination

The unique identifier of the endpoint receiving the call



Context_

The dial-plan context of the call (more on this later)



Caller ID

The calling party identification signals supplied by the calling endpoint



Incoming Channel

The voice channel that routes to the caller



Destination Channel

The voice channel that routes to the receiver



Application_

The software function handling the call



Last Data Sent to Application_

Information the application uses to connect the call



Start Time

The time of first contact from the caller to the softPBX



Answered Time

The time the receiving endpoint answered, if applicable



End Time

The time of the end of the call, whether or not it was answered



Duration

The length, in seconds, from the first contact to the end time



Billable Duration

The length, in seconds, of connected, billable time during the call



Disposition

The last known status of the call during this application



AMA Flags_

Automated Machine Accounting flags, used by some telephony billing software

The underscored field names record very Asterisk-proprietary information. For example, the Application field may not have a meaningful correlation on another softPBX because not all softPBXs refer to telephony functions as applications. More detailed descriptions of these Asterisk terminologies can be found in Chapter 17.

The idea here is that once the CDR is imported into Excelor another data analysis toolyou can interpret it in interesting ways. Suppose you want to figure out which customer places the most calls to your technical support department. You can count occurrences of that customer's caller ID in the CDR. Or if your teenage daughter is receiving a dozen calls a day, you can bill her accurately for them!

With CDR records in Excel, Crystal Reports, or even a homegrown Perl program, a savvy telephony administrator can:

  • Determine which channels are used the most and the least

  • Determine which endpoints are called most often

  • Calculate the percentage of outgoing calls that are out of your area code

  • Create a list of calls, broken down by endpoint

  • Create an invoice for a paying subscriber to the softPBX

Asterisk's CDR records can also be stored in PostgreSQL or even syslog. Open source software modules have been developed to simplify the use of a third-party database for call accounting.


5.3.3. Console

Most PBX environments support a central, "big picture" application called an attendant console . This application can monitor the status of calls in progress throughout the PBX or within a certain scope of users, tell who's on the phone and who's not, and sometimes even keep track of who's in the office and who's out of the office. The console application may or may not have a phone directly connected. In some systems, the console itself is an endpoint with a large, specialized display built in. In others, it's a PC application or terminal connected to a serial interface on the PBX.

In Asterisk, there isn't a dedicated console application, but some people have used Astman as a substitute for a homegrown console application. Cisco, Avaya, and Nortel provide PC-based or web-based console applications for their softPBX systems.

5.3.4. In-Out, DND, and Call Forward

Many traditional PBX systems offer endpoints with an in-out functionthat is, the endpoint can be used to alert the console when an office occupant is in or out of their office. That way, the human attendant, who uses the console, will better know how to handle that user 's calls.

Do not disturb, or DND, is another PBX endpoint function that allows each user to silence the ringer on her phone, placing it in a state of silence so incoming calls don't disrupt the user's activities.

Call forward gives PBX endpoints the ability to temporarily relay all incoming calls to another endpoint, either on the same system or, if the PBX supports it, on the PSTN.

On the public switched telephone network, SS7 facilitates signaling of all advanced calling features, called CLAS (custom local area calling services). These include call-waiting, a form of hold with two line appearances , and three-way calling, a three-party conference call.


5.3.5. Call Logs and Missed-Call Indications

Some PBX endpoints and caller ID-equipped analog phones can store a log of calls placed, received, and missed. This feature tends to be something built into the endpoint, though the same information is almost always stored in the PBX's call accounting system.



Switching to VoIP
Switching to VoIP
ISBN: 0596008686
EAN: 2147483647
Year: 2005
Pages: 172

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net