wardmundy
Nerd Uno
- Joined
- Oct 12, 2007
- Messages
- 19,168
- Reaction score
- 5,199
We finally have gotten the kinks out of ODBC for Asterisk and the speed dialer. A new version 3 release will be available later today or tomorrow. In the meantime, you can bring your system current by logging out and back in as root. One change cannot be automated easily for existing installs. If you want support for the 000 Speed Dialer which lets you dial 000+ a 3-digit AsteriDex dialcode, then edit /etc/asterisk/extensions_custom.conf and find the _000 clump of code. Delete it and replace with the following. Then reload the Asterisk dialplan: asterisk-reload.
Future updates will assume this code already is in place.
Code:
;# // BEGIN Speed Dialer
exten => _000.,1,Answer
exten => _000.,n,Wait(2)
exten => _000.,n,Set(DIALCODE=${EXTEN:3})
exten => _000.,n,SayDigits(${DIALCODE},) ; extensions dialed with 000 prefix get looked up in AsteriDex
exten => _000.,n,Set(USERDATA=${ODBC_ASTERIDEX(${DIALCODE})})
exten => _000.,n,GotoIf($["${USERDATA},foo" = ",foo"]?97)
exten => _000.,n,Set(USER=${CUT(USERDATA,\,,1)})
exten => _000.,n,Set(PHONE=${CUT(USERDATA,\,,2)})
exten => _000.,n,Flite("Connecting to: ${USER} at ${PHONE}. One moment please.")
exten => _000.,n,Goto(outbound-allroutes,${PHONE},1)
exten => _000.,n,Hangup()
exten => _000.,97,Playback(num-not-in-db)
exten => _000.,98,Playback(goodbye)
exten => _000.,99,Hangup()
;# // END Speed Dialer