sundance-communications.com
Posted By: jomaha Voicemail dtmf control tones & fast busy - 12/02/08 06:47 AM
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?
Posted By: mj_wald Re: Voicemail dtmf control tones & fast busy - 12/02/08 08:32 AM
Is D tone defined in tones.h ?
Posted By: mj_wald Re: Voicemail dtmf control tones & fast busy - 12/02/08 08:55 AM
I wonder, never tried

In extension.conf add something like

exten =>D,n,Hangup()
Posted By: jomaha Re: Voicemail dtmf control tones & fast busy - 12/03/08 07:24 AM
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 app_voicemail.so 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).
Posted By: mj_wald Re: Voicemail dtmf control tones & fast busy - 12/05/08 06:16 AM
Ya Toshiba will always give something, The D tone if active. If not, it will just give reorder.
Posted By: jomaha Re: Voicemail dtmf control tones & fast busy - 12/05/08 11:05 AM
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: https://www.voip-info.org/wiki/view/Asterisk-ToshibaStrata

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

callwaitingcallerid=no
threewaycalling=no
transfer=no
usecallerid=no
signalling=fxs_ks
callerid="Voicemail HS trunks" <7000>
context=vm_from_toshiba
group=10
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

[vm_from_toshiba]
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()

[hs-vm-with-dtmf-detect]
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

[hs-vm-meetme]
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()

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

[vm_toshiba_set_mwi]
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!):
#!/bin/bash
# Written by John Harragin, Monroe-Woodbury Central-School-District 845-460-6200 x6265
CONTEXT=$1
VM_EXTEN=$2
NUM_MSG=$3
TMP_CALL_FILE=/tmp/vm/${VM_EXTEN}.call
REAL_CALL_FILE=/var/spool/asterisk/outgoing/${VM_EXTEN}.call
# 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
else
if [ ${NUM_MSG} -le 1 ];then
echo "Channel: Local/${VM_EXTEN}@vm_toshiba_set_mwi
MaxRetries: 4
RetryTime: 90
WaitTime: 30
SET: VM_EXTEN=${VM_EXTEN}
SET: MWI_ON=${NUM_MSG}
Context: vm_toshiba_log_mwi
Extension: s
Priority: 1" > ${TMP_CALL_FILE}
mv ${TMP_CALL_FILE} ${REAL_CALL_FILE}
fi
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.
© Business Phone System Forums