Compile zaptel driver




















To enable this functionality, you must uncomment the following line from within the zconfig. You must also patch Asterisk and configure a PPP daemon, so be aware that this task is nontrivial.

You can tell Zaptel to monitor the status of interfaces via its built-in "watchdog. If this happens, the hardware will automatically be restarted. To enable the watchdog, uncomment this line:. The tone zone info option is used to select which set of tones e. The zonedata. The default tone zone 0 is used to indicate North American signaling frequencies. Other tone zones include Australia 1 , France 2 , Japan 7 , Taiwan 14 , and many others.

You can change the default on the following line:. You can configure the drivers to use this state by removing the comment tags around the following line:. To make the wctdm driver essentially match all subvendor IDs, uncomment the following line:. This may be required when using older revisions of TDMP cards with newer versions of Asterisk, due to a change in the subvendor ID code. This has been known to cause the following type of error when loading the wctdm module:.

Some of the Zaptel options can also be enabled when loading the module, by passing module parameters to the wctdm driver.

You can list these parameters at load time as opposed to statically changing them in the zconfig. You then pass the module parameters to the modprobe command. Another common parameter to pass to a module is opermode. By passing opermode to the wctdm driver, you can configure the TDMP to better deal with line impedances for your country.

A Telephony Revolution Section 1. The Asterisk Community Section 1. The Business Case Section 1. This Book Chapter 2.

Preparing a System for Asterisk Section 2. Server Hardware Selection Section 2. Environment Section 2. Telephony Hardware Section 2. Types of Phone Section 2. Linux Considerations Section 2. Conclusion Chapter 3. Installing Asterisk Section 3. What Packages Do I Need? Section 3. Obtaining the Source Code Section 3.

Compiling Zaptel Section 3. Compiling libpri Section 3. Compiling Asterisk Section 3. Installing Additional Prompts Section 3. Updating Your Source Code Section 3. Common Compiling Issues Section 3. Loading Zaptel Modules Section 3. Loading libpri Section 3.

Loading Asterisk Section 3. Directories Used by Asterisk Section 3. Conclusion Chapter 4. Initial Configuration of Asterisk Section 4. What Do I Really Need? Section 4. Working with Interface Configuration Files Section 4. Configuring SIP Section 4. Debugging Section 4. Conclusion Chapter 5. Dialplan Basics Section 5. Dialplan Syntax Section 5. A Simple Dialplan Section 5. Adding Logic to the Dialplan Section 5. Conclusion Chapter 6.

More Dialplan Concepts Section 6. Expressions and Variable Manipulation Section 6. Dialplan Functions Section 6. Conditional Branching Section 6. Voicemail Section 6. Macros Section 6. Handy Asterisk Features Section 6. Conclusion Chapter 7. Understanding Telephony Section 7. Analog Telephony Section 7.

Digital Telephony Section 7. Packet-Switched Networks Section 7. Conclusion Chapter 8. Protocols for VoIP Section 8. VoIP Protocols Section 8. Codecs Section 8. Quality of Service Section 8. Echo Section 8. Asterisk and VoIP Section 8. Conclusion Chapter 9. Debugging in AGI Section 9. Conclusion Chapter Festival Section Do you have any issues when making calls from one extension to another? See link voip-info. This bad sound is not only with the MusicOnHold but also with the playback en background functions.

If you did not install a time than that would be the issue. If you have a digium card then it should do it for you. So we have an voip provider who provides us with the lines.

Can anyone tell me how to do this. I was having problems with this issue as well. I have the wctdm driver loaded and still having issues with MOH sounding like crap. Through the console output, you can trace every step Asterisk took to recognize, answer, and process the incoming analog call from the PSTN and to connect it using the IAX protocol to a remote server across the Internet.

Using Asterisk, you can create a simple call forwarder, so calls to your home can follow you whenever you go. Asterisk is a programmable platform in the same way that the Apache Web Server is.

Using the dial plan, you can program how your softPBX should behave, which phones should ring when different digits are dialed, how long they should ring, and what to do if nobody answers when they ring. The Asterisk server will dial the cell phone on the second line and then bridge or conference the two lines together for the duration of the call. The hardest part about setting up this configuration is connecting two lines or two SIP peers acting as lines [Hack 43] to the Asterisk server.

The sip. This creates a context within Asterisk for incoming calls to arrive. Now, open up extensions. Since sip. Dial the cell phone number on the second SIP peer The 30 specified in the first command says to attempt to bridge conference the call on the two lines for up to 30 seconds before giving up.

That way, you need only be bothered with answering your cell phone if dear old Mom is calling or your boss. Asterisk refers to the one or more voice communication links of a phone call as channels. Each channel has with it a number of channel-specific variables that contain information about the ongoing call. When the call ends, the channels, and these channel-specific variables, disappear.

