Basic FreePBX (Asterisk) Operations
Scope
Here are some basic operations of your Asterisk (FreePBX) server.
Any information provided here regarding "Asterisk" or "FreePBX" servers refers only to Telos-commissioned FreePBX (Asterisk) servers used with Telos Alliance telephony products. While these are third-party servers and software, we are able to provide limited pointers and advice (like this article) under normal support.
This article is meant to be a quick reference. There are exhaustive procedures, instructions, descriptions, and tutorials available on the wiki page for Asterisk here:
https://wiki.asterisk.org/wiki/
Shutdown
If removing power is required, your FreePBX server should always be shutdown gracefully using the following method:
- Open a terminal window.
- At the command prompt type:
shutdown -h now
- The server will halt and power off. The power LED on the front of the unit will do dark when the shutdown is finished.
Restarting
If you do need to restart the FreePBX server, use the following method:
- Open a terminal window.
- At the command prompt type:
shutdown -r now
- The server will restart. This will take 5-7 minutes.
Boot up
To start the server while it is powered down, press the power button on the front of the server. It may be behind a door.
Once fully booted (5-7 minutes), you will be presented with a login prompt.
Accessing the desktop
- If you are being presented with a login prompt, enter the username and password provided after commissioning.
- Enter command
startx
. The desktop will load.
Using TeamViewer
During commissioning, if allowed by the customer, a Telos engineer will typically set up TeamViewer unattended operation. If the server is rebooted, this TeamViewer access may not be possible until the following steps are taken. Follow these steps to re-allow a Telos support engineer access to your server for remote assistance.
- Follow the Accessing the Desktop steps above if desktop is not currently displayed.
- Using the menu bar at the top of the screen, navigate to Applications > Internet. Click TeamViewer.
- If you are presented with a windows telling you the Teamviewer daemon is not started, press OK and go to step a. Otherwise, go to step 4.
- Open a terminal window.
- Type command
teamviewer --daemon start
(note there are two dashes, and the spelling of daemon). - Press enter. You should be presented with the message teamviewerd start/running. If you receive an error, check the spelling and case of the above command.
- Repeat step 2.
- Send the displayed ID and password to the Telos support engineer.
Identify an Ethernet Interface
This is a defacto Linux command for identifying a network port:
ethtool -p eth0 120
This command will make the activity LEDs on the ethernet port named eth0
flash on and off for 120
seconds. You can make the port flash for longer or shorter by changing the value of the number at the end of the command.
Accessing Asterisk CLI (remote console)
The Asterisk command line interface (CLI) is reached by using the Linux shell command
asterisk -r
For more verbose output, add one or more "v
"s to the "-r
" parameter.
Full context of the Asterisk CLI is far beyond the scope of this article. That's OK because there's way more information here: https://www.voip-info.org/asterisk-cli/
SIP Debug
You can collect SIP debug information from asterisk by using the following command:
sip set debug on
Full context of this utility can be found on the asterisk wiki here: https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information
When debugging is complete and you want to stop the utility, use the alternate command:
sip set debug off
TCP Dump / Packet Capture
It is possible to take a packet capture from the command line if the system supports tcpdump
. In such cases, the following syntax is used:
tcpdump -i any -w capture.pcap
Pressing Enter after keying in this command will begin the capturing process. Press Ctrl+C
to stop the capture.
Use, or replace "any
" with the name of the interface to be captured from.
Use, or replace "capture.pcap
" with the desired name for your packet capture file. This file will be saved in the directory within which this command is run. You may want to use an SSH utility such as WinSCP to retrieve the pcap file from the system for analysis.