Fusionpbx Docs
Fusionpbx Docs
Fusionpbx Docs
Release master
Mark J Crane
1 FusionPBX 3
2 Benefits of FusionPBX 5
3 FusionPBX Features 7
4 Our Ecosystem 9
4.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2 Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3 Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.4 Dialplan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.5 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.6 Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.7 Advanced . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
4.8 Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
4.9 Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
4.10 Documentation Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Bibliography 135
i
ii
FusionPBX Documentation, Release master
Contents 1
FusionPBX Documentation, Release master
2 Contents
CHAPTER 1
FusionPBX
An open source project that provides a customizable and flexible web interface to the very powerful and highly scalable
multi-platform voice switch called FreeSWITCH.
FusionPBX will run on a variety of operating systems (Optimized for Debian 8) and hardware of your choice. Fu-
sionPBX provides a GUI for unlimited extensions, voicemail-to-email, music on hold, call parking, analog lines or
high density T1/E1 circuits, and many other features. FusionPBX provides the functionality that business need and
provides corporate level phone system features to small, medium and large businesses. Click here for the FusionPBX
youtube channel .
3
FusionPBX Documentation, Release master
4 Chapter 1. FusionPBX
CHAPTER 2
Benefits of FusionPBX
5
FusionPBX Documentation, Release master
FusionPBX Features
7
FusionPBX Documentation, Release master
Our Ecosystem
We are a global community that has an open and very friendly ecosystem. We encourage community engagement,
contribution and feedback. Please join us by getting involved with giving feedback, new feature ideas, helping out
with code or Documentation.
Most of the core folks who develop and use FusionPBX can be found hanging out in Freenode IRC in the #fusionpbx
channel. Come join us and meet the team.
Getting Started
Welcome! Lets install FusionPBX. Follow the menu to the left and you will have a working PBX in no time. For PDF
and Epub formats of this documentation click the bottom left on v:latest and a menu will pop-up to choose from.
Note: There are many ways to install FusionPBX depending on how you want to build your solution. What is
presented here represents the quickest, easiest, best supported way to a FusionPBX system. For advanced topics like
Bi Directional Replication or High Availability, consider attending the in person or online training at http://fusionpbx.
com.
Quick Install
9
FusionPBX Documentation, Release master
FUSIONPBX can be several different operating systems. However this install is focused on a minimal install of
Debian 8 with SSH enabled. This install has been designed to be fast, simple and modular. On many systems it will
install in 5 minutes or less. Installation times depend on CPU, RAM and bandwidth. Install Video https://youtu.be/
YmIht8hEHYU
1. Run the following commands under root. The script installs FusionPBX, FreeSWITCH release package and its
dependencies, IPTables, Fail2ban, NGINX, PHP FPM and PostgreSQL.
Start with a minimal install of Debian 8 with SSH enabled. Paste the following commands in the console window one
line at a time.
If using Debian on Proxmox LXC containers please run the following BEFORE starting the FusionPBX install.
2. At the end of the install, the script will instruct you to go to the ip address of the server (or domain name) in your
web browser to login. The script will also provide a username and secure random password for you to use. This can
be changed after you login. The install script builds the fusionpbx database. If you need the database password it is
located in /etc/fusionpbx/config.php .
The domain name in the browser is used by default as part of the authentication.
If you need to login to a different domain then use username@domain.
username: admin@000.000.000.000
Additional information.
https://fusionpbx.com/support.php
https://www.fusionpbx.com
http://docs.fusionpbx.com
After the install script has completed go to your web browser and login with the information provided by the install
script.
Security
Similar to medieval fortifications it is recommended to provide your servers with multiple layers of defenses. Be sure
to use Firewalls, Strong passwords, SSH, and make sure your servers are kept up to date for all software being used.
This includes the operating system, FreeSWITCH and FusionPBX.
FusionPBX
The latest Debian install script configures IPTables firewall for you. FusionPBX extensions set strong passwords for
you by default. You can increase the password complexity using settings in Advanced -> Default Settings to increase
the length of the passwords that are generated by default.
Firewall
Although the new install script configured IPTables for you it is recommended that you review the settings. On Debian
and Ubuntu you can check your firewall with the following command.
iptables -L
Firewall page
SSL / TLS
SSL and TLS are very necessary in todays internet applications from VOIP to Websites. FusionPBX by default uses a
self signed certificate. However you can use certificate providers where you can purchase certificates and there are free
options as well. With domain based multi-tenant wildcard certificates can be useful. Also when deciding on which
certificate provider to use you should look at the phones manufacturers documentation to find one that is compatible
HTTPS provisioning.
Lets Encrypt provides free certificates for a single domain but they dont support wildcard certificates.
Setup Lets Encrypt with FusionPBX
Upgrade
Security problems are fixed as they are discovered and are updated for master and the latest release. Upgrades are
considered an important part of keeping the server secure. Upgrades always need to be done on the operating system,
FreeSWITCH and FusionPBX. On Debian and Ubuntu you can check your firewall with the following command.
Latest install script will install FreeSWITCH packages by default to upgrade them and operating system packages run
the following commands.
apt-get update
apt-get upgrade
XML RPC
New install mod_xml_rpc is not enabled by default. It is recommended to run a firewall on all FusionPBX servers.
The latest debian install script configures the firewall by default. However it is recommended to check to make sure it
is installed and running.
Mod_xml_rpc allows running remote commands to FreeSWITCH. Ensure you have a firewall that is protecting the
XML RPC port. Consider changing the XML RPC password. At very least do not allow access to the public. Advanced
-> Settings page in the interface allows you to change the password or the port. Do not allow public access to the XML
RPC port.
Latest Debian install script installs iptables firewall which prevents public access to the mod_xml_rpc port. If you
are not using a firewall on the server you should even if its protected by by an external firewall. Some not informed
co-worker could expose the server to the public internet at some point in the future. Multiple layers of security is
considered best practice.
XML RPC is secure by default for 2 reasons.
The module is disabled by default.
Install script firewalls XML RPC port 8787 and does not allow access to it by default outside of 127.0.0.1.
If you were to start the module and open port 8787 on the firewall you would want to set a really good password for it
under Advanced -> Settings. It would be recommended to use a VPN to like OpenVPN to access XML RPC over port
8787 instead of opening port 8787 on the firewall.
Fail2ban
Fail2ban is also used to protect SSH, FreeSWITCH, the web server as well as other services. You can view the IP
addresses blocked by Fail2ban with the following command.
iptables -L
SSH
Use strong passwords with SSH or even better use SSH keys for better protection of your servers.
Backup
Its always good to have a backup method in place. Here are the steps to a basic backup method with FusionPBX.
Be sure to change the password by replacing the zzzzzzzz in PGPASSWORD=zzzzzzzz with your password.
cd /usr/src/fusionpbx-install.sh
git pull
cd debian/resources/backup/
vim fusionpbx-backup.sh
#!/bin/sh
now=$(date +%Y-%m-%d)
echo "Server Backup"
export PGPASSWORD="zzzzzzzz"
mkdir -p /var/backups/fusionpbx/postgresql
#delete postgres logs older than 7 days
find /var/log/postgresql/postgresql-9.4-main* -mtime +7 -exec rm {} \;
sql
To save the file press escape then :wq for write and quite
You should have the script ready to execute. (Default the script will use FreeSWITCH package paths. If you have an
older install using source be sure to change this by commenting the package line #22 and uncomment the source line
#25.)
Crontab settings
Setting crontab -e
crontab -e
Choose 1 for nano
Goto the last blank line and paste in the next line.
0 0 * * * bash /etc/cron.daily/fusionpbx-backup.sh
press enter then save and exit.
cd /usr/src/fusionpbx-install.sh/debian/resources/backup/
cp fusionpbx-backup.sh /etc/cron.daily
chmod 755 fusionpbx-backup.sh
Once this is complete you will have the backup ready to execute by ./fusionpbx-backup.sh or from the daily cron job.
Gui settings
Download Backups
From Advanced > Backup you can download the backup also.
FreeSWITCH Source install paths.
Firewall
Iptables
Basic Rules
Optional Rules
Friendly Scanner
Optional
sudo iptables -L -v
iptables -L -v --line-numbers
Delete a line
Delete line 2
iptables -D INPUT 2
Block IP address
Save Changes
Debian / Ubuntu
PF
Basic Rules
block in all
block in quick from <fail2ban>
pass in quick inet proto icmp all
pass in quick inet6 proto icmp6 all
pass in quick inet proto tcp from any to any port 22 keep state
pass in quick inet proto tcp from any to any port 80 keep state
pass in quick inet proto tcp from any to any port 443 keep state
pass in quick inet proto tcp from any to any port 5060 keep state
pass in quick inet proto udp from any to any port 5060 keep state
pass in quick inet proto tcp from any to any port 5080 keep state
pass in quick inet proto udp from any to any port 5080 keep state
pass in quick inet proto udp from any to any port 16384:32768 keep state
Firewall Devices
Home
4.2. Home 19
FusionPBX Documentation, Release master
In the home menu you have the options for Account Settings, Logout and User Dashboard.
Accounts
In the Accounts menu you have access to devices, extensions, gateways and user manager.
Gateway
Gateways provide access into other voice networks. These can be voice providers or other systems that require SIP
registration. Check out the Youtube video .
In this example we will be using VoiceTel . Each Gateway provider has their own setings to use.
Click to visit
Select Accounts from the drop-down list and click on Gateways.
Click the
button on the right. Enter the gateway information below and Click on Save once complete.
Gateway: VoiceTel
Username: 0123456789
Password: 1b3d5f7h9j
From user: 0123456789
From domain: sbc.voicetel.com
Proxy: sbc.voicetel.com
Register: true
Enabled: true
4.3. Accounts 21
FusionPBX Documentation, Release master
XMPP Manager
XMPP Manager is an optional menu item. In order to have the option for XMPP Manager there are a few step to take
to enble XMPP.
XMPP Profile
FusionPBX menu.
Click the
4.3. Accounts 23
FusionPBX Documentation, Release master
In this example we will setup Google Talk and by creating a profile called gtalk.
Option 1.
Lets say my gmail number was 13051231234. This approach will send the inbound calls to the inbound routes with a
destination number that is the default extension number that is set.
Option 2.
On a single tenant system. This will send the call to extension 1001 in the default context.
Option 3.
On a single tenant system. This will send the call to extension 1001 in the multi-tenant domain name.
Save the settings and restart the module. Restart the XMPP module from Advanced -> Modules page.
Go back to Accounts -> XMPP if the status says AUTHORIZED then you are ready to go.
Note If you are not getting AUTHORIZED you might need to goto the google account settings and choose Allow
less secure apps: ON under the Sign-in & security section.
4.3. Accounts 25
FusionPBX Documentation, Release master
Outbound Routes
Gateway: XMPP
Dialplan Expression: 11 digits
Description: Google Talk
Press Save
If your XMPP profile is named something other than gtalk edit the outbound route you just created.
Bridge statement should look like: dingaling/gtalk/+$1@voice.google.com replace gtalk with the profile name you
chose and then save it.
Enable XMPP
XMPP manager is used to configure client side XMPP profiles. It can be used as a client to register to make and
receive call with Google Talk or other XMPP servers.
cd /tmp
git clone https://github.com/fusionpbx/fusionpbx-apps.git
cd fusionpbx-apps/
mv xmpp/ /var/www/fusionpbx/app/
cd /var/www/fusionpbx/app
chown www-data:www-data -R xmpp/
Goto the GUI and click advanced > menu manager > edit icon > click Restore Defaults at top right
Then goto Advanced > Upgrade click Schema, Data Types, and Permission Defaults then click execute
Dialplan
In the Dialplan menu you have access to Destinations, Dialplan Manager, Inbound Routes and Outbound Routes.
4.4. Dialplan 27
FusionPBX Documentation, Release master
Destinations
Inbound destinations are the DID/DDI, DNIS or Alias for inbound calls. Click here for the youtube video
Configure Inbound Destinations: (This will auto-configure an Inbound Route also)
Select Dialplan from the drop-down list and then click Destinations.
Click on the
Enter the route information below and Click Save once complete.
Type: Inbound
Destination Number: ^(?:\+?1)?(\d{10})$
Action: Select desired destination from the drop-down list. We choose "Extension 100
" in our example.
4.4. Dialplan 29
FusionPBX Documentation, Release master
Dialplan Manager
The dialplan is used to setup call destinations based on conditions and context. You can use the dialplan to send calls
to gateways, auto attendants, external numbers, to scripts, or any destination.
Inbound Routes
Route incoming calls to destinations based on one or more conditions. It can send incoming calls to an IVR Menu,
Call Group, Extension, External Number, Script. Order is important when an anti-action is used or when there are
multiple conditions that match.
Inbound routes can be used for advanced reasons. Dialplan > Destinations will create and configure the Inbound
Route for you.
Outbound Routes
Route outbound calls to gateways, tdm, enum and more. When a call matches the conditions the call to outbound
routes. Check out the youtube video .
Click the
button on the right. Enter the route information below and Click Save once entry is complete.
4.4. Dialplan 31
FusionPBX Documentation, Release master
Gateway: VoiceTel
Dialplan Expression: ^(?:\+?1)?(\d{10})$ (You can also choose more than one from the
drop down list also as needed)
Order: 000
Enabled: true
Description: VoiceTel-out
By using VoiceTel you help support FusionPBX. Thank you for your support!
Applications
In the Applications menu (Apps) section you will find Call Block, Call Broadcast, Call Center, Call Detail Records,
Call Flows, Conference Center, Contacts, Fax Server, Follow Me, IVR Menu, Music on Hold, Operator Panel,
Phrases, Queues, Recordings, Ring Groups, Time Conditions and Voicemail.
4.5. Applications 33
FusionPBX Documentation, Release master
Call block
Action:
Reject- Will reject the call
Busy- Will send a busy signal
Hold- Will put the call on hold
Voicemail- Will send the call to the specified voicemail box
Call Broadcast
Once you have everything filled out click the Call Broadcast name you just created. On the top right click the
Send Broadcast button to start the call broadcast. To stop the call broadcast click STOP BROADCAST on the
top right.
Call Center
4.5. Applications 35
FusionPBX Documentation, Release master
To add a Call Center Queue click the plus edit icon on the right
Once a Queue is created click the edit pencil icon on the right. At the top right you can view, stop, start, restart
and save the queue
From Apps > Call Center click Agents at the top right to access Call Center Agents
Click the plus icon on the top right to add agents
Call Detail Records (CDRs) are detailed information on the calls. Use the fields to filter the information for the specific
call records that are desired. Records in the call list can be saved locally using the Export button.
Call Flows
4.5. Applications 37
FusionPBX Documentation, Release master
In the Call Flow example below we have the name as Call Flow. Made the Extension number 30 that didnt exist until
now. Feature code we made with a *code as *30. Kept the context as is with training.fusionpbx.com . Status to show
which mode. Made a pin number to help secure the call flow. Made the detination label as Day Mode. Picked a sound
to familiarize which mode is activated. Choose a destination for the alternative mode. Made the alternative detination
label as Night Mode. Picked an alternative sound to familiarize which mode is activated. Choose a destination for the
alternative mode. Finally describe what this call flow does.
Conference
Conferences is used to setup conference rooms with a name, description, and optional pin number.
4.5. Applications 39
FusionPBX Documentation, Release master
Enable Conference
Select from the Groups dropdown list superadmin and click add then save
Conference Center
Conference Centers are a group of conference rooms. They can be organized by cost center, geographically, or other
criteria.
Contacts
To create a contact click the plus and to edit a contact click the pencil icon on the right.
Fill out the fields with pertinent information and click save.
Users- Select the users that are allowed to view the contact
Groups- Select the group that are allowed access to the contact.
Go back into the contact to fill out more information that wasnt available when you first created the contact.
4.5. Applications 41
FusionPBX Documentation, Release master
Fax Server
To receive a FAX setup a fax extension and then direct the incoming to it. Click here for the Youtube video
There are more settings for fax under Advanced > Default Settings then fax category.
4.5. Applications 43
FusionPBX Documentation, Release master
To create a fax server goto App > Fax Server. Click the + on the right. Leave the Destination Number blank or
faxing wont work. Destination Number is used in the Fax Server Dial Plan and is set based on the fax server internal
extension number. Define the fields, the ones in bold are required. It is a good idea to organize so define the name
thoughtfully. The extension you must use one that is not allready created. Account Code should autofill. Again, leave
the Destination Number blank. A prefix can be defined when sending a fax. Email is for inbound faxes and will be
on the server and sent to the defines email. Define the Caller ID Name and Number. Leave the Forward Number and
Greeting blank for normal settings. Number of channels define with a numerical value. Keep organized by adding a
Description.
New
To send a fax the items in bold are required. To send a proper fax it is best to fill out all fields and attach any documents.
Keep in mind that the upload max MB is limited by Nginx and PHP config files.
4.5. Applications 45
FusionPBX Documentation, Release master
Inbox
Click PDF to view the fax or right click on PDF and left click on Save Link As. If you defined and email address in
the email field you will receive the fax also to that email address.
Sent
Click PDF to view the fax or right click on PDF and left click on Save Link As.
Fax ATA
To connect to a fax machine with an ATA you will most likely need to adjust settings in the ATA web interface and in
FusionPBX.
Create an extension for the FAX machine. You can optionally set bypass media to true under advanced in the
extension settings.
Goto Menu -> Advanced -> Default Settings then category Fax
Variables are used as defaults for the dialplan for sending and receiving faxes
4.5. Applications 47
FusionPBX Documentation, Release master
Its best not to make an assumption and to do testing with different settings to get the best results for your
particular carrier.
The variable fax_enable_t38_request=false will send a T38 reinvite when a fax tone is detected. In some cases
the re-invite always fails for some carriers which is why it is default to false.
Troubleshooting Tips
Faxing will fail at times. Fax Server should automatically try different methods for sending. There are different
combinations like;
With T-38 on/off
ECC on/off
Sending a wav file
Send a fax to HP faxback. This will test sending and receiving 1-888-473-2963
Test sending with Faxtoy.net This will display what is faxed on their website. 1-855-330-1239 or 1-213-294-
2943
Follow Me
IVR Menu
Welcome to the adding IVR section. Here you will find how to add IVRs. Click here for the youtube video
4.5. Applications 49
FusionPBX Documentation, Release master
on the right.
Direct Dial: Define whether the callers can dial directly to registered extensions.
Ring Back: Defines what the caller will hear while the destination is being called.
Caller ID Name Prefix: Set a prefix on the caller ID name.
Enabled: set the status of the IVR Menu.
You can get very creative with IVRs and are almost limitless in possibilities. In the basic example below we;
Name the IVR IVR Main
Extension 200
Greet Long a phrase that was made from the phrase section under apps
Number entry in options ,choose an extension for Destination and descriptions ie sales, billing, tech support,
and after hours. timeout 3000 milliseconds
4.5. Applications 51
FusionPBX Documentation, Release master
You now have a list of IVRs to go back to and edit or delete as needed.
Phrases
Click the plus on the right to create a phrase and the pencil icon to edit a phrase
Music on Hold
Music on hold can be in WAV or MP3 format. To play an MP3 file you must have mod_shout enabled on the Modules
tab. You can adjust the volume of the MP3 audio from the Settings tab. For best performance upload 16 bit,
8/16/32/48 kHz mono WAV files.
4.5. Applications 53
FusionPBX Documentation, Release master
Click the edit pencil on the right to customize music on hold options. This can be done on each kHz group.
Provision
Manual
Cisco
Polycom
Grandstream
Yealink
Zoiper
Automatic
Polycom
Grandstream
Yealink
Zoiper
Screen Capture
Queues
Queues are used to setup waiting lines for callers. Also known as FIFO Queues.
Recordings
Dial *732 to create a recording, or (for best results) upload a 16bit 8khz/16khz mono WAV file. Click here for the
youtube video.
To view and set the pin number goto Dialplan > Dialplan Manager > Click on Recordings > pin_number=8675309 at
the bottom.
4.5. Applications 55
FusionPBX Documentation, Release master
Create a Recording
Applying Recordings
Once you have a recording made you can use the recordings in different areas of FusionPBX. Custom IVRs and
phrases would be the typical uses.
Ring Group
A ring group is a set of destinations that can be called with a ring strategy.
To add a ring group click the plus. Click for the youtube video .
Name Simply the meaningful name of the Ring group (shows after the Extension in menu selections).
Extension The Dial-able extension for this group standard config states as a 2-7 number extension.
Strategy The selectable way in which the destinations are being used.
Simultaneous Rings all defined Destinations.
4.5. Applications 57
FusionPBX Documentation, Release master
4.5. Applications 59
FusionPBX Documentation, Release master
In our example we will have 4 extensions all ring at the same time until one of them pick up first. Click the + to create
a ring group. Fill in the fields that are in bold. In the Extension box type a number that is NOT allready created.
This new extention wont be in the extension list. The strategy will be Simultaneous. Enter in the destination the 4
extensions 1001, 1002, 1003, 1004.
Time Conditions
Dynamically route calls to an IVR menu, external numbers, scripts, or other destinations based on time conditions.
Fields in bold are mandatory.
Name Name of the Time Condition.
Extension Define an extension number that is NOT allready created.
Presets US Holiday presets.
Alternate Destination If the condition doesnt match the call will goto the defined alternate destination.
Order Changes the order of which condition is evaluated first.
Enabled If the ring group is enabled.
In our example we have an employee that will receive calls during a set time range and set days. Below is what the
settings look like for Monday through Friday at 5:00pm to 11:00pm. If the employee doesnt answer the call will be
directed to the Timeout Destination. Label the Name as Oncall and invent the Extension as 10011. In the Settings
choose from the dropdown lists for Day of Week for the condition, Monday for the Value and Friday for the Range.
4.5. Applications 61
FusionPBX Documentation, Release master
Next set of dropdown list choose Time of Day for the condition, 5:00 PM for the value and 11:00 PM for the Range.
If other options are needed just click the + to the right of Range.
The next dropdown choose the extension where the call is intended for. If the call is outside the date and time specified
the call will goto the Alternate Destination dropdown. Be sure Enabled is set True and click save.
Voicemail
To edit voicemail settings click the pencil edit icon on the right of the extension number.
Voicemail Options
Access an extensions voicemail away from the extension dial the extension and interupt the greeting with the *star
key.
*97 To access that extensions voicemail from the extension or the voicemail button
*98 To access any extensions voicemail
*99[ext] To access a specific extension voicemail
Main Menu
press 5 For advanced options
Advanced Options
press 1 Record a greeting
press 2 Choose a greeting
press 3 Record name
press 6 Change password
press 0 For main menu
4.5. Applications 63
FusionPBX Documentation, Release master
Voicemail Transcription
Uses API services to transcribe voicemails into text to be used in the app-sms and the voicemail to email options.
Currently (11/3/16) only supports microsoft bing
Sign up and language information is located on Microsoft Site
Warning: We cannot use mod_shout to record Voicemails because the transcription service needs an uncom-
pressed version of the audio. Therefore we will record in WAV and then use LAME to re-encode in MP3. This
could cause added resource utilization to your system.
Status
In the Status menu you have the options for Active Call Center, Active Calls, Active Conferences, Active Queues,
Agent Status, CDR Statistics, Emails, Extension Summary, Log Viewer, Registrations, Services, SIP Status, System
Status and Traffic Graph.
Status
Select a Call Center Queue from the list below to view its activity.
Active Calls
Active Conferences
List all the conferences that are currently active with one or more members.
Active Queues
List all the queues that are currently active with one or more callers.
Agent Status
List all the call center agents with the option to change the status of one or more agents.
4.6. Status 65
FusionPBX Documentation, Release master
CDR Statistics
Emails
Extension Summary
Extenson number, Number Alias, Missed, No Answer, Busy, ALOC, Inbound Calls, Inbound Duration, Outbound
Calls, Outbound Duration and Description.
Log Viewer
Registrations
View the devices that are registered. This will show User, Agent, IP, Port Number, Hostname and Status. You can also
UNREGISTER, PROVISION and REBOOT supported devices from here.
Services
Shows a list of processes, the status of the process and provides control to start and stop the process.
SIP Status
This will show sofia status of internal, internal-ipv6, external, and external-ipv6 profiles. With profiles you can
see REGISTRATIONS, and START/RESTART/RESCAN/FLUSH REGISTRATIONS. You can also FLUSH MEM-
CACHE, RELOAD ACL, RELOAD XML and REFRESH. View UP time, sessions since startup, max sessions, and
current stack size/max.
System Status
System Information, FusionPBX Version, Git Version, Switch Version, Memory Information, CPU Information, Hard
Drive Information and Memcache Information.
Traffic Graph
A browser (or plugin) that supports Scalable Vector Graphics (SVG) is required to view the traffic graph.
Advanced
In the Advanced menu you will find Access Controls, Adminer, App Manager, Backup, Command, Databases,
Default Settings, Domain, Grammer Editor, Group Manager, Menu Manager, Modules, Notifications, PHP Editor,
Provision Editor, Script Editor, Settings, SIP Profiles, SQL Query, Upgrade, Variables and XML Editor.
Welcome to the adding a domain section. Here you will find how to add a domain so that you can reach the specific
tenant from the multi-tenant domain side menu to configure and allow secure administration from the world wide
web.
Adminer
4.7. Advanced 67
FusionPBX Documentation, Release master
To enable auto login goto Advanced > Default settings and change False to True
Access Controls
Access control list can allow or deny ranges of IP addresses. There are several purposes for using the ACL.
The main purpose is for your carriers ip addresses.
Be careful with what and how you use ACL.
Most common mistakes result in calls not working between extensions and other undesirable results.
Be sure to keep Domains access control to default deny.
Do not put your public ip or phone IP addresses in the domains access control list.
Dont supply both the domain and the cidr on the same node.
If adding a single IP address to the CIDR field make sure to add /32 on the end of the IP address.
Goto Advanced > Access Controls. Click the edit icon for domains. At the bottom under nodes click the plus icon.
Click save
Goto > Status > Sip Status and click reloadacl.
Under Status > log viewer you should notice the ip added. This can be seen also from command line fs_cli by using
reloadacl
Command
Provides a conventient way to execute system, PHP, switch and SQL commands.
Click the drop down box on the right to choose from Switch, PHP, Shell and SQL to execute commands.
Domains
Welcome to the adding a domain section. Here you will find how to add a domain so that you can reach the specific
tenant from the multi-tenant domain side menu to configure and allow secure administration from the world wide web.
Click here for the youtube video
Adding a domain
4.7. Advanced 69
FusionPBX Documentation, Release master
on the right.
This will bring you to enter domain info. (Be sure to create an A record from your domain hosting account)
Domain Selection
Changing to a different domain click the stack of three dashes on the top right
A menu will pop open on the right of the screen. Click on the domain that you want to manage. You will always see
the domain you are in by looking at the top right beside the three stacked dashes.
Group Manager
Permit access levels to different group of users. The group permissions allow customizing permissions for existing
groups or custom groups.
4.7. Advanced 71
FusionPBX Documentation, Release master
User Manager
Click the plus at the right to add a user or pencil to edit an existing user.
Sip Profiles
Internal
Internal sip profiles (port 5060/5061) require registration or access controls cidr range to allow the IP address in
without SIP authentication. Once the access controls are setup correctly, the carrier will be allowed to send calls to the
internal profile.
External
External sip profiles (port 5080-5081) allow anonymous connection to FusionPBX and is optional. External profile is
optional when freewitch has a public ip address. Can be useful when setting behind nat. Being anonymous doesnt
mean totally open due to the inbound routes call conditions.(call filtering)
Internal ipv6
Internal ipv6 sip profiles (port 5060/5061) require registration or access controls cidr range to allow the IP address in
without SIP authentication. Once the access controls are setup correctly, the carrier will be allowed to send calls to the
internal ipv6 profile.
If you dont have ipv6 then the ipv6 profiles should be disabled.
Be sure to stop the profile before disabling it. To disable goto Advanced > SIP Profiles and click the pencil edit
icon to the right of the profile you want to disable. From the dropdown box select enabled to false.
External ipv6
External ipv6 sip profiles (port 5080-5081) allow anonymous connection to FusionPBX and is optional.
If you dont have ipv6 then the ipv6 profiles should be disabled.
Be sure to stop the profile before disabling it. To disable goto Advanced > SIP Profiles and click the pencil edit
icon to the right of the profile you want to disable. From the dropdown box select enabled to false.
Upgrade
The FusionPBX code is constantly evolving. Bug fixes being submitted, additions to improve security, making Fu-
sionPBX look nicer, to be more flexible, more scalable, and new features. A complete summary of the changes can be
found on the github code page https://github.com/fusionpbx/fusionpbx/commits/master.
Go to the menu then click on Advanced and then Upgrade. This tool allows you to update the source code, update the
database structure, restore the default menu and permissions. Click here for the Youtube video.
4.7. Advanced 73
FusionPBX Documentation, Release master
* cd /var/www/fusionpbx
git pull
chown -R www-data:www-data *
How to Upgrade
To upgrade you will need to get the latest source code. Depending on how extreme the changes have been or the
version you currently are on since your last update, you may need to follow version specific upgrade instructions to
bring your install up to date.
Login into the web interface with a user account assigned to the superadmin group.
Login to the console with either the ssh, the locally.
Backup Its a good idea to make a backup. If using sqlite, your backup will easily include the SQL database.
mkdir /etc/fusionpbx
mv /var/www/fusionpbx/resources/config.php /etc/fusionpbx
mv /usr/local/freeswitch/scripts/resources/config.lua /etc/fusionpbx
cd /var/www
cp -R fusionpbx fusionpbx_backup
Change the directory''' to the FusionPBX directory
cd /var/www/fusionpbx
cd /var/www/fusionpbx
git pull
Permissions
Reset the permissions on the fusionpbx directory tree. When you do git pull it sets the permissions on any updated
files to match the account that you are running git pull with. If that account is different to the web server account it
will result in some files no longer being accessible and a red bar error at the top of the upgrade screen on the GUI. To
fix this you should reapply the permissions in fusionpbx and recursively in all directories inside it.
The example assumes the web server runs as user www-data and fusionpbx is installed to /var/www/fusionpbx.
(chown -Rv Ownername:GroupName /var/www/fusionpbx)
cd /var/www/fusionpbx
chown -R www-data:www-data *
NOTE: As of FusionPBX 3.8.3 (Stable Branch), the scripts should be automatically updated when updating the
Source Code, using the Advanced > Upgrade page. Any customized scripts, having the same name as the default
scripts, will be overwritten. (An option to disable this default behavior is available using Default Setting: switch >
4.7. Advanced 75
FusionPBX Documentation, Release master
scripts_update > false) Missing scripts will be restored, and any additional files within the scripts folder will remain
untouched.
FusionPBX is a fast moving project where features are constantly being added and bugs are being fixed on a daily
basis so I would also suggest upgrading the Freeswitch scripts directory as part of any normal upgrade process.
Update Freeswitch
Use github to get the updated files. You have to do this from an empty directory.
cp -R /usr/local/freeswitch/scripts /usr/local/freeswitch/scripts-bak
rm -Rf /usr/local/freeswitch/scripts/
cd /usr/src
git clone https://github.com/fusionpbx/fusionpbx.git
cp -R /var/www/fusionpbx/resources/install/scripts /usr/local/freeswitch
chown -R www-data:www-data /usr/local/freeswitch/scripts
cp -R /usr/local/freeswitch/scripts-bak/resources/config.lua /usr/local/freeswitch/
scripts/resources/config.lua
(The last step above is not required if your config.lua file is being stored in a different location, such as the
/etc/fusionpbx folder.)
cp -R /usr/local/freeswitch/scripts /usr/local/freeswitch/scripts-bak
rm -rf /usr/local/freeswitch/scripts/*
Here you need to go directly to step 3 and make sure you run upgrade schema from the GUI immediately otherwise
your calls will not complete.
If your config.lua file was located in scripts/resources/, then youll need to restore it (from the backup previously
performed) to scripts/resources/config.lua.
Many updates have changes to the database and to the Freeswitch scripts. The upgrade_schema script
From the GUI, run Advanced -> Upgrade Schema which will add any needed newer tables or columns.
Then run App Defaults. If you removed the scripts on Step 2 then run this twice.
cd /var/www/fusionpbx
/usr/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php
4.7. Advanced 77
FusionPBX Documentation, Release master
If your screen was nicely formatted with a fusionpbx theme, and suddenly now goes to a black and white screen with
familiar text but no theme, it is because you were using a theme which no longer exists in the latest version of the
code. If this happens to you navigate to:
http://domain_or_ip/mod/users/usersupdate.php
Then scroll down to where it says Template and select one of the valid templates from the drop down list. Then
press Save. It will be fixed now and you can continue with the remaining steps below.
(Note that any users who have invalid templates selected will also have the same problem you did. You can fix them
from the user manager option in the accounts menu)
Make sure that the freeswitch directory has the correct permissions
Restart Freeswitch
Step 5: Menu
http://domain_or_ip/core/menu/menu_restore_default.php
Sometimes variable names changes. In rev 1877 v_config_cli.php variable names changed which caused no fax to
email emails or voicemail emails to be sent. Problem was the SMTP details did not exist.
Go to Advanced -> Settings and then click save. This will re-generate v_config_cli.php and any other needs config
files.
Version Upgrade
Version Upgrade can take several steps to perform. Below will show how to upgrade from specific versions.
1. Update the source code. From the web interface go to the Menu -> Advanced > Upgrade page. Check the source
box and the press execute. If you see a red bar it indicates there was a git conflict and you will need to update from
console instead. If you dont see the source box then you will need to update from the console.
cd /var/www/fusionpbx
git stash
git pull
chown -R www-data:www-data /var/www/fusionpbx
2. If the page goes blank type in the url http://domain.com/logout.php This should bring you back to the login
screen.
3. Udate the Schema. Advanced -> Upgrade Check the Schema box and then then press execute. https://domain.com/
core/upgrade/index.php
4.7. Advanced 79
FusionPBX Documentation, Release master
5. Check the box for Menu Defaults and run execute. This will update the menu to the default menu. The menu
should now look like this.
6. Check the box for Permission Defaults and run execute. Permissions are store in a session to get new permissions
logout and back in.
7. Goto Dialplan > Dialplan Manager and delete local_extension. Then goto Advanced > Upgrade and only
check box App Defaults and click execute. This will regenerate the new local_extension version.
8. Go to Applications > Conference profiles. Edit each profile and replace $${hold_music} with lo-
cal_stream://default
9. Goto Advanced > Variables hold_music. Make sure its value is set as local_stream://default
* Edit (Pencil icon on the right) the Category names to reflect default for 8, 16, 32,
and 48kHz.
* After you click the pencil icon choose at the bottom the domain for the rates and
click save.
* If the category is blank, you may have missed running Advanced > check box app
defaults > execute or you may not have renamed autoload_configs/local_stream.conf.
* For custom music on hold check the path for the domain name and set select for the
domain name to match the domain used in the path.
10. Remove .xml from the end of the following file names
**Before**
autoload_configs/callcenter.conf.xml
autoload_configs/conference.conf.xml
autoload_configs/local_stream.conf.xml
**After**
autoload_configs/callcenter.conf
autoload_configs/conference.conf
autoload_configs/local_stream.conf
Many of the provisioning templates were updated. If you use custom provisioning templates you should
consider updating them with the new versions.
4.7. Advanced 81
FusionPBX Documentation, Release master
Note: Upgrading can get very complex. If the production system is critical or you are intimidated from these
upgrade instructions you may want FusionPBX paid support at http://www.fusionpbx.com/support.php
Beyond the standard upgrade procedure just described, the following will also need to be performed:
* If using App -> XMPP, Content Manager, or Schema they have been moved dev -> branches -> apps directory need
to pull files from there if you want to use any of them.
* For single tenant systems default context is no longer used by default.
* Easiest way to update your system is go to Advanced -> Domains and edit your domain.
* Copy your current domain name then change the name to default then save the change.
* Now edit the domain name again and paste your original domain name or IP address whatever the domain
originally was and save the changes
* Go to accounts extensions and save one extension. (not needed if using the XML handler)
* Go to Dialplan Manager and save one of the dialplans. (not needed if using the XML handler)
* FAX ( may require adjusting the paths and web server user account to match your server www-data is used in this
example)
* Delete all previous FAX dialplans
* Resave each fax server in the GUI.
* cd /var/www/fusionpbx/app/fax
* wget https://github.com/fusionpbx/fusionpbx-scripts/tree/master/upgrade/fax_import.php
* chown -R www-data:www-data fax_import.php
* Login into the GUI and use this path in your browser http://<domain-or-ip>/app/fax/fax_import.php
* rm /var/www/fusionpbx/app/fax/fax_import.php
* Groups and Permissions
If you go to Advanced Group Manager -> And you see what looks like duplicates of user, admin and superadmin
groups then you need do the following instructions.
Remove permissions associated with all domain groups with names that match default global groups...
Remove all domain groups having the same names as the default global groups
(retains any custom domain groups)...
4.7. Advanced 83
FusionPBX Documentation, Release master
Empty the group_uuid field for any group user with a group_name value having
the same name as the default global groups (retains user assignments to custom domain
groups)...
For group users with a null group_uuid, insert the group_uuid of the global group that matches the group_name
value...
Run this code from Advanced -> Command -> PHP Command.
If your apps menu disappeared check that it wasnt set to protected in the menu manager.
(advanced -> menu manager). If protected is true, it wont show up.
Potential issue with call recording after upgrading/switch to latest 3.6 stable.
After upgrading to 3.6 stable from 3.5 dev I noticed that calls were no longer being recorded. This was due to the file
extension being missing from the recording path. If this is happening to you it is an easy fix.
Go to Advanced -> variables -> category default and add the variable record_ext and set it to either wav or mp3.
Choosing mp3 depends upon whether or not you have mod_shout installed and enabled.
Gateways now use the gateway_uuid as the name that is used when interacting with FreeSWITCH. This script is
needed to help change the gateway names used in the outbound routes. You may need to remove the old gateway file
names from the conf/sip_profiles/external directory.
cd /var/www/fusionpbx
wget http://fusionpbx.googlecode.com/svn/branches/dev/scripts/upgrade/gateway_uuid.php
http://x.x.x.x/gateway_uuid.php
rm gateway_uuid.php
* Go To Advanced -> Default Settings -> Switch Category -> Sub category gateways change to sip_profiles
4.7. Advanced 85
FusionPBX Documentation, Release master
Default Settings
In the switch category change gateways to sip_profiles
Update the source as described on this page, menu manager restore default, group manager edit a group restore
default, advanced -> upgrade schema.
FusionPBX 3.4 hunt groups have been deprecated. Use the following script run it only one time to move existing
hunt groups to ring groups.
cd /var/www/fusionpbx
wget https://github.com/fusionpbx/fusionpbx-scripts/tree/master/upgrade/hunt_group_
export.php
http://x.x.x.x/hunt_group_export.php
rm -r hunt_group_export.php
Ring groups were expanded to add ability to call external numbers and match other missing hunt group features. A
new table was created to accomodate this.
cd /var/www/fusionpbx
wget https://github.com/fusionpbx/fusionpbx-scripts/tree/master/upgrade/ring_group_
extensions.php
http://x.x.x.x/ring_group_extensions.php
rm ring_group_extensions.php
FreeSWITCH changed the syntax to connect to the database so numerous LUA scripts had to be updated. If you
customized any of the lua scripts make a backup of the FreeSWITCH scripts directory. Then remove the contents of
the freeswitch/scripts directory and then run advanced -> upgrade schema (which will detect the missing scripts
and replace them).
Ubuntu/Debian
cd /var/www/fusionpbx
git pull
Advanced -> Upgrade Schema
Menu
If you cant see the menu after upgrading try the following in your browser replace x.x.x.x with your ip or domain
name.
x.x.x.x/core/menu/menu.php
Edit the menu make sure the language is set to en-us.
Press **Restore Default**
Default settings
x.x.x.x/core/default_settings/default_settings.php
category: language
type: code
value: en-us
4.7. Advanced 87
FusionPBX Documentation, Release master
wget https://github.com/fusionpbx/fusionpbx-scripts/tree/master/upgrade/voicemail_
export.php
Run from the browser it will take the voicemail data from the FreeSWITCH database and copy the information into
the FusionPBX database.
http://x.x.x.x/voicemail_export.php
rm voicemail_export.php
No longer using hunt groups. So the backend has changed so keep in mind that you need to reset call forward and
follow me settings. They are still listed in app -> hunt groups. After updating the info in call forward, follow me
you should delete the hunt group.
Version 2 to 3.0
| When upgrading from previous versions, you may encounter the following issues:
Missing menus
* Go to hxxps://yourdomain.com/core/menu/menu.php
* Click the edit (e) button beside default
Release Revisions
r0001 is 1.0 release - 6 Nov 2009
r2523 is 3.0 release - 3 May 2012
r2585 is 3.0.4 release - 24 May 2012
r2757 is 3.1 release - 18 Aug 2012
r2777 is 3.1.1 release - 26 Aug 2012
r2827 is 3.1.2 release - 12 Sep 2012
r2897 is 3.1.3 release - 26 Sep 2012
r2907 is 3.1.4 release - 27 Sep 2012
r3694 is 3.2 release - 19 Jan 2013
r3978 is 3.3 release - 1 May 2013
r4605 is 3.4 release - 28 Sep 2013
r6747 is 3.6.1 release - 22 Aug 2014
r8481 is 3.8.3 release - 11 May 2014
r793d386 is 4.0 release - Aug 2015
r4fdb6e9 is 4.1 release - Dec 2015
rxxxxxxx is 4.2 release - xxx 2016
SQLite
SQLite is the FreeSWITCH default. Databases are located in the freeswitch/db directory.
ODBC
http://wiki.freeswitch.org/wiki/ODBC
Postgres
Postgres native support will be in FreeSWITCH 1.2.4 but has been available in the Main GIT branch.
4.7. Advanced 89
FusionPBX Documentation, Release master
Dependencies
Configure
To enable PostgresSQL as a native client in FreeSWITCH you must enable it during the build when running configure.
** ./configure enable-core-pgsql-support **
switch.conf.xml
Additional Information
Fail2Ban
Logs
This will log FusionPBX authentication failures to syslog (AUTH_LOG). This file can be in different places
depending on how rsyslog, or syslog is configured.
Ubuntu
/var/log/auth.log
Examples
GUI Login
incorrect username
incorrect password
Provisioning
Created from the code in /fusionpbx/mod/provision/index.php Please doublecheck this!
Feb 1 12:07:27 your_hostname FusionPBX: [w.x.y.z] provision attempt bad password for
AA:BB:CC:DD:EE:FF
Setting up Fail2Ban
RegEx
You can test the regex with fail2ban-regex
Configuration
Jail Options
Filter Rules
vim /etc/fail2ban/filter.d/fusionpbx.conf
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
#failregex = [hostname] FusionPBX: \[<HOST>\] authentication failed
#[hostname] variable doesn't seem to work in every case. Do this instead:
failregex = .* FusionPBX: \[<HOST>\] authentication failed for
= .* FusionPBX: \[<HOST>\] provision attempt bad password for
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =
[fusionpbx]
enabled = true
port = 80,443
protocol = tcp
filter = fusionpbx
logpath = /var/log/auth.log
action = iptables-allports[name=fusionpbx, protocol=all]
# sendmail-whois[name=FusionPBX, dest=root, sender=fail2ban@example.org] #no
smtp server installed
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
failregex = \[WARNING\] sofia_reg.c:\d+ SIP auth failure \(REGISTER\) on sofia
profile \'\w+\' for \[.*\] from ip <HOST>
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =
Modify /etc/fail2ban/jail.conf. Add the following make sure the freeswitch.log file path is correct.
[freeswitch-tcp]
enabled = true
port = 5060,5061,5080,5081
protocol = tcp
filter = freeswitch
logpath = /usr/local/freeswitch/log/freeswitch.log
action = iptables-allports[name=freeswitch-tcp, protocol=all]
sendmail-whois[name=FreeSwitch, dest=root, sender=fail2ban@example.org]
[freeswitch-udp]
enabled = true
port = 5060,5061,5080,5081
protocol = udp
filter = freeswitch
logpath = /usr/local/freeswitch/log/freeswitch/freeswitch.log
action = iptables-allports[name=freeswitch-udp, protocol=all]
sendmail-whois[name=FreeSwitch, dest=root, sender=fail2ban@example.org]
Important
You can easily ban yourself, including current active ssh connections.
To unban:
[DEFAULT]
Errors
If youre seeing something like this in your fail2ban logfile:
or
sed -i -e s,beautifier\.setInputCmd\(c\),'time.sleep\(0\.1\)\n\t\t\tbeautifier.
setInputCmd\(c\)', /usr/bin/fail2ban-client
http://www.fail2ban.org/wiki/index.php/Fail2ban_talk:
Community_Portal#fail2ban.action.action_ERROR_on_startup
Freeswitch install
mv /usr/src/freeswitch freeswitch-version
Git Release
cd /usr/src
git clone -b v1.4 https://freeswitch.org/stash/scm/fs/freeswitch.git
cd freeswitch
./bootstrap.sh
or
Git Head
cd /usr/src
git clone https://freeswitch.org/stash/scm/fs/freeswitch.git
cd freeswitch
./bootstrap.sh
or
files.freeswitch.org
cd /usr/src
wget http://files.freeswitch.org/freeswitch-1.4.26.zip
unzip freeswitch-1.4.26.zip
cd freeswitch-1.4.26
cd /usr/src
wget http://files.freeswitch.org/freeswitch-1.6.6.zip
unzip freeswitch-1.6.6.zip
cd freeswitch-1.6.6
Ubuntu Dependencies
libmemcached-dev
Debian Dependencies
memcached libmemcached-dev
CentOS
yum install git gcc-c++ autoconf automake libtool wget python ncurses-devel zlib-
devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-
modules.conf
mod_avmd
mod_callcenter
mod_memcache
mod_cidlookup
mod_curl
mod_shout
Postgres driver
./configure --enable-core-pgsql-support
Run Make
make
rm -rf /usr/local/freeswitch/{lib,mod,bin}/*
Install
make install
File Permissions
Set the file permissions instructions may vary based on the OS and install directory.
cd /usr/src/freeswitch
make sounds-install moh-install
make hd-sounds-install hd-moh-install
make cd-sounds-install cd-moh-install
Startup Script
Run on new install only. Create the file /etc/init.d/freeswitch with the following code:
#!/bin/bash
### BEGIN INIT INFO
# Provides: freeswitch
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Freeswitch debian init script.
# Author: Matthew Williams
#
### END INIT INFO
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
DESC="Freeswitch"
NAME=freeswitch
DAEMON=/usr/local/freeswitch/bin/$NAME
DAEMON_ARGS="-nc -nonat -reincarnate"
PIDFILE=/usr/local/freeswitch/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
FS_USER=www-data #freeswitch
FS_GROUP=www-data #daemon
#
# Function that sets ulimit values for the daemon
#
do_setlimits() {
ulimit -c unlimited
ulimit -d unlimited
ulimit -f unlimited
ulimit -i unlimited
ulimit -n 999999
ulimit -q unlimited
ulimit -u unlimited
ulimit -v unlimited
ulimit -x unlimited
ulimit -s 240
ulimit -l unlimited
return 0
}
#
# Function that starts the daemon/service
#
do_start()
{
# Set user to run as
if [ $FS_USER ] ; then
DAEMON_ARGS="`echo $DAEMON_ARGS` -u $FS_USER"
fi
# Set group to run as
if [ $FS_GROUP ] ; then
DAEMON_ARGS="`echo $DAEMON_ARGS` -g $FS_GROUP"
fi
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /
dev/null -- \
|| return 1
do_setlimits
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --
background -- \
$DAEMON_ARGS \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --
name $NAME
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
;;
#reload|force-reload)
#
# If do_reload() is not implemented then leave this commented out
# and leave 'force-reload' as an alias for 'restart'.
#
#log_daemon_msg "Reloading $DESC" "$NAME"
#do_reload
#log_end_msg $?
#;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
exit 0
Make the script executable and make it auto start on system boot:
chmod +x /etc/init.d/freeswitch
update-rc.d freeswitch defaults
Testimonials
Businesses of all sizes use FusionPBX daily. We love to see folks happy saving money using FusionPBX. Here are
some of the testimonials we received.
Just want to give a thankful shout out to everyone at FusionPBX that have helped in education, contribution and
support. The FusionPBX team have developed a leading product. Its been a joy from day one joining this community
and I look forward to the road ahead.
-Kissvoice
We have been using FusionPBX for many of our clients and just want to express our gratitude to Mark and the team for
not only providing a great product, but being extremely helpful in bringing out new features and helping us maintain
the service. Every new release amazes us with the work and development put into it.
-Kloudphone
SureVoIP have been using FusionPBX since 2010. SureVoIP sponsored the first versions of multi-tenant domains and
hot desking. SureVoIP sponsors and contributes fixes and features when possible.
Because of FusionPBXs highly configurable nature, responsive support team and sane design, SureVoIP have been
able to win many large customers because proprietry systems are so rigid and slow to innovate. We have been proud
to support and deploy FusionPBX for 7 years.
-SureVoIP
Winner of the Best Business ITSP (Medium Enterprise) 2016! http://www.surevoip.co.uk/2016-best-provider
I would like to tell everyone there that I have been trying to get an open source PBX to work for me for over three
months now and since I am not a linux guy, I havent been able to get any of them working the way I wanted.
FusionPBX installation script installed ALL required packages and libraries in one go and it was up and running
in 10 mins. Once I followed the youtube videos <https://www.youtube.com/fusionpbx>_ It took me no time to setup
and migrate my clients to FusionPBX. One of the best features I love in FusionPBX is the automatic dialplan expression
as I have always struggled with remembering the expression syntax. The user interface and the way all the features
are grouped is awesome.
Again, Thanks for the effort
-BareVOIP Limited
We would love to hear from you! Please reach out to us at http://fusionpbx.com/support.php if you would like to be
featured on this page.
Password Reset
The steps below are outdated but useful for older installations. Click here for the new youtube video on password
recovery.
Here some rough steps to change the password of the database. The password can only be changed and not recovered.
The database contains a table called v_users which contains the username, password and salt. The password is the
md5 hash of the password and the salt.
Password Hash
Use the following commands to generate the password hash. Dont forget to provide your own salt and password.
php /tmp/test.php
SQLite
Install sqlite3 which can be be used to modify the database fusionpbx.db. Then open the database with the following:
sqlite3 fusionpbx.db
PostgreSQL
Connect to the PostgreSQL database. Once you are running psql you can use:
su postgres
psql
\c fusionpbx
The hashed password and the salt can be updated using the command:
Feature Codes
Below are the * codes used with FusionPBX. You can also create more as needed. If you do be sure to pick ones
that are not currently in use.
Basic
Administrative PIN (Recordings pin) can be found here Administrative PIN page
Call Parking
Advanced
Voicemail
Miscellaneous
Toll Allow
Toll Allow is a variable that can be set per extension. It allows you to limit who can make what type of calls. Note
that although the variable is provided in the extension configuration, the default dialplan DOES NOT make use of it.
Therefore if you want to use it you need to add statements to the dialplan to enable it.
An example for the contents of the toll_allow variable would be:
You can then add information to your dialplan to process this variable. In the example XML below, if the valid allow
value isnt present then an extension shouldnt be able to dial out. However extension -> extension should still work.
The following code are example XML for standard outbound routes (Dialplan->OutboundRoutes). Effectively you are
applying an additional condition to EACH outbound route that you want to limit. So in the FusionPBX GUI select an
outbound route and add
Youll need to do that for all of your outbound routes, tag them local, domestic, or interna-
tional depending on what they are. On some installations this example file will be present in
/usr/local/freeswitch/conf/dialplan/default/01_example.com.xml:
This example assumes all calls are bad (except internal) unless they are flagged as good by the value of the toll_allow
variable.
<include>
<extension name="local.example.com">
<condition field="${toll_allow}" expression="local"/>
<condition field="destination_number" expression="^(\d{7})$">
<action application="set" data="effective_caller_id_number=${outbound_caller_id_
number}"/>
</condition>
</extension>
<extension name="domestic.example.com">
<condition field="${toll_allow}" expression="domestic"/>
<condition field="destination_number" expression="^(\d{11})$">
<action application="set" data="effective_caller_id_number=${outbound_caller_id_
number}"/>
<extension name="international.example.com">
<condition field="${toll_allow}" expression="international"/>
<condition field="destination_number" expression="^(011\d+)$">
<action application="set" data="effective_caller_id_number=${outbound_caller_id_
number}"/>
This example takes the opposite approach and is how to PREVENT toll calls. The below example takes the opposite
approach. It assumes that all calls are good unless they are flagged as bad.
Put this in your advanced dialplan. In the toll allow of whatever extension you wanted to restrict put the value local.
This example restricts from calling 10 or 11 digit numbers.
TFTP
Several models of phone out there that still only use TFTP for provisioning. Even though they have reached end of
life, some of the popular ones are the Cisco 7960 and 7940.
Install TFTPD
Test TFTP
tftp x.x.x.x
get 000000000000.cnf
NAT is Network Address Translation. When your FusionPBX and/or FreeSWITCH are inside NAT then then you may
experience one way audio or no audio in either direction the following information can help you get audio working in
both directions.
Default config
The external_rtp_ip and external_sip_ip are set to $${local_ip_v4} in Advanced -> Variables by default. The lo-
cal_ip_v4 variable is auto detected by FreeSWITCH. The variable can be also be overidden as a preset variable before
it is used if you want to control the IP address that it represents.
This works good when the server has a public IP address.
It also works well when all phones are inside the same network and nothing needs to traverse the NAT. For
example if you are using a SIP to TDM gateway and all your phones are in the same network.
SIP ALG
A SIP Application Layer Gateway (ALG) is a tool designed to help SIP traverse NAT. While the SIP ALG is good in
theory it often causes more problems than it solves. Because of this its usually best to disable the SIP ALG on your
firewall. An alternative way to disable it is to move SIP to a non standard port.
Static IP
FusionPBX is behind NAT and you have a static public IP address and you have phones on the same network and/or
outside the network.
Set external_rtp_ip to autonat:xxx.xxx.xxx.xxx
Set external_sip_ip to autonat:xxx.xxx.xxx.xxx
If you dont register a gateway to the carrier you may need to port forward SIP and RTP.
UPnP or PMP
FusionPBX is behind NAT and you dont have a static ip address. You do have a firewall that is capable of UPnP or
PMP.
Enable UPnP or PMP in your firewall
In Debian OS /etc/default/freeswitch remove -nonat
Make systemd aware of the changes. systemctl daemon-reload
Set external_rtp_ip to auto-nat
Set external_sip_ip to auto-nat
Restart FreeSWITCH. service freeswitch restart
Contributing
Note: If you are planning to contribute to any of our github repos we require that you sign the FusionPBX Contributor
License Agreement. This mainly protects FusionPBX and our users read: you from code that could be inserted that
might pose a legal problem. It does this by verifying that the code you are contributing is yours to give and the you
give it freely and irrevocably to the project.
4. Would you like to see FreePBX in your native language and have the time to commit to staying on top of
translations for releases? Check out the translation section to learn how to use our translation server.
Note: Contributing Code or Documentation requires knowledge of Git, Github and how to create pull requests on
Github. This is not as bad as it sounds and if you are willing to learn we will help you through it.
Contributing Code
https://github.com/fusionpbx/open-source
This repository serves as the umbrella project to represent the various open source efforts of Mark J. Crane(https:
//fusionpbx.com). Come here to get an overview of the various projects, to learn how to contribute to them, and to
sign up as a contributor.
Table Of Contents
You are willingly licensing your contributions under the terms of the open source license of the project that
youre contributing to.
You are legally able to license your contributions as stated.
The reason we do this is to ensure, to the extent possible, that we dont taint the projects we manage with contribu-
tions that turn out to be improper. This protects everyone who wants to use the projects, including you! If you want a
longer explanation, then you can check out the [CLA Rationale page](https://github.com/Fusionpbx/opensource/blob/
master/cla-rationale.md).
Once you sign the Contributor License Agreement (the CLA), we will then be able to merge your contributions with
a clear conscience and with only the friction that results from the usual technical back-and-forth of a vibrant open
source project.
To get started with this process, visit the [Sign the CLA](https://github.com/Fusionpbx/opensource/blob/master/
sign-cla.md) page.
Thanks, FusionPBX!
List of Projects
Contributing Documentation
Contributing Translations
2. Next execute the following two commands and notepad will appear
change the first commit to reword and the following commit(s) to fixup (similar to screenshot below)
Close and save the text, next it will pop up another notepad for the commit message. Enter the commit title on the first
line, leave a line blank and enter the commit message (similar to screenshot below)
4. If the changes are correct switch back to the git shell and execute this to push the changes
All done!
Coding Standards
Documentation Guide
This page shows an nice overview of the reStructuredText syntax. This is not a comprehensive list of everything you
can do, but should be enough to get you up and running to contribute some really nice documentation. It is based on
resources found at Sphinx .
To get your own local documentation repository running, simply
Introduction
The reStructuredText (RST) syntax provides an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax
and parser system. However, you need to be very precise and stick to some strict rules:
like Python, RST syntax is sensitive to indentation !
RST requires blank lines between paragraphs
This entire document is written with the RST syntax. In the right sidebar, you should find a link Edit on Github,
which will show each page in reStructuredText raw text format.
Contents
Documentation Guide
Introduction
Getting Started
* Simple tables
* Multicells tables, first method
* Multicells table, second method
* The tabularcolumns directive
* The csv-table directive
* Include Images
* Include a Figure
Boxes
* Comments
* Substitutions
* glossary, centered, index, download and field list
* Footnote
* Citations
* More about aliases
* Intersphinx
* file-wide metadata
* metainformation
* contents directives
Useful extensions
Getting Started
Learn Git in 15 Minutes Git Tutorial that will help you get started if you prefer. There is also awesome Git Tutorials
on the Atlassian Git site. Here is the link on installing Git if you dont have it yet Git Install
One of the great things about Git and documentation is that all people who contribute are encouraged to setup their
own local copy of the docs for off-line editing. This by default will ensure that many backups of the documents exist
and there is never any concern about losing them.
Assuming you have Python already, install Sphinx locally:
$ cd /path/to/where_you_want_the_docs
$ git clone https://github.com/fusionpbx/fusionpbx-docs.git
$ cd fusionpbx-docs
$ make html
Open index.html with your web browser and check your changes:
fusionpbx-docs/build/html/index.html
Edit your files and rebuild until you like what you see, then commit your changes and push to the public repository.
Assuming the file you changed is called myfile.rst:
Text Formatting
There are a few special characters used to format text. The special character * is used to defined bold and italic text
as shown in the table below. The backquote character ` is another special character used to create links to internal or
external web pages as you will see in section Internal and External Links.
usage syntax HTML rendering
italic *italic* italic
bold **bold** bold
link `python <www.python.org>`__ python
verbatim ``*`` *
The double backquote is used to enter in verbatim mode, which can be used as the escaping character. There are some
restrictions about the * and `` syntax. They
cannot not be nested,
content may not start or end with whitespace: * text* is wrong,
it must be separated from surrounding text by non-word characters like a space.
The use of backslash is a work around to second previous restrictions about whitespaces in the following case:
this is a *longish* paragraph is correct and gives longish.
this is a long*ish* paragraph is not interpreted as expected. You should use this is a
long\ *ish* paragraph to obtain longish paragraph
In Python docstrings it will be necessary to escape any backslash characters so that they actually reach reStructured-
Text. The simplest way to do this is to use raw strings by adding the letter r in front of the docstring.
Python string Typical result
r"""\*escape* \`with` "\\"""" *escape* `with` "\"
"""\\*escape* \\`with` "\\\\"""" *escape* `with` "\"
"""\*escape* \`with` "\\"""" escape with ""
Headings
In order to write a title, you can either underline it or under and overline it. The following examples are correct titles.
*****
Title
*****
subtitle
########
subsubtitle
**********************
and so on
Two rules:
If under and overline are used, their length must be identical
The length of the underline must be at least as long as the title itself
Normally, there are no heading levels assigned to certain characters as the structure is determined from the succession
of headings. However, it is better to stick to the same convention throughout a project. For instance:
# with overline, for parts
* with overline, for chapters
=, for sections
-, for subsections
^, for subsubsections
, for paragraphs
External links
`<http://www.python.org/>`_
which appear as http://www.python.org/ . Note the underscore after the final single quote. Since the full name of the
link is not always simple or meaningful, you can specify a label (note the space between the label and link name):
`Python <http://www.python.org/>`_
Note: If you have an underscore within the label/name, you got to escape it with a \ character.
All titles are considered as hyperlinks. A link to a title is just its name within quotes and a final underscore:
This syntax works only if the title and link are within the same RST file. If this is not the case, then you need to create
a label before the title and refer to this new link explicitly, as explained in Explicit Links section.
Explicit Links
You can create explicit links within your RST files. For instance, this document has a label at the top called
rst_tutorial, which is specified by typing:
.. _rst_tutorial:
You can refer to this label using two different methods. The first one is:
rst_tutorial_
:ref:`rst_tutorial`
With the first method, the link appears as rst_tutorial, whereas the second method use the first titles name found after
the link. Here, the second method would appear as Documentation Guide.
Note: Note that if you use the ref role, the final underscore is not required anymore.
gives:
This is a bulleted list.
It has two items, the second item uses two lines. (note the indentation)
Note: if two lists are separated by a blanck line only, then the two lists are not differentiated as you can see above.
Sphinx and the RST syntax provides directives to include formatted text. As an example, let us consider the code-block
syntax. It allows to insert code (here HTML) within your document:
.. code-block:: html
:linenos:
Here, code-block is the name of the directive. html is an argument telling that the code is in HTML format, lineos is
an option telling to insert line number and finally after a blank line is the text to include.
Note that options are tabulated.
This easiest way to insert literal code blocks is to end a paragraph with the special marker made of a double coulumn
::. Then, the literal block must be indented:
import math
print 'import done'
or:
import math
print 'import done'
gives:
This is a simple example:
import math
print 'import done'
code-block directive
By default the syntax of the language is Python, but you can specify the language using the code-block directive as
follows:
.. code-block:: html
:linenos:
produces
.. literalinclude:: filename
:linenos:
:language: python
:lines: 1, 3-5
:start-after: 3
:end-before: 5
Tables
There are several ways to write tables. Use standard reStructuredText tables as explained here. They work fine in
HTML output, however, there are some gotchas when using tables for LaTeX output.
The rendering of the table depends on the CSS/HTML style, not on sphinx itself.
Simple tables
+---------+---------+-----------+
| 1 | 2 | 3 |
+---------+---------+-----------+
which gives:
1 2 3
Size of the cells can be adjusted as follows:
+---------------------+---------+---+
|1 | 2| 3 |
+---------------------+---------+---+
renders as follows:
1 2 3
This syntax is quite limited, especially for multi cells/columns.
+------------+------------+-----------+
| Header 1 | Header 2 | Header 3 |
+============+============+===========+
| body row 1 | column 2 | column 3 |
+------------+------------+-----------+
| body row 2 | Cells may span columns.|
+------------+------------+-----------+
| body row 3 | Cells may | - Cells |
+------------+ span rows. | - contain |
| body row 4 | | - blocks. |
+------------+------------+-----------+
gives:
Header 1 Header 2 Header 3
body row 1 column 2 column 3
body row 2 Cells may span columns.
body row 3
Cells may span rows.
body row 4
Cells
gives:
Inputs Output
A B A or B
False False False
True False True
Note: table and latex documents are not yet compatible in sphinx, and you should therefore precede them with the a
special directive (.. htmlonly::)
The previous examples work fine in HTML output, however there are some gotchas when using tables in LaTeX: the
column width is hard to determine correctly automatically. For this reason, the following directive exists:
This directive gives a Ccolumn specC for the next table occurring in the source file. It can have values like:
|l|l|l|
which means three left-adjusted (LaTeX syntax). By default, Sphinx uses a table layout with L for every column. This
code:
.. tabularcolumns:: |l|c|p{5cm}|
+--------------+---+-----------+
| simple text | 2 | 3 |
+--------------+---+-----------+
gives
title
simple text 2 3
.. csv-table:: a title
:header: "name", "firstname", "age"
:widths: 20, 20, 10
"Smith", "John", 40
"Smith", "John, Junior", 20
Sooner or later you will want to structure your project documentation by having several RST files. The toctree
directive allows you to insert other files within a RST file. The reason to use this directive is that RST does not have
facilities to interconnect several documents, or split documents into multiple output files. The toctree directive looks
like
.. toctree::
:maxdepth: 2
:numbered:
:titlesonly:
:glob:
:hidden:
intro.rst
chapter1.rst
chapter2.rst
It includes 3 RST files and shows a TOC that includes the title found in the RST documents.
Here are a few notes about the different options
maxdepth is used to indicates the depth of the tree.
numbered adds relevant section numbers.
titlesonly adds only the main title of each document
glob can be used to indicate that * and ? characters are used to indicate patterns.
hidden hides the toctree. It can be used to include files that do not need to be shown (e.g. a bibliography).
The glob option works as follows:
.. toctree::
:glob:
intro*
recipe/*
*
Note also that the title that appear in the toctree are the files title. You may want to change this behaviour by changing
the toctree as follows:
.. toctree::
:glob:
Include Images
Use:
.. image:: _static/images/logo.png
:width: 200px
:align: center
:height: 100px
:alt: alternate text
to put an image
Include a Figure
.. figure:: _static/images/logo.png
:width: 200px
:align: center
:height: 100px
:alt: alternate text
:figclass: align-center
.. code-block:: python
import image
gives
import image
The option figclass is a CSS class that can be tuned for the final HTML rendering.
Boxes
There are simple directives like seealso that creates nice colored boxes:
See also:
This is a simple seealso note.
created using:
with
Warning: note the space between the directive and the text
generated with:
.. warning:: note the space between the directive and the text
There is another todo directive but requires an extension. See Useful extensions
Topic directive
A Topic directive allows to write a title and a text together within a box similarly to the note directive.
This code:
gives
Subsequent indented lines comprise the body of the topic, and are interpreted as body elements.
Sidebar directive
Sidebar Title
Subsequent indented lines comprise the body of the sidebar, and are interpreted as body elements.
Others
Comments
Comments can be made by adding two dots at the beginning of a line as follows:
.. comments
Substitutions
and to refer to it, use the same syntax as for the internal links: just insert the alias in the text (e.g., Python_, which
appears as Python ).
A second method is as follows:
.. |longtext| replace:: this is a very very long text to include
Field list
Whatever this is handy to create new field and the following text is indented
:Whatever: this is handy to create new field
glossary
.. glossary::
apical
at the top of the plant.
gives
apical at the top of the plant.
index
.. index::
download
hlist directive
.. hlist::
:columns: 3
* first item
* second item
* 3d item
* 4th item
* 5th item
first item
second item
3d item
4th item
5th item
Footnote
For footnotes, use [#name]_ to mark the footnote location, and add the footnote body at the bottom of the document
after a CFootnotesC rubric heading, like so:
.. rubric:: Footnotes
You can also explicitly number the footnotes ([1]_) or use auto-numbered footnotes without names ([#]_). Here is
an example1 .
Citations
Citation references, like [CIT2002] may be defined at the bottom of the page:
.. [CIT2002] A citation
(as often used in journals).
[CIT2002]_
Using this image alias, you can insert it easily in the text |logo|, like this . This is especially useful when dealing
with complicated code. For instance, in order to include 2 images within a table do as follows:
+---------+---------+-----------+
| |logo| | |logo| | |longtext||
+---------+---------+-----------+
this is a longish text to include within a table and which is longer than the width of the column.
Intersphinx
When you create a project, Sphinx generates a file containing an index to all the possible links (title, classes, functions,
...).
You can refer to those index only if Sphinx knowns where to find this index. THis is possible thanks to the intersphinx
option in your configuration file.
For instance, Python provides such a file, by default Sphinx knows about it. The following code can be found at the
end of a typical Sphinx configuration file. Complete it to your needds:
file-wide metadata
some special keywords are recognised. For instance, orphan, nocomments, tocdepth.
An example of rendering is the toctree of top of this page.
orphan
Sometimes, you have an rst file, that is not included in any rst files (when using include for instance). Yet, there are
warnings. If you want to supprresse the warnings, include this code in the file:
:orphan:
metainformation
By default, this markup isn Ct reflected in the output in any way, but you can set the configuration value
show_authors to True to make them produce a paragraph in the output.
contents directives
.. contents::
Useful extensions
In the special file called conf.py, there is a variable called extensions. You can add extension in this variable. For
instance:
extensions = [-
'easydev.copybutton',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.coverage',
'sphinx.ext.graphviz',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.pngmath',
'sphinx.ext.ifconfig',
'matplotlib.sphinxext.only_directives',
'matplotlib.sphinxext.plot_directive',
]
extensions.append('sphinx.ext.pngmath')
In order to include equations or simple Latex code in the text (e.g., ) use the following code:
Warning: The math markup can be used within RST files (to be parsed by Sphinx) but within your pythons
docstring, the slashes need to be escaped ! :math:`\alpha` should therefore be written :math:`\\alpha`
or put an r before the docstring
Note also, that you can easily include more complex mathematical expressions using the math directive:
.. math::
Here is another:
1
offset =
=0
TODO extension
Similarly to the note directive, one can include todo boxes but it requires the sphinx.ext.todo extension to be added in
the conf.py file by adding two lines of code:
extensions.append('sphinx.ext.todo')
todo_include_todos=True
Todo
a todo box
Bibliography
135
FusionPBX Documentation, Release master
136 Bibliography
Index
A
apical, 129
C
contents (directive), 132
H
hlist (directive), 130
S
sectionauthor (directive), 132
137