Time announcing facility could be provided like a free service from the telecom company. This particular service specifically provides a good way of understanding the exact time in the united states for that punctual clients just by calling couple of numbers. Instead of entering costly time announcement machines an easy growth and development of Free Private Branch Exchange (PBX) software named -Asterisk- may be used to match the needs. By encoding voice prompts and controlling individuals with the asterisk dial plan, this time around announcing application could be built. Even the Language selection could be enabled using three different extensions. Prior to going into more particulars about developing time announcing application, chances are it will introduce the -Asterisk -platform of application developments.
Asterisk Asterisk is free PBX software which operates on Linux or UNIX platforms. It enables quantity of attached telephones to create calls to each other and also to connect with other telephone services such as the Public Switched Telephone Network (PSTN).Fundamental Asterisk software includes many features like voicemail message, conference calling, interactive voice response (phone menus), call queuing. It’s support for 3-way calling and caller identification services. Dial plan It defines how asterisk handles inbound and outgoing calls. It includes a listing of instructions or steps that asterisk follows. Extensions With every context we define a number of extensions. Really extension is definitely an instruction that asterisk follows, triggered by an incoming call or by numbers being called on the funnel. They specify what goes on to calls because they get through the dial plan.
Building the applying? You can do this underneath the following steps. Study concerning the existing dial plans and .c extension files Record the needed new voice prompts and convert them into GSM format Include them within the asterisk and edited the dial plans plus some .C extension files Configure the IP phones for calling and hearing time announcement
Study concerning the dial plans All of the configuration files are designed in C language. All of the techniques ought to be analyzed to interrupt the machine time individually as Hrs, minutes and seconds. Additionally to that particular, how you can range from the voice prompts ought to be removed. Even the repetition (3 times or as you desire) of your time announcement for each ten seconds in multiples of 5 will be analyzed.
Record the needed new voice prompts and convert them into GSM format For that testing of your time announcement the sample voice prompts should be recorded while using -SoundForge- software at 8000 Hz mono having a 16 bit rate. Later to suite the asterisk needs they should be changed into GSM format while using software -SOX- which operates on Linux platform. Include them within the asterisk and edit the dial plans plus some .C extension files Range from the new voice prompts within the asterisk default seem directory separate folders fro each language you would like. Then edit the extension.conf, say.c, application_SayUnixTime.c files so that it jumps to relevant voice prompts based on the called extension number. Configure the repeating bulletins.
?Dial intend on extension.conf file [Default]
exten => 5400,1,Dial(SIP/$,40,Ttr) // Extension 5400 to have an user exten => 1000,1,SayUnixTime(,numbers/at,pIMS) // British time announcement // Sinhala extension is 101 exten => 101,1,Set(count=) // loop variable set to zero exten => 101,2,While($[$ 101,3,Set(LANGUAGE()=si) //language selected exten => 101,4,playback(si/today) //playing the voice prompt -today- exten => 101,5,SayUnixTime(,numbers/at,pI) // Playing am/pm and also the hrs exten => 101,6,playback(si/winadi) // Playing the voice prompt -winadi- exten => 101,7,SayUnixTime(,numbers/at,M) // Playing minutes exten => 101,8,playback(si/thappara) // Playing the voice prompt -thappara- exten => 101,9,SayUnixTime(,numbers/at,S) // Playing seconds exten => 101,n,Set(count=$[$ 1]) // loop variable increment exten => 101,n,wait(2) // Watch for 2 seconds exten => 101,n,EndWhile // Finish of loop
?Code designed in C within the SayUnixTime.c file // This is simply the variable pointers and libraries we used. #include “asterisk.h” ASTERISK_FILE_VERSION(__FILE__, “$Revision: 40722 $”) #include #include #include #include static char *application_sayunixtime = “SayUnixTime” static char *sayunixtime_synopsis = “States a particular amount of time in a custom format” static char *sayunixtime_descrip = “SayUnixTime([unixtime][
format]])n” ” unixtime: time, within minutes since Jan 1, 1970. Might be negative.n” ” defaults to now.n” ” timezone: timezone, see /usr/share/zoneinfo for a listing.n” ” defaults to machine default.n” ” format: a format time will be stated in. See voicemail message.conf.n” ” defaults to “ABdY ‘digits/at’ IMp”n”
/* Unix time it’s time obtained from the machine which is in integer format (not over time format). Because the time ought to be succumbed 5sec periods, kk can be used to obtain the correct time position. */
//Below may be the prototype from the sinhala voice prompt calling code. static int ast_say_number_full_si(variables) //Below may be the statement where check if the performing language is sinhala. if (!strcasecmp(language, “si”) )
In Say.c file the recorded voice prompts replicated towards the sounds directory are now being known as realistically based on the already taken system time from SayUnixTime.c file.
Configuration from the IP phones for calling and hearing time announcement Asterisk enables individuals to communicate using internet. Laptop Computer clients connect with one another with an Asterisk server which utilizes a Linux/Unix OS. Asterisk calls could be undergone different funnel methods. Here let us think about using the SIP protocol. As information for SIP customers is saved in sip.conf and amounts are read from extensions.conf we registered the customers in sip.conf and valid extensions received for them in extensions.conf. Then your soft phones are installed and registered underneath the extensions that people had formerly given. Additionally to that particular, IP hardhpones may also be registered. Finally the applying has been examined based on the extension amounts which had given for time announcement in various languages.
Example: Setting up a SJ phone Here what we will discuss is setting up one free soft phone that will represent all of the finish products. The configuration from the client is usually straightforward. The most crucial parts would be the password for registration, as well as the address from the Asterisk server that you want to join up.
Now let us configure a person. Click on the Options button or right click after which options. Within the section for user information you can include details about yourself. In -Call Options’ choose the Ip that you employ. Then in -Profiles’ choose a new comer to give a new profile. Now you must to type the title you’ll use while calling, a filename where your data is going to be saved and also the protocol you’ll use SIP or H323. Enter your bank account title and password. They ought to be anything you want. Then choose the consumer you’ve just added after which choose -Use’. And it’ll become within the status -being used- as proven within the above figure.
?SIP Configuration Essentially setting up a sip server really is easy. What we must do is to produce a user inside a configuration file known as as sip.conf.
This is a fundamental sip.conf file:  type=friend callerid=”iSam” accountcode=5400 username=5400 secret=33666 host=dynamic context=default dtmfmode=rfc2833 nat=1
?Dial plan configuration Editing from the extension.conf file as below to join up the consumer with 5400 extension number. [Default] exten => 5400,1,Dial(SIP/$,40,Ttr)