Asterisk Dialplan Module – stdexten

Very similar to the stock version of standard extension in extensions.conf on Asterisk 11 with some minor customizations to the variables passed to it. Technically, this is not what I’m calling a “module” (which is actually a subroutine), this is just an example of the stdexten context which some may find useful.

In my scenario, under no circumstances would there be any reason to have to change the voicemail context, so the arguments that get passed are: The devices to ring, the timeout period (how long to ring the extension), and the destination voicemail box. If neither of the second and third arguments are passed, then it assumes a timeout period of 25 milliseconds and the extension passed in argument one as the voicemail box.
Continue reading “Asterisk Dialplan Module – stdexten”

Asterisk – Modular Dialplan

This is just a table of contents of the various Asterisk dialplan modules I have created over the last couple of years and am releasing to the general public as open-source in hopes that somebody finds them as useful as I do.

In my days as a Network Administrator managing six interconnected, fully-meshed branch office PBX’s at a telemarketing firm, maintaining six separate dialplans became a tiresome effort which ultimately led to my creation of the dialplan modules.
Continue reading “Asterisk – Modular Dialplan”

Carrier Access Adit 600 – Reset to Factory Defaults

Carrier Access Adit 600
Carrier Access Adit 600

Today I ran into a password issue on a refurbished piece of telco equipment that I got for a great price at refurbphoneexchange.com, the Carrier Access Adit 600.

Just a little background info, these units are great for converting a couple of T1s from a Sangoma or Digium card in an Asterisk server for up to 48 FXS ports and are very solid performance wise. When compared to a Rhino box or other similar device that provide the same functionality, it’s like 1/5th of the cost. As far as I know, the only downside is that they are out of production and there is a limited number of units out there. Also, I haven’t been able to find any firmware updates anywhere for these units on the interweb. The company has been bought and sold so many times it is hard to keep track of who to call for support. It was Dell Force 10 Networks but now the current company that owns rights to the product is Telmar but I’m still having trouble finding answers to my questions.
Continue reading “Carrier Access Adit 600 – Reset to Factory Defaults”

Bash Script – Move Asterisk Call Files into Spool Directory

After running into permission issues trying to get PHP’s shell_exec command to chown call files as the asterisk user(which only root can do), I decided to make this script.

As a side note, you should be able to get the shell_exec command to work using sudo by adding the www-data user to the sudoer’s file without a password but that wouldn’t work in my particular environment. The server I was working on was extremely outdated and didn’t even have sudo installed.

Add this to /etc/sudoers
www-data ALL=NOPASSWD: /path/to/script

The following code runs the script as a daemon. You will need to update rc to start this script at default run levels and also make sure to chmod +x this file to make it executable.

filename: /etc/init.d/mvcallfile

#!/bin/bash
# Move asterisk call file daemon startup script
# Author: Nathan Thomas

PROG=mvcallfile
 Continue reading "Bash Script – Move Asterisk Call Files into Spool Directory"