After scouring for someone else's working setup and finding nothing, I've put together a system that works for me on our Panasonic 1232. The only integration so far is for voicemail, as the system has its own T1 for inbound/outbound calling (we're a phone company, so we have as much as we need).

I had a bunch of SPA-3000's slated for installation elsewhere on our network, so I thought I'd give them a try first, as opposed to playing with a Zaptel card. So the first part involves configuring Asterisk to work with the SPA3K. The second part (the simplest part) was configuring the extensions file to work with the Panasonic's default VM integration features.

SPA-3000 as POTS to VoIP Gateway

There are two or three ways of doing this, which I found here on voip-info. This is a modification of those, which works beautifully.

SPA 3000 configuration (all on the PSTN Line page):
Port: 5060 .....(don't forget to change Line 1's port to 5061 or so)
Auth Resync-Reboot: no ......(I don't think this matters)
Proxy: ip.of.asterisk
Register: yes
Make Call Without Reg: no
Ans Call Without Reg: no

Display Name: VmailFXO ......(doesn't matter)
UserID: vmail ....(your choice)
Password: vpass ....(again, your choice(s) here)

VoIP-To-PSTN Gateway Enable: yes
VoIP Caller Auth Method: none
One Stage Dialing: yes
Line 1 VoIP Caller DP: 1
VoIP Caller Default DP: 1
Line 1 Fallback DP: none
VoIP Access List: ip.of.asterisk.server

PSTN-To-VoIP Gateway Enable: no
PSTN Ring Thru Line 1: yes
PSTN CID for VoIP CID: yes ......(although we don't get CID at the extensions)

PSTN Answer Delay: 1 .....(Setting it to 0 broke the digit detection in Asterisk from the PBX)
PSTN Ring Thru Delay: 0 .....(I had this also set to 1 and things worked fine)

This part is important in getting the SPA 3000 to disconnect when someone hangs up. Our 1232 doesn't play the standard fast busy or offhook tone. It plays the dialtone sounds at the speed of a busy tone, so the SPA would just sit there. I basically took the tone generation settings (xxx@-dB,xxx@-dB) from the dialtone noise found on the Regional tab and mixed it with the timing settings that were already in the Disconnect Tone field.

Detect Polarity Reversal: no
Detect PSTN Long Silence: no
Detect Disconnect Tone: yes
Disconnect Tone: 350@-19,440@-19;4(.25/.25/1+2)

And at the very bottom under International Settings:

Line in use Voltage: 20

Note: A standard phone line puts out around -48v. The SPA-3000 detects that a line is in use if the voltage drops below 30 (default setting). However, our Panasonic only puts out -27v on the analog line (viewable from the Info page). The SPA always thought the line was busy and wasn't allowing me to make or receive calls. Dropped the in-use voltage to 20 (something less than the on-hook voltage) and it worked.

The only thing left to change is on the User 1 page:

Cfwd All Dest: s@ip.of.aster.isk:5060

You're done with the Sipura.

Now, on to Asterisk.

Asterisk as VPS for Panasonic 1232


; the context needs to match the one you program in extensions.conf
; make sure your port matches that used by the SPA3000 PSTN Line
; As well as your username and password



; this is used with the message waiting indicator script

exten => s,1,Answer
exten => s,2,Wait(2)
exten => s,3,Hangup


exten => s,1,Answer
exten => s,2,ResponseTimeout(2)
exten => s,3,Background(beep)

; Wait long enough for the Panasonic to play DTMF tones. If nothing,
; send the user to the VM login

exten => t,1,goto(#6,1)

; this extension shares VM with another one (the boss has two phones)
haven't actually tested it to see if it works though (
exten => 110,1,Goto(101)

; The default for the Panasonic is to 'play' the extension number (DTMF tones) when someone
; is leaving a voice message, and to play * and the extension when the user is retrieving voice
; messages with the Message button. It will play #6 for the generic VM access, and #9 when it
; the caller has disconnected

; Our extensions are three digit extensions; change to match yours
; the optional 's' in front of the 'u' tells Asterisk's VM to not play instructions,
; but just play a beep after the users's message

exten => _XXX,1,Voicemail(su${EXTEN})
exten => _XXX,2,Hangup

exten => _*XXX,1,VoicemailMain(${EXTEN})
exten => _*XXX,2,Hangup

exten => #6,1,VoicemailMain
exten => #6,2,Hangup

exten => #9,1,Hangup

Message Waiting Indicator Script
To turn on the MESSAGE light on the phone (ours are KX-T7433's),
you need to specify an external notify application in your voicemail.conf:


And then put this Perl script in /usr/local/bin (or wherever you like). Don't forget chmod a+rx!

  1. !/usr/bin/perl

my ($context,$ext,$msgs,@junk) = @ARGV;

my $callpath = "/var/spool/asterisk/outgoing";

my $callfile = "$callpath/mwi-" . time();

# '@default' is added by the voicemail app; we don't want it

$ext =~ s/\@default//;

# 701 and 700 are the Panasonic codes used to turn on/off
# the message waiting indicator on our system; they are followed
# by the extension you want to 'ignite.'

if ($msgs > 0) {
$channel = "SIP/vmail1/701$ext";
} else {
$channel = "SIP/vmail1/700$ext";

print STDERR "channel: $channel\n";

open (CALLFILE,">$callfile");

print CALLFILE qq(
Channel: $channel
MaxRetries: 2
RetryTime: 10
Context: vmail-mwi
Extension: s
Priority: 1


Panasonic Configuration

You really should know how to configure this thing. Note that this is for our 1232. You may have some other customization done to yours. Likewise, this may work with other PBX or KEY systems that support DTMF VM integration.

Connect the SPA's LINE port to the 2nd part of a jack from your extension line card unit. The first part of the jack is digital, the second is an analog port. We're using the Panasonic as the PSTN provider for the SPA3000.

Assign the 2nd part of the jack to a VM hunt group (see the Panasonic docs). In my case, we also have an extension number assigned to it, so I can dial the SPA3000 from any of the phones. For testing from my handset, I set the FWD/DND option 5 (Busy/No Answer) to forward to the SPA's extension. Voila! If I don't answer after four rings, it transfers to the SPA 3000, which sends the call to Asterisk. Asterisk handles the call as usual; I don't need to go into all the things you could do besides just voice mail. Needless to say, once someone leaves a message, externnotify turns on the MWI light. Pushing the message button dials the SPA 3000, dumps me into Asterisk, and I can retrieve my voice mail.

Not too bad for a day's work!

[Added 27 May 2007]

This worked flawlessly until somebody failed repeatedly to check their voicemail. Unfortunately, what was undone for one was undone for all. Not too big of a deal now, since we just recently completed our migration off the 1232 to an Asterisk/Aastra solution (Asterisk 1.2.15 at present with Aastra 480i and 57i phones). I still hope this is useful to anyone else with Panasonic key systems.
Created by: SirBryan, Last modification: Wed 28 of Mar, 2007 (04:55 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+