sprg.net .:. Michael Sprague of Asheville, North Carolina

January 22, 2006

Asterisk Phone System

Filed under: technology — michael @ 4:47 pm

These are the basics of my Asterisk PBX setup on Debian. I added an X10 interface so that motion sensors in the house could trigger Asterisk to make calls. It has the ability to automatically notify me when I walk in the door if there is new voicemail waiting. But, the reason I went down this road to begin with is that I can use my broadband Internet connection to make long distance phone calls anywhere in the continental US for 1.3 cents per minute.


Software

Hardware

  • Micron Transport XPE
    Pentium 133MMX with 64MB RAM
    This is my Asterisk box. My parents bought this laptop for me in 1997. It handles the calls fine as long as there isn’t transcoding necessary.
  • X10 Wireless Motion Sensor (MS13A)
  • X10 Transceiver (RR501)
    Out of production but similar to TM751
  • X10 Computer Interface (CM11A)
  • Sipura SPA-3000
    ATA and PSTN gateway to provide one FXS port and one FXO port to Asterisk.
    Purchased from Voxilla.com
    Interfaces standard phones and fax machine to Asterisk.
    Interfaces Asterisk to PSTN local line.
    I was having problems getting the SPA-3000 to do what I wanted until I found the Voxilla SPA-3000 Configuration Wizard for Asterisk. After running through that and uploading the config file to the SPA-3000 it did exactly what I wanted it to.

SJphone is running on my Dell Axim X50v which I can leave cradled in the living room more often now that I have a Nextel i930 Smartphone (Thanks Jon!). The Axim stays on the Wifi network connected to Asterisk with SJphone. I have SJphone set to auto-answer. When I walk in the front door the MS13A motion sensor detects me and sends a signal to the RR501 which relays it to the CM11A. Xtend then picks up that motion was detected and copies the call file to the Asterisk outgoing spool directory. The call file tells asterisk to connect two extensions together, one is the Axim and the other is the Asterisk voicemail already logged in to the correct voicemail box. So, I walk in and my X50v says, “You have 2 new messages, press 1…” It works pretty slick. Ideally the voicemail would go right into the mode of playing the first message automatically, but it doesn’t look like the option exists for that by default and I haven’t gotten around to adding it in yet.

The NOC
The Network Operations Center

Pertinent config file excerpts:

#
#voicemail.call
#
Channel: Local/752@home

MaxRetries: 2
RetryTime: 60
WaitTime: 30

Context: home
Extension: 751
Priority: 1

;
; extensions.conf
;
; this is the extension that 752 gets connected to
exten => 751,1,GotoIf($[${VMCOUNT(17)} > 0]?102)
exten => 751,2,Hangup
exten => 751,102,Wait(5)
exten => 751,103,VoiceMailMain,s17

; this is the called extension for auto-dial out
exten => 752,1,GotoIf($[${VMCOUNT(17)} > 0]?102)
exten => 752,2,Answer
exten => 752,3,Wait(1)
exten => 752,4,Hangup
exten => 752,102,Dial(SIP/msprague)  ; X50v
exten => 752,103,Hangup

Leave a Reply