This is an old revision of the document!
Part 1: http://mbrevda.blogspot.com/2008/10/miscellaneouscustom-applicationextensio.html
Part 2: http://mbrevda.blogspot.com/2008/10/miscellaneouscustom-applicationextensio_16.html
Verify the
Custom Applications
and Misc Applications
modules are installed.
When adding custom apps, you can take one of two paths:
/etc/asterisk/extensions_custom.conf
[from-internal-custom]
[from-internal-custom]
The following example creates an extension to play music on hold.
Command Variation | Comment |
---|---|
MusicOnHold() | Play 'default' class of MoH |
MusicOnHold(blues) | Play the 'blues' class of MoH |
MusicOnHold(blues,30) | Play the 'blues' class of MoH for 30 seconds |
First, we need to manually add your new custom context into /etc/asterisk/extensions_custom.conf
. To do that, we use the OS console or SSH into the PBX:
ssh -l root pbx
nano /etc/asterisk/extensions_custom.conf [from-internal-custom] include => play-moh-blues ; play moh class (blues) include => play-moh-latin ; play moh class (latin) ; play-moh-blues,s,1 can be used as a custom application [play-moh-blues] exten => s,1,Answer exten => s,2,MusicOnHold(blues) exten => s,3,Hangup
See
/etc/asterisk/extensions_custom.conf.sample
or Google for ideas:
more /etc/asterisk/extensions_custom.conf.sample
Second, we create a Custom Destination for our custom app to make the context available in other menus.
Admin → Custom Destinations
Field | Context,Extension,Priority |
---|---|
Custom Destination | play-moh-blues,s,1 |
Description | Play MoH - Blues |
Finally, we create a Miscellaneous Application:
Applications → Misc Applications
Description | Number to Dial | Destination |
---|---|---|
Play MoH - Blues | 300 | Custom Destinations (Play MoH - Blues) |
Don't forget to click
Apply
to reload the Asterisk configuration.
The new custom app will now appear on the
Feature Code Admin
page.
Note that if you follow the above procedure, this is not necessary.
There are times when you will want to reserve an extension from FreePBX to prevent FreePBX from duplicating an extension that you already assigned manually. For that, we use the Custom Extension
module:
Admin → Custom Extensions
Field | Content |
---|---|
Custom Extension | Extension number to reserve |
Description | Description of extension number |
Notes |
If you need to play custom sounds or greetings, you need to record them first:
Admin → System Recordings
Recorded announcements are stored here:
/var/lib/asterisk/sounds/custom/
and can be referenced in custom apps like this:
./custom/announcement-name.wav