planetWayne.com - Forums
Rants and Raves and Generally Anything
Speaking Clock

 
Post new topic   Reply to topic    planetWayne.com - Forums Forum Index -> VoIP
View previous topic :: View next topic  
Author Message
planetWayne
Site Admin


Joined: 30 Jan 2003
Posts: 280

PostPosted: Sat Sep 18, 2004 11:27 pm    Post subject: Speaking Clock Reply with quote

This ones to get Asterisk to have its own speaking clock - BT have a service when you dial '123' from a landline.

I thought I could do somthing similar - and free!

I make use of a variable in this to hold the extention number - for ease of use (and to not confuse others in the house) its set to 123 (same as BT) but you can set this to whatever fits your dial plan.

Just a little note - make sure your Asterisk box actualy has ITS clock sync'ed with an atomic source somwhere (or via nntp) otherwise its kinda pointless Wink

Code:
[globals]
SpeakingClock=123

the next bit is goes in your context were you want to be able to dial the clock.
Code:

; Speaking clock
; Take a snapshot of the time - add 10 seconds (about the lenght of the anouncement) and use that as the basis of the time.

exten => ${SpeakingClock},1,Wait(1)
exten => ${SpeakingClock},2,setvar(FutureTime=$[${EPOCH} + 10])
exten => ${SpeakingClock},3,playback(at-tone-time-exactly)
exten => ${SpeakingClock},4,SayUnixTime(${FutureTime},,R)
exten => ${SpeakingClock},5,playback(vm-and)
exten => ${SpeakingClock},6,SayUnixTime(${FutureTime},,S)
exten => ${SpeakingClock},7,playback(seconds)
exten => ${SpeakingClock},8,playback(beep)
exten => ${SpeakingClock},9,wait(2)
exten => ${SpeakingClock},10,goto(1)

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    planetWayne.com - Forums Forum Index -> VoIP All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group