Asterisk - Toshiba Strata

My situation:

Toshiba Strata DK424
Two buildings side by side, linked with an underground 12 pair fiber. We've got Strata cabinets in both buildings linked through fiber (ROMS1A cards?).
About 140 phones, which we want to keep using About 7 faxes and a couple of analog lines (telemetry, modems, and such).
We currently have Centrex lines but are going to migrate to T1 at the same time as we're installing Asterisk.
I have a spare RDTU card in the Strata.

My (proposed) Bill of Materials :

- Two Asterisk servers (one per building)
- Server 1 (building where the PBX is) : Digium TE411P and TDM104B (4 faxes in building 1)
- Server 2 : 2 x Digium TDM104B (3 faxes + a bunch of modems and telemetry lines)
- Adit 600 Chassis (not too clear on what I need to put in this)
- Dual T1 Controller Card
- 3 x FXO/DPT 8-Channel Voice Service Card -> this would allow for 24 simultaneous communications between Toshiba users and the Asterisk box, right? I would need to have the corresponding number of RCOU ports in the Strata?
- some SIP phones for new users (Aastra 9133i look nice)

Brian Roy gave me the following info:

I do indeed have a Toshiba 424 like yours and have it integrated with Asterisk. I have a couple different integrations.

On the asterisk box I have the following.

1 - TE410 card with quad T1's.

Interface 1 connected to the Toshiba with E&M to a RDTU card on the Toshiba Interface 2 connected to 24 ports ADIT600 fxo channels. These channels are then tied into the toshiba analog extensions Interface 3 connected to 24 ports of ADIT600 fxs channels. This is to provide FXS (modem, fax, dialup, etc) throughout our building.
Interface 4 connected to one of our 4 dedicated long distance T1's with Qwest. (The other 3 are connected through the Toshiba)

The biggest challenge that I have had with the Toshiba -> asterisk integration is the Toshiba's inability to do unsupervised trunk to trunk transfers. That means if the call originates from the Toshiba, you are unable to "transfer" it over to the Asterisk box via an E&M T1 circuit. The other way around is no problem.

In your case, if you are adding voicemail, you will probable want to look at an Adit 600 like I use. It would interface to analog extensions on your Toshiba and the Adit would convert it to Digital on the Asterisk via a Digium card. TE100 should work for this.

One of the toughest things for you will be the disconnect supervision.
The Toshiba doesn't send a standard disconnect. It has a proprietary DTMF disconnect that it sends the Strata voicemail systems, but I'm not sure what tone it is. It's on my to-do list to figure out.
Otherwise you are going to have to use busy supervision in Asterisk which will leave several seconds of Congestion on the back of every voicemail.

This may help for the above issue... Allow the dtmf 'D' tone sent by a Toshiba DK424. Turn on LEDs 15, 19 & 20 in program-31 for the toshiba's voicemail ports.
By passing the audio through Asterisk's MeetMe application, it can be made to listen for any dtmf tone. This setup defined here just hangs-up when a 'A', 'B' or 'D' tone arrives but minor modifications (see the 'exten => _[ABD#],1,Hangup()' line) opens up the possibility of more full featured voicemail integration.
Now a couple of notes:
1) Voicmail ports arriving into asterisk are all two digits. You may have to make modifications to use this. They arrive in the vm_from_toshiba context (as defined in zapata.conf).
2) All of my Toshiba extension are in the form 7XXX
3) Regard this as a rough guide - but these snips work in my configuration.


In Zapata.conf

callerid="Voicemail HS trunks" <7000>
channel => 49-56 ; These are the two digit ports mentioned above. The digit number is important where the ${CHANNEL} variable is referenced.


These contexts are defined in extensions.conf