We can use this variable to figure out whether we want to forward a call. Note the syntax of the GotoIf command. A colon : separates the then-target from the else-target. The targets correspond to the step numbers in each of the exten directives, of course. With a little modification, you should be able to forward incoming calls to different numbers, depending on their caller ID values.

Just rearrange the previous example so that each GotoIf numbered target step contains a Dial command with a different phone number—one for Mom, one for Dad, etc. You can even forward calls with no caller ID signals like those from telemarketers to a fun destination [Hack 48]. With a little help from Microsoft Excel, you can dig into your CDRs, chart your top callers, and create utilization records for the users of your PBX server.

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. You can download the file from your server using FTP, or you can run the following command to email it to you keep in mind that large logfiles might not work well with this trick :. Of course, replace me mydomain. You can then copy and paste them into Excel, as shown in Figure Place the cursor on column A, row 1 before pasting.

Once you paste the text or open the file, select column A by clicking the A column heading. Leave the Delimited radio button selected and then click Next. Select Comma as a delimiting character, make sure no other delimiters are selected, as in Figure , and click Finish.

Insert a blank row at the top of the spreadsheet, and you can label them as outlined in Table The unique identifier of the endpoint placing the call. The Asterisk software function handling the call. For example, the Application field might not have a meaningful correlation on another softPBX because not all softPBXs refer to telephony functions as applications. The idea here is that once the CDR is imported into Excel—or another data-analysis tool—you can interpret it in interesting ways.

Suppose you want to figure out which customer places the most calls to your technical support department. Or, if your teenage daughter is receiving a dozen calls a day, you can bill her accurately for them! I had a choice between coding the report myself, building it in a tool like Access, or performing the analysis in Excel.

So, I turned to the Pivot Table Report or should I say, I—ahem—pivoted to it and built a sales summary in five minutes, which to this day is still in use at the office where I built it. I never knew what I was missing out on by passing over that peculiarly intimidating Excel menu option. And, when it comes to those telephony logs, the Pivot Table Report function ever since. And, when it comes to those telephony logs, the Pivot Table Reports, you can generate some very cool call-activity analysis.

List your top callers. List your top system users. Or just figure out your total long-distance and local utilization down to the minute to verify your phone bills. This will be needed to make the Pivot Table Report. The names of the CDR fields are laid out in Table In this case, the source data is the first sheet in the workbook—the one that contains the CDR data.

Select this sheet and drag-select all of the columns that contain CDR data. Then, return to the wizard window and click Next. The final step asks you where you want to put the report; choose the option to place it in a new worksheet.

Then, click Finish. Now, you can drag those column names from the pivot-table toolbar to the left and right columns of the blank Pivot Table Report worksheet. Dragging to the left pivot-table column treats the data from that CDR column as a group label.

Start by dragging the Source column to the left column in the pivot table. Next, drag the Duration column to the right column in the pivot table. These two drags will build a report like the one in Figure , which shows a sum of minutes for each caller on the system over the period of time covered by the CDR worksheet. In Figure , the majority of callers are PSTN phone numbers the digit numbers , though the majority of minutes are from private extensions , , etc.

Extension has the most minutes— Drag the Destination column, and the report will now show the minute totals of each phone number to whom each caller placed calls, as shown in Figure Experiment with the other columns. What can Excel tell you about your call activity?

This is different from merely identifying a certain caller ID number and then handling it. This dial-plan command screens calls as described earlier, identifying the caller ID, or forcing the calling party to enter a caller ID if none is provided at the outset of the call.

Consider the following from the [default] context, in extensions. The first priority of this extension contains the PrivacyManager command, which prompts the user to enter his digit telephone number if no caller ID signals have been sent on the channel to identify the caller. If the caller does successfully enter his digit phone number, the dial plan proceeds to the next priority. Create a simple, fully functional small-office PBX. These legacy devices will be able to call, and be called by, VoIP phones.

This setup is depicted in Figure You can use any combination of FXO and FXS modules up to four on a single TDMP, so you can connect two analog phones and two phone lines, or one phone line and three analog phones, and so on. So, if you want three analog phones to share a single analog phone line, you would use three FXS modules and one FXO module.

VoiceTronix makes alternative cards that you might want to consider, too. But first, you need to get the card installed. This is pretty straightforward. There are four numbered modules on the card, which correspond to the four numbered eight-wire jacks on the case plate of the card.

The addition of wctdm is the difference. Run make config in your Zaptel and Asterisk source directories to create startup scripts that are customized for your Linux distribution. The numbers assigned, 1 through 4, are channel numbers that Asterisk will use to refer to activity on each module. Ordinarily, telephones interface to that phone-company switch called a foreign exchange office in signal-ese using electro-mechanical line signaling called FXS signaling in Asterisk slang.

