Erstellen von Sprachmenüs
Buch - Scripte

 

Beispiel für Record extensions.conf

exten => 6666,1,Answer
exten => 6666,2,Record(/home/asterisk/sounds/mysoundfile:gsm,2,20)
exten => 6666,3,Hangup

 

/etc/festival.scm

(define (tts_textasterisk string mode)
"(tts_textasterisk STRING MODE)
Apply tts to STRING. This function is specifically designed
for use in server mode so a single function call may synthesize the string.
This function name may be added to the server safe functions."
utt.send.wave.client
(utt.wave.resample (utt.wave.rescale (utt.synth
(eval (list 'Utterance 'Text string))) 5) 8000)))

 

Beispiel für Festival extensions.conf

exten => 7777,1,Answer
exten => 7777,2,Festival('Willkommen bei Festival der TTS Software')
exten => 7777,3,Hangup

 

/etc/asterisk/extensions.conf

[voicemenu]
exten => 130,1,set(TIMEOUT(response(=10)
exten => 130,n,Answer
exten => 130,2,Wait(3)
exten => 130,3,Playback(voicemenu)

exten => 1,1,Dial(SIP/11,10)
exten => 1,n,Dial,Hangup
exten => 2,1,Dial(SIP/12,10)
exten => 2,n,Dial,Hangup
exten => 3,1,Dial(SIP/13,10)
exten => 3,n,Dial,Hangup

exten => t,1,Dial(SIP/10,10)
exten => i,1,Playback(invalid)