Two extensions with same mailbox

You can “link” two mailboxes which reside on the same server by creating a symlink between them.

For example, create two extensions each with mailboxes (extension 1000 and 2000). Dial *1000, wait for the voicemail greeting to start and then hangup. Do the same thing for extension 2000 (dial *2000). This will initialize the two mailboxes. Then from the shell, navigate to:


You will see a folder for named “1000” and one named “2000”. Delete one of them:

rm -rf 2000

Create a symlink from 2000 to 1000:

ln -s 1000 2000

That’s it! Any voicemail left in either mailbox will be available through either mailbox. MWI will also be reflected on both extensions.

MariaDB add new user

[user@hostname] # mysql
MariaDB [(none)]>CREATE USER 'user1'@localhost IDENTIFIED BY 'password1';
MariaDB [(none)]>SELECT User FROM mysql.user;
MariaDB [(none)]>GRANT ALL PRIVILEGES ON *.* TO 'user1'@localhost IDENTIFIED BY 'password1';
MariaDB [(none)]>GRANT ALL PRIVILEGES ON 'yourDB'.* TO 'user1'@localhost;
MariaDB [(none)]>SHOW GRANTS FOR 'user1'@localhost;

Linksys/Cisco SPA3102 with Freepbx & BT

This guide works great, with the one amendment; PJSIP Registration should be set to “none”.

Critical config info is as follows:

SPA-3102 Configuration

Admin login > Advanced > Voice > PSTN Line:

  • Line Enable: Yes
  • SIP Transport: UDP
  • SIP Port: 5060
  • SIP Remote-Party-ID: Yes
  • Auth Invite: Yes
  • Proxy: [set to FreePBX IP]
  • Register: No
  • User ID: pstn_fxo
  • Auth ID: pstn_fxo
  • Use Auth ID: Yes
  • Password: password
  • Line 1 VoIP Caller DP: None
  • PSTN Caller Default DP: 1
  • Dial Plan 1: (S0<:pstn_fxo@>)
    Including brackets – and where is your FreePBX IP

FreePBX Configuration

Create a new PJSIP Trunk

  • Trunk Name: <My DID>
  • Outbound Caller ID: <My DID>
  • Maximum Channels: 1
  • Username:  <My DID>
  • Password: password
  • Authentication: Outbound
  • Registration: Send
  • SIP Server: [set to IP address of SPA-3102]
  • SIP Server Port: 5060
  • Context: from-pstn
  • Contact User:  <My DID>  (thanks to Aly)

Inbound Route

  • Set up a default route with Destination as a Ring Group

Outbound Route

  • Route Name: POTS Outgoing
  • Route CID: <My DID>
  • Trunk Sequence for Matched Routes:  <My DID>

More notes:

Asterisk Remove Sipgate Alphanumeric ID Extension

Sipgate provide SIP account numbers with alphanumeric sub-accounts. The sub-account extension needs to be removed in order for FreePBX to generate the trunks inbound route.

The following has been added to extensions_custom.conf

exten => _.,1,Noop(Remove Sipgate Extra Digits)
exten => _.,n,Goto(from-trunk,${EXTEN:0:7},1)

and the following added to the trunks PEER Details


FreePBX Error “Can Not Connect to Asterisk”

I’ve been getting an error when trying to administer Asterisk through FreePBX. Asterisk logfiles would only indicate that there was an authentication error every time I loaded the FreePBX GUI. This has prompted me to want to change the password used by FreePBX when communicating with the AMI. After trawling through many many .conf files, I discovered FreePBX in my case was getting the AMI credentials from the Asterisk MariaDB table shown below.

I had to install HeidiSQL on my windows desktop, and make changes to the database permissions to allow connections from my local subnet.

mysql asterisk


After this, I could login, but not update settings. To resolve run


Which returns

Exception: Unable to locate the FreePBX BMO Class 'Sipsettings'A required module might be disabled or uninstalled. Recommended steps (run from the CLI): 1) fwconsole ma install sipsettings 2) fwconsole ma enable sipsettings in file /var/www/html/admin/libraries/BMO/Self_Helper.class.php on line 216
Stack trace:
1. Exception->() /var/www/html/admin/libraries/BMO/Self_Helper.class.php:216
2. FreePBX\Self_Helper->loadObject() /var/www/html/admin/libraries/BMO/Self_Helper.class.php:104
3. FreePBX\Self_Helper->autoLoad() /var/www/html/admin/libraries/BMO/Self_Helper.class.php:37
4. FreePBX\Self_Helper->__get() /var/www/html/admin/modules/core/
5. FreePBX\modules\Core\Drivers\PJSip->generateEndpoints() /var/www/html/admin/modules/core/
6. FreePBX\modules\Core\Drivers\PJSip->genConfig() /var/www/html/admin/modules/core/Core.class.php:204
7. FreePBX\modules\Core->genConfig() /var/www/html/admin/libraries/BMO/FileHooks.class.php:97
8. FreePBX\FileHooks->processNewHooks() /var/www/html/admin/libraries/BMO/FileHooks.class.php:26
9. FreePBX\FileHooks->processFileHooks() /var/lib/asterisk/bin/retrieve_conf:892

fwconsole ma install sipsettings
fwconsole ma enable sipsettings in file /var/www/html/admin/libraries/BMO/Self_Helper.class.php on line 216

And the dashboard works!
…still getting errors when trying to reload config.

chkconfig asterisk off
fwconsole start

FreePBX settings for Draytel

Its taken a few hours work, but the below settings seem to work for incoming calls on Draytel to my Asterisk installation




These are loosely based on the settings described here: