Speaking clock in german (hangup with extension exited non-zero)
Hello
Since i spent some time on this, i thought i might share the solution:
My problem was, that on my trixbox 2.6.2 installation, the speaking clock for german would fail (just hangup at some point during time announcements).
When i checked the SayUnixTime App in Asterisk 1.4.22 i found out the following:
you need to have (of course) the necessary voice prompts installed. Unfortunately it looks like SayUnixTime does not fall back to the english defaults in some cases. It has some filenames (for playback) hardcoded in the file say.c and if they are not present, the extension exits non-zero followed by a hangup.
So make sure you have the sound files (base path is /var/lib/asterisk/sounds)
digits/de/minute.*
digits/de/minutes.*
digits/de/seconds.*
digits/de/and.*
(where .* is either .wav or .gsm)
for a complete german announcement you should also have
de/at-tone-time-exactly.*
and of course all the digits in digits/de/
To avoid the duplicate "and" and "seconds" i changed the app_speakingclock via the GUI:
PBX -> config file editor -> extensions_additional.conf -> app-speakingclock
to:
[app-speakingclock]
include => app-speakingclock-custom
exten => *60,1,Answer
exten => *60,n,Wait(1)
exten => *60,n,Set(NumLoops=0)
exten => *60,n(start),Set(FutureTime=$[${EPOCH} + 13])
exten => *60,n,Playback(at-tone-time-exactly)
exten => *60,n,GotoIf($["${TIMEFORMAT}" = "kM"]?hr24format)
exten => *60,n,SayUnixTime(${FutureTime},,IM \'and\' S \'seconds\' p)
exten => *60,n,Goto(waitloop)
exten => *60,n(hr24format),GotoIf($[CHANNEL(language) = "de"]?hr24format_de)
exten => *60,n(hr24format_en),SayUnixTime(${FutureTime},,kM \'and\' S \'seconds\')
exten => *60,n,Goto(waitloop)
exten => *60,n(hr24format_de),SayUnixTime(${FutureTime},,kMS)
exten => *60,n,Goto(waitloop)
exten => *60,n(waitloop),Set(TimeLeft=$[${FutureTime} - ${EPOCH}])
exten => *60,n,GotoIf($[${TimeLeft} < 1]?playbeep)
exten => *60,n,Wait(1)
exten => *60,n,Goto(waitloop)
exten => *60,n(playbeep),Playback(beep)
exten => *60,n,Wait(5)
exten => *60,n,Set(NumLoops=$[${NumLoops} + 1])
exten => *60,n,GotoIf($[${NumLoops} < 5]?start)
exten => *60,n,Playback(goodbye)
exten => *60,n,Hangup
; end of [app-speakingclock]
To make this change permanent it seems like you need to insert it in the file extensions.conf . Changes in extension_additional.conf will be overwritten on next restart.
Hope this saves others some time.
Thank you, this is exactly what I've been looking for.

Member Since:
2009-02-13