exten => s,1,NoCDR()
exten => s,n,wait(.5)
exten => s,n,answer
exten => s,n,SET(TIMEOUT(absolute)=1800)
exten => s,n,SET(TIMEOUT(digit)=1.5)
exten => s,n,SET(TIMEOUT(response)=7)
exten => s,n,waitexten(3)
exten => s,n,VoicemailMain()
exten => s,n,hangup
exten => _X.,1,noop(Dialed extension is ${EXTEN})
exten => _X.,n,Gotoif($["${EXTEN:-1}" = "D"]?terminated) ;;Checkout Toshiba seems to be sending a terminator 'D' There may have been a hangup before the whole dtmf string was transmitted.
exten => _X.,n,System(/root/toshiba_error_finder ${EXTEN} &) ;;; This calls a little debugging script - comment it out
exten => _X.,n,Voicemail(9999,u) ;;; There is a mistake on the toshiba forwarding string, let the caller tell me who they were trying to call - comment it out.
exten => _X.,n,wait(1.5)
exten => _X.,n(hu),hangup
exten => _X.,n(terminated),NoCDR()
exten => _X.,n,Voicemail(9999,u)
exten => _X.,n,hangup
exten => _917XXX,1,SET(TIMEOUT(absolute)=300) ;;; max msg 5 min - adjust as needed
exten => _917XXX,n,Goto(hs-vm-with-dtmf-detect,${EXTEN:2},1)
exten => _917XXX,n,Hangup()
exten => _91XXXX,1,System(touch /tmp/vm/old_ext/${EXTEN:2}) ;;;; This is for debuging too
exten => _91XXXX,n,Hangup()
exten => _927XXX,1,VoicemailMain(${EXTEN:2}|s))
exten => _927XXX,n,Hangup()
exten => _92XXXX,1,System(touch /tmp/vm/92/${EXTEN})
exten => _92XXXX,n,Hangup()
exten => T,1,Hangup()

