TEL-500 Project Report Auto-Dialler System Voice Communications Done By: - AKASH ANANTHANARAYANAN SANJEEVAKUMAR DEVARAJA 1
Index Page Contents Page Number Abstract 3 Introduction 4 Flow Chart 5 Resources Required 6 Work Done 7 Problem Faced and Troubleshoot 12 Output 13 Real Time Application 14 Conclusion 15 References 16 2
Abstract This project work is to design a system which can make multiple calls at a time without necessarily dialing the numbers manually. Using Asterisk as the VoIP software we develop a system which after entering specific commands allows the Asterisk server itself to automatically connect the calls. This is a very significant application with many uses and is currently implemented by major organizations on a large scale as it can be used to reach a large population at a given time just like the Internet, Radio and Television. Most of the organizations use this to conduct surveys, advertisements and to distribute information. We know that in the modern world almost everybody possess some form of device to communicate and hence this is a very effective way to get information to spread. This project deals in implementing such a system. There are many ways of originating multiple calls at a single time which are explained in detail. However we use only one of the ways to implement this project. 3
Introduction The Auto Dial system calls many users automatically. It works using call files. When the call files are placed in a special directory known as the spool directory the calls are originated automatically. In spool directory we have a file called call file. The spool directory is a directory where the codes are executed as soon as they are placed into them. As soon as they are placed in this directory by entering the Asterisk CLI we will be able to see that the phones will start ringing. The project requires the constructing call files which is the most significant part of this project. It is using this call file we will be able to originate multiple calls. When the user picks up the call there are many possible options. A recorded message could be played to the user.this can be used either to inform the user of an event or even for advertisement purposes. Otherwise the call can be used to conduct surveys. We will now look at the project in detail. We can implement the auto dial system by three ways By using the Dial command on the Asterisk CLI Using the Manager API to activate calls Using call files to originate calls 4
Flow Chart 5
Resources Used For the Project One virtual Machine. One computer. Three Digium Phones Head Phones 6
Work Done First it is required to construct the call files. In order to construct the call files we have to create a file.call for e.g. callfile1.call.then it is necessary to define some parameters which are required when initiating the call. Below is a description of the parameters defined in the call file. Channel :< Protocol/Extension> this defines the channel that will be used to originate the call. It is an important parameter which needs to be defined, without this the call will not go through. We mention the type of protocol we are using either SIP or IAX to define the channel. Our project is done using the SIP protocol. The extension number is the number to which the call has to be initiated. Caller ID: name<extension> This defines the caller ID we want to use, it has to defined by a name and then followed by the extension number. When a user receives a call this is the user ID which will be shown to the user. It is better to define as it helps the user to know who is calling and not think as a prank call Wait Time :< number> this is a useful parameter which defines how many seconds to wait before the user answers the call. If the user fails to answer the call within the time given in this parameter then the call will fail. Max Retries : <number> Using this parameter we can define how many tries we want. If the user doesn t pick up during the first call, using this we will be able to initiate the call until someone answers the phone. The first call is not counted as a retry. It is set at 0 during default which means that only once the call will be originated. Retry Time : <number> this is a parameter which is just an extension of the previous one. It defines the time interval between the different retries. As it is not necessary to call in continuous manner. If the user is not available at a particular time then its best to call after a time interval and this parameter helps us to do so. 7
All the above parameters are required when making the call. After the user picks up the phone we need to define what we require to do. Context :< context > this is the name of the context which is defined in the extensions.conf file. In the extensions.conf file we have defined what the call will do such as play a recorded message or direct it to the voice mail or connect to an operator. Extension :< number> this is the extension number to which the call will be directed to once the user answers the call. This is the extension number which is defined under the context mentioned above. Priority : <number> this defines the priority for the extension number. Application :<name> The type of application to run when the user picks up the call Data:<filename> The file which the application will be utilizing There are other parameters which are not necessarily required but can be used Setvar <var=value> we can assign values to variables which will be available to the channel Archive <yes/no> this is to define what to do after the call is processed. By default it is set at no which means the file will be deleted. If set to yes the call file is moved to the outgoing_done subdirectory of the spool directory. One important factor to remember when creating the call file is not to create them in the spool directory where the file will be run. The spool directory is one where asterisk will execute the commands as soon as codes are available in it. We do not want asterisk to run the file while we are writing into it. Hence we create a temporary folder in the spool directory and write the file into the temporary folder. After the file is done then we can move the file from the temporary folder into the spool subdirectory outgoing. As soon as the call file is placed into this sub directory it will be making the call. 8
A screen shot of the call file is shown below. The same was done for the other extensions The Spool Directory The spool is where Linux stores files that will be changing frequently. Usually this is used in Asterisk to store temporary items such as call recordings, call files and voice messages. The spool directory contains many sub directories which are outgoing, qcall, tmp and voice mail. The call files which we have constructed above are placed in the outgoing sub directory where they will be processed. Next we have to make some configurations in the sip.conf file which will enable us to configure two extensions. We used the commands we used in the lab to create the extensions. We will define the extension numbers first in the sip.conf file. Here we link the extension number with a MAC address which is used to configure the Digium phone. After this the extension numbers have to be defined in the extensions.conf file. 9
Below are the commands which are required in the sip.conf file to create new extensions. 10
The following are the commands which are required to define the extensions in the extension.conf file. We also define the context [callfile] which was used in the call file 11
Problems Faced During Project After constructing the call files we placed them in the spool directory. We entered the asterisk CLI hoping to see the extension number to be dialled but we met with a problem. The call did not progress through. Perusing the logs there were three main warnings. The first warning The system was unable to set the utime in the /var/spool/asterisk/outgoing/ The second problem Unable to reach the host101 The third problem Unable to request channel SIP/101 We have implemented this project using a single server. But the application is not limited to a single application by connecting two servers using the sip or iax2 trunk we can initiate calls to even other servers. During the initial stages we tried to create an iax2 trunk in order to initiate calls to other sever but we faced some difficulties in creating the trunk hence we decided to do it in a single server. Troubleshooting Due to the above issues we revised the call file to the following defining only the channel, Application and Data. We removed all the other parameters as they may have caused some sort of syntax error. 12
OUTPUT We enter into the Asterisk CLI and then entered the command channel originate SIP/0000FFFF0000 This is an easier way to originate the call than the call file with minimum functions where we will only play a recorded message. The call file enables us to add extra functions which are defined in the extensions.conf We were facing many issues with the context in the call file. We did not proceed with it. Below is a diagram showing the CLI after we enter the command. The call is iniated and the recorded message is played. If the user does not wish to listen to the message he can simply hang up The call file enables us to add the caller ID so that the called party knows who is calling them 13
Real Time Application Now a days the telemarketing industry are capable of making large number of simultaneous phone calls and also provide an application programming interface (API) for system integration. In order to make 2000 simultaneous phone calls, for example, a group of computers have to be linked together to provide the support for that many phone lines using a single server and single 100 mbps connection. Predictive calling in call centers where multiple operators are making simultaneous calls is another real time application of Auto Dialer. Conducting political, business Surveys through the telephones 14
Conclusion This system is very efficient and hence is widely used to auto dial numbers. As we have seen it is not very complex and can be done with minimum effort to originate hundreds of calls within a given time limit. We were faced with many difficulties while doing the project. We had decided to create an iax2 trunk but unfortunately the channel was having some problems and it was not going online. Hence we decided to do the auto dial system within a single server. We had created three extensions and three call files one for each extension. But the project could be done in a large scale where we can integrate multiple telephone lines. 15
References Asterisk: The Definitive Guide (3rd edition) VoIP Info.org http://www.voip-info.org/wiki/view/asterisk+auto-dial+out 16