Confused yet? Save this file before proceeding. Take a look at this sample default context section in extensions. So, as of right now or at least after you reboot your Asterisk box or load the kernel modules manually , incoming phone calls to the connected phone lines will ring on the SIP phone configured as SIP peer For SIP phones, this is established in sip.

In countries other than the United States, local jurisdictions will use different numbers for this purpose, so check with your local emergency dispatch authority to find out what number to use. Of course, none of this is going to work until the drivers are loaded and the dial plan is reread by Asterisk, so give your machine a reboot, or load the modules and restart Asterisk manually. Then, call and be called—on the cheap. Fortunately, music-on-hold makes that wait time a little bit more tolerable.

Now, type madplay and press Enter. If this is the case, try moving them. Lucky for you, when you compiled the Zaptel drivers [Hack 41] , you also unwittingly compiled ztdummy. How convenient. Next, make a test extension that lets you listen to some on-hold music.

You can assign different groups of phones and phone lines to their own music-on-hold classes classes define selections of recordings that you can assign to groups of peers so that they hear different music. A group of SIP phones can be in one music-on-hold class, and a group of Zaptel-connected phone lines can be in another.

Add as many classes as you like such as default , as shown earlier to the musiconhold. Pitch the microcassette and stick-on microphone. With Asterisk, all you need to record a phone call is Monitor. There are two ways to record calls with Asterisk. The other way is to have Asterisk do all the recording and have SoX do all the mixing. To record a call with Asterisk, you can use the built-in Monitor dial-plan command.

In extensions. The M argument causes the call to be mixed automatically so that caller and receiver can both be heard in the same file. Without the M , Monitor would just create two different files, most-recent-call-in-ext and most-recent-call-out- ext. SoX must be installed for the M option to work. Without SoX, Asterisk cannot output automatically mixed call recordings.

Most of the major Linux distributions provide a SoX package as an installation option. The best way to do this is probably to base the filename off of the current system date and time.

Not only does this make them unique, but it also affords you an easy way to find files by date and time later on when you need them.

Those are the guys from whom excitable TV meteorologists get their severe weather warning and watch information. Your Asterisk server can grab these feeds and, thanks to Festival [Hack 92] , read you a weather report based on their contents. Have a look at this example:.

The extension 50 grabs the text feed for Cleveland, Ohio, using the curl application, and immediately converts it using text2wave , a piece of the Festival distribution, into a WAV, which it plays back using Asterisk. If you want to keep tabs on the weather in a few different cities, you can create an extension for each.

Since Asterisk runs on Unix, it is able to leverage many of the niceties of a modern Unix environment: shell scripts, Perl programs, sockets, and so on. Historically, one of the chief shortcomings of Unix—and of Linux in particular—is the lack of a graphical user interface GUI. For instance, AMP lets you upload music-on-hold files using a web interface and lets you create IVR menus without having to type them directly into extensions.

It uses PHP to build the web pages you interact with, and it controls Asterisk with code written in Perl. MySQL provides a repository where the entire dial-plan configuration is stored, retrieved, and modified by the web interface. AMP has a ton of software prerequisites, as you can see. The basic steps are spelled out here and are detailed in the following sections:. A few dependencies are standing between your Linux server and AMP. Before you can go any further, though, you need to be certain that your Asterisk instance is running as a nonroot user.

To set this up, blow the dust off your latent MySQL skills, and issue the following commands:. Now, launch the MySQL client:. Once you get to the mysql prompt, you can begin entering the access privileges for the database:.

Are you still reading? Now, go have fun configuring. Running a critical service as root makes a security-minded sysadmin squirm. By default, Asterisk runs as root—the user account with total, unrestricted power. This is generally considered a bad idea, as an exploit to Asterisk can lead to someone taking over your entire machine. This hack shows you how to run Asterisk as a less-godly user. To do so, create a user called asterisk. In the following command, I use the Red Hat adduser command:.

The directory referenced here needs to be writeable by the user running Asterisk, just as the directory normally used should be writeable only by root.

Now, recompile Asterisk using this sequence of commands:. You can now launch the Asterisk server from the new user account, or from root using the su command:.

Be sure to leave the commands unchanged, aside from prefixing them with the su command. Once these steps are taken, Asterisk will have only as much power as you grant the asterisk user. Just use the PSTN phone lines that are already connected to them, and you can simulate a direct link. You can build a two-office unified dial plan using two Asterisk servers. Figure illustrates just such a configuration.

This awkward process is shown in Figure



0コメント

  • 1000 / 1000