exten => _7XXX,1,System(asterisk -rx "originate Local/${CHANNEL:4:[email protected] application voicemail \\"${EXTEN}|su\\"")
exten => _7XXX,n,MeetMe(vmd${CHANNEL:4:2},AdFpqXx) ;Meetme mail boxes defined for zap channels 49-56
exten => _7XXX,n,Hangup()
exten => _[ABD#],1,Hangup()
exten => h,1,MeetMeAdmin(vmd${CHANNEL:4:2},K) ;Kick all users out of conference

exten => _X.,1,NoCDR()
exten => _X.,n,Wait(.3) ; give hs-vm-with-dtmf-detect time to create meetme
exten => _X.,n,MeetMe(vmd${EXTEN},q)
exten => _X.,n,Hangup()

exten => s,1,wait(1.5)
exten => s,n,hangup

exten => _7XXX,1,Gotoif(${MWI_ON}?on)
exten => _7XXX,n(off),Dial(Zap/52/!#64${EXTEN}|30)
exten => _7XXX,n,wait(1)
exten => _7XXX,n,hangup()
exten => _7XXX,n(on),Dial(Zap/52/!#63${EXTEN}|30)
exten => _7XXX,n,wait(1)
exten => _7XXX,n,hangup()
exten => _x.,1,wait(1)
exten => _x.,n,hangup()


In Voicemail.conf:
externnotify = /usr/local/bin/toshiba_notify


Finally here is the bash script referenced in externalnotify, toshiba_notify (READ THE COMMENTS!):
# Written by John Harragin, Monroe-Woodbury Central-School-District 845-460-6200 x6265
# I only want to send notification to phones hosted on the toshiba - not SIP phones.
# if you use this script, I suggest geting rid of the next 4 lines and the fi on the last line - or modify to you needs.
if [ $(grep -E "\[${VM_EXTEN}\]" /etc/asterisk/sip_phones/ConsolidatedSip-70.conf) ] && [ ${CONTEXT} != "default" ];then
echo $(grep -E "\[${VM_EXTEN}\]" /etc/asterisk/sip_phones/ConsolidatedSip-70.conf)
echo "$(date) context=${CONTEXT} VM_EXTEN=${VM_EXTEN} NUM_MSG=${NUM_MSG} - not a HS ext, ignoring." >> /var/log/asterisk/toshiba_vm.log
if [ ${NUM_MSG} -le 1 ];then
echo "Channel: [email protected]_toshiba_set_mwi
MaxRetries: 4
RetryTime: 90
WaitTime: 30
Context: vm_toshiba_log_mwi
Extension: s
Priority: 1" > ${TMP_CALL_FILE}
echo "$(date) context=${CONTEXT} VM_EXTEN=${VM_EXTEN} NUM_MSG=${NUM_MSG}" >> /var/log/asterisk/toshiba_vm.log
fi # This is the line to delete if you read the upper comment.

this would be my setup:

Port 1: PRI line from telco
Port 2: RDTU card in Toshiba
Port 3: Adit -> FXO/DPT 8-Channel Voice Service Card -> patch pannel -> Toshiba analog ports (RCOU)?

Could I leave my existing faxes and analog lines as-is in the Strata and have them go out through the RDTU?

I wonder if Brian solved the disconnect supervision problem.

Also, will paging (from the Asterisk) and caller ID function (Toshiba-Toshiba, SIP phone-Toshiba, Toshiba-SIP phone, Telco-Toshiba) work with this setup?

I received (contradictory?) information from Daniel Burget:

I currently have asterisk connected to the a 4 port T1 card. The Voice T1 line goes into asterisk, then a T1 cross connect cable connected to asterisk and the Toshiba CTX. I only have 3 phones, and 7 analog lines connected to the Toshiba, the rest are Polycom IP 500 phones connected to asterisk.

This would indicate that Asterisk-Toshiba integration is possible using only a T1 line.

(Edit by Phil Ciccone) Daniel Burget was nice enough to comment to me on how the cross-over cable T1 integration works. This method seems cleaner to install. Below are his comments:

Yes, you are correct. I have the T1 line from the Strata plugged into the T1 card on the asterisk system with a T1 crossover cable. Then in Zapata.conf I added the following lines for this connection.

channel => 25-47

Channels 1-24 are my phone company T1, 25-47 go to the Strata. In my Zaptel.conf I have


If you make a correct crossover cable, the light should be green on your asterisk T1 card. Then to call from Asterisk to the Strata I use the following in my extensions.conf (assuming number 6050)

Exten => 6050,1,Dial(ZAP/g1/${EXTEN})

This will move the call to the Strata. If the strata was the only t1 line, you would use channel 1-23 and ZAP/g0 and span=1,1,0,esf,b8zs with 24 as the dchan.

When 6050 is dialed, the strata thinks it is an incoming call from the phone company. You would of course need an extension 6050 in CTX winadmin, and the strata would ring the phone associated with it.

The Strata thinks it is talking to the phone company, the Asterisk box is completely transparent. As to calls from the Strata, you would need to match those in your asterisk dial plan.

I.E. If you dial 96018 from the strata, you would need an Exten => 6018,1,Dial(SIP/6018,15)
In this example you would be calling a SIP phone connected to asterisk.

The 9 assumes you need to dial a 9 to get out of the Strata.

Now going back to my system having the Real phone T1 connected at ZAP/g0 , I used ctx-out as the context, if I wanted to call someone outside the company from the strata I would need something like this in my extensions.conf


;check for internal extension

Include => from-internal

;call outside

Exten => XXXXXX.,1,Dial(ZAP/g0/${EXTEN})
Exten => XXXXXX.,2,Congestion

This would place the call out, and phones connected to the Strata would call out as though it was connected to the phone company.

(Edit by Joel Maslak)

I was able to interface a Toshiba DK system, with only analog lines, as a box to manage voicemail and a few SIP phones. As others have done, I interfaced the 8 analog "extension" ports on the Toshiba to the Asterisk box, and configured the Asterisk box as a VM system in the Toshiba (A/D tones, etc). Disconnect supervision isn't easy with this.

A constant challenge was muting the "A" tones (I'm only moderately successful here) and disconnecting on the "D" tones. With Asterisk 1.6, I was able to do this without any meeting rooms.

First, I configured two custom features, in features.conf:

toshibahangup => D,self,Hangup
toshibaanswer => A,peer/callee,Noop

However, to use these features (DTMF D to disconnect, A just to do nothing but mute the tones a bit), you need two pieces. First, you need an entry on the dialplan like:

exten => _XXX,n,Set(__DYNAMIC_FEATURES=toshibahangup#toshibaanswer)

You need an entry like that anytime a call is received from the Toshiba or you dial out to the Toshiba. This tells the bridged channels (that's the second gotcha - but we'll get there) to listen for the A and D tones.

Now, the second gotcha - the A/D tones won't do anything on a non-bridged channel (such as a channel that is ringing an extension or a channel connected to voicemail). So we have to get Asterisk to immediately bridge all channels. We do this with a DAHDI "loop back" E1. Basically, this is a fake E1 that connects calls from one side of the E1 to the other. To do this, I use the following /etc/dahdi/system.conf:





The fxsks simply sets up my 8 analog ports. The "dynamic" lines are where the action starts. Using a dynamic, "local" interface, I connect channels 0-31 on Span 0 to ports 0-31 on Span 2. The 32 channels make it an E1 - overkill for my application, but it works fine. I then configure the B channels in the same position (remember the 8 analog ports in my system shift all the E1 channel numbers up by 8). This configures this as basically a two-port E1 card with an E1 crossover cable between the ports.

My chan_dahdi.conf:

; Pseudo E1 - Direction 1 (Towards Asterisk)
usecallerid = yes
echocancel = no
echocancelwhenbridged = no
rxgain = 0.0
txgain = 0.0
channel => 9-23,25-39

; Pseudo E1 - Direction 2 (Towards PTSN)
usecallerid = yes
echocancel = no
echocancelwhenbridged = no
rxgain = 0.0
txgain = 0.0
channel => 40-54,56-70

Basically, this sets up span 0 as the network side, span 1 as the CPE side. One side has a context of "inbound", the other "outbound", for incoming calls.

Now, when I get a call from the Toshiba, I answer the ringing immediately in my dialplan, set the dynamic features (toshibaanswer/toshibahangup), and listen for the _91XXX/_92XXX digits as described above. Once I get the digits, however, everything is different. Once I have the digits, I dial out of DAHDI/g4, dialing the number provided to me by the Toshiba, which causes a line in DAHDI/g3 to ring. That goes into the "inbound" context, which also immediately answers and then sends the call to the proper place. The key is that once there is an "answered" call that goes between the Toshiba POTS lines and the fake E1 line, Asterisk must bridge, and thus can respond to the DTMF A/D tones.

Outbound calls work similarly, I dial out of DAHDI/g3 which causes DAHDI/g4 to ring in the "outbound" context. There, immediately dial whatever number was "called" in this context, but on DAHDI/g1 (my POTS lines).

Nobody said this was easy. :)

One other note: I've observed my Toshiba system sending 1 or 2 leading and/or trailing DTMF characters when transferring a call into voicemail. I specifically look for these and strip them. So, for instance, I might receive DTMF of #92200## rather than the expected 92200. But I treat both identically.

Coming soon: How to configure Toshiba Strata CTX670 and Asterisk (currently [email protected]) to work with each other properly.
This is being used as a placeholder.

Note: If all seems well with a PRI between Asterisk and a Toshiba Strata PBX for outbound calls, but inbound calls to the Strata doesn't return Call Progress, try setting callerid name to be blank ala:

exten => _X.,1,Set(CALLERID(name)=)

Created by: dminstrel, Last modification: Mon 11 of Jun, 2012 (03:36 UTC) by admin
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+