Radio Switch

[code language=”html”] <!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <title></title> <script> function check_value(onoff){ switch(onoff){ case "On": document.getElementById("myImage").src = "images/pic_bulbon.gif"; break; case "Off": document.getElementById("myImage").src = "images/pic_bulboff.gif"; break; } } </script> </head> <body> <img id="myImage" src="images/pic_bulboff.gif" style="width:100px"> <form method="post" action=""> <input type="radio" name="switch" value="On" onchange="check_value(‘On’)"> On<br> <input type="radio" name="switch" value="Off" onchange="check_value(‘Off’)" checked="checked"> Off<br> </form> </body> </html> […]

Call logs

Asterisk keeps track of call data records (cdr) in the /var/log/asterisk/cdr-csv/ directory. Inside the folder there will be a comma seperated file (csv) file named Master.csv. This file contains a lot of useful details of calls. Within the Master.csv file, each log of the call will record various fields. The fields are listed in the […]

Creating a dialplan for the users

Rather than using the existing extensions.conf file, a new file will be created in this lesson. Similar to moving the original sip.conf file in the previous section the extensions.conf will also be moved so that it may be reviewed at a later time. To move the extensions.conf file use the following command: sudo mv /etc/asterisk/extensions.conf […]

The extension config file

The configuration file /etc/asterisk/extensions.conf is often referred to as the “dial plan”. This configuration file controls the execution of phone operations and how the phone calls are routed. It also allows for programming to place conditions on the behavior of the system. The extensions.conf file should be organized by sections. Usually the first section is […]

Connecting the phone to the SIP peer

As mentioned in the lesson about softphones and hardphones, the software Linphone will be used in this course to connect to the Asterisk server. It can be downloaded from linphone.org on a desktop or from the app store on a mobile device. It is free and open source software, which makes it a great pick […]

Adding SIP Peers

Adding the first peer In this lesson two peers will be added in the /etc/asterisk/sip.conf file so that a phone call can be made between the two. Using nano open the file for editing. Use the command: sudo nano /etc/asterisk/sip.conf Scroll to the bottom of the file and add the following information and save the […]

The SIP configuration file

This lesson is the first look into one of the configuration files that will need to be edited in Asterisk. Most of the configuration files for Asterisk will be located in the /etc/asterisk/ directory. The SIP configuration file There should already be a sip configuration file located at /etc/asterisk/sip.conf. Although we could decide to modify […]

The SIP Protocol

The Session Initiation Protocol (SIP) is the most common signaling protocol used in VOIP today to initiate, maintain, and terminate communication sessions, which include voice, video, and messaging. A session is a communication connection between two endpoints. These endpoints can be hardphones, computers, smartphones, or any other device capable of making call via the network. […]

Softphones vs Hardphones

IP Hardphones A hardphone is a physical digital phone that looks similar to conventional telephones. Physically the notable difference would be which type of cabling plugs into the phone. IP hardphones use an RJ45 network adapter and plug into the computer network, while original analog telephones used a smaller RJ11 telephone line adapter. Some hardphones […]

Install Asterisk on Ubuntu 16.04

Install Asterisk on Ubuntu 16.04 There are two basic ways of installing Asterisk on Ubuntu. The first method is to download the software from http://www.asterisk.org/downloads/asterisk/all-asterisk-versions. Once downloaded on to the machine it will need to be built and installed. The second method is to download the software from Ubuntu’s repository. This is the method that […]