Phone Systems

AtcomCloud Online Store
Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jul 2006
Posts: 16
jomaha Offline OP
OP Offline
Joined: Jul 2006
Posts: 16
I just had an old voicemail system conk out & am now routing the voicemail ports on a DK424 into fxo ports on an Asterisk system. All calls routed to vm are fowarded from stations on the dk424 and originate on other stations or enter the 424 though a T1.

Asterisk does not listen for D,A & B tones. I have turned PGM31 led 19 & 20 off, but when I turn off led 15 I am getting recordings of the fast-busy-tone (which I assume is referred to as Auto Release) When I leave 15 on, I get occational blank messages - probably due to asterisk-voicemail's silence detection being misled by the D tone.

Is there a way to make the toshiba not generate an auto-release tone and not send extra dtmf tones when the voicemail leaver ends the call (note that no calls are from loop start trunks - so no help with PGM15)?

...or best have the Toshiba's voicemail fxs port simply hangup at the end of the call?

Atcom VoIP Demo
VoIP Demo
Joined: Jun 2007
Posts: 627
Joined: Jun 2007
Posts: 627
Is D tone defined in tones.h ?

Joined: Jun 2007
Posts: 627
Joined: Jun 2007
Posts: 627
I wonder, never tried

In extension.conf add something like

exten =>D,n,Hangup()

Joined: Jul 2006
Posts: 16
jomaha Offline OP
OP Offline
Joined: Jul 2006
Posts: 16
I see your talking Asterisk. Indeed,
exten =>D,n,Hangup()
works. In fact I'm doing something similar to catch hangups before the call is bridged to the voicemail application. The problem is when the call is bridged (in asterisk) to there are 2 pointers passed to the recording function,
char *acceptdtmf = "#";
char *canceldtmf = "";

I could simply change the # to D, however this machine does much more than be a Toshiba Voicemail system so I am working on a patch to have the vm-app accept an extra option (without rewriting the whole program). This is still not going to be a perfect solution as those 2 parameters are not perfect matches to the dtmf A & D functionality.

At any rate, the best solution would be to have the toshiba hang up without sending tones of any type when the call terminates. And for the purposes of this discussion, I am regading it as a Toshiba question (I'll share the patch and voicemail contexts - but should get it working first).

Joined: Jun 2007
Posts: 627
Joined: Jun 2007
Posts: 627
Ya Toshiba will always give something, The D tone if active. If not, it will just give reorder.

Joined: Jul 2006
Posts: 16
jomaha Offline OP
OP Offline
Joined: Jul 2006
Posts: 16
Yahoo! I came up with an asterisk solution. Turn on LEDs 15,19 & 20 in PGM31 on the Toshiba. I'll post my initial setup here - but it will probably be tweaked and I'll post that at:

Anyway, by passing the audio through Asterisk's MeetMe application, it can be made to listen for any dtmf tone. This setup currently 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 going far beyond typical voicemail integration (that is the nature of Asterisk).
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) Asterisk is extremely flexible so regard this as a rough guide.


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)=200)
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,noop() ;;;;Playback(MW_temp_voicemail_trouble)
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:2}@hs-vm-meetme 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: Local/${VM_EXTEN}@vm_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.

Moderated by  Carlos#1, phonemeister 

Link Copied to Clipboard
Forum Statistics
Most Online5,661
May 23rd, 2018
Popular Topics(Views)
Today's Birthdays
OBTW, warged
Newest Members
Dialtony, FatherLot, RFarrarMD, WTCI, Sundance Nailor
49,601 Registered Users
Top Posters(30 Days)
Toner 11
dexman 11
Yoda 10
Who's Online Now
1 members (Yoda), 32 guests, and 15 robots.
Key: Admin, Global Mod, Mod
Contact Us | Sponsored by Atcom: Best VoIP Phones | Terms of Service

Sundance Communications is not affiliated with any of the above manufacturers.
©Copyright Sundance Communications 1998-2022
Powered by UBB.threads™ PHP Forum Software 7.7.5