This is my own GotoifTime section, which works swimmingly I
might add:
exten => s,1,Answer
exten => s,2,SetMusicOnHold(default)
exten => s,3,Set(TIMEOUT(digit)=5)
exten => s,4,Set(TIMEOUT(response)=10)
exten => s,5,Background(fedwelcome)
exten => s,6,GotoIfTime(*|*|1|jan?afterhours,s,1) ; New Year's Day
exten => s,7,GotoIfTime(*|mon|25-31|may?afterhours,s,1) ; Memorial Day
exten => s,8,GotoIfTime(*|*|4|jul?afterhours,s,1) ; 4th of July
exten => s,9,GotoIfTime(*|mon|1-7|sep?afterhours,s,1) ; Labor Day
exten => s,10,GotoIfTime(*|thu|22-28|nov?afterhours,s,1) ; Thanksgiving
exten => s,11,GotoIfTime(*|*|25|dec?afterhours,s,1) ; Christmas Day
exten => s,12,GotoIfTime(08:00-17:00|*|*|*?mainmenu,s,1)
exten => s,13,Goto(afterhours,s,1)
exten => s,14,Hangup
-----
exten => s,2,SetMusicOnHold(default)
exten => s,3,Set(TIMEOUT(digit)=5)
exten => s,4,Set(TIMEOUT(response)=10)
exten => s,5,Background(fedwelcome)
exten => s,6,GotoIfTime(*|*|1|jan?afterhours,s,1) ; New Year's Day
exten => s,7,GotoIfTime(*|mon|25-31|may?afterhours,s,1) ; Memorial Day
exten => s,8,GotoIfTime(*|*|4|jul?afterhours,s,1) ; 4th of July
exten => s,9,GotoIfTime(*|mon|1-7|sep?afterhours,s,1) ; Labor Day
exten => s,10,GotoIfTime(*|thu|22-28|nov?afterhours,s,1) ; Thanksgiving
exten => s,11,GotoIfTime(*|*|25|dec?afterhours,s,1) ; Christmas Day
exten => s,12,GotoIfTime(08:00-17:00|*|*|*?mainmenu,s,1)
exten => s,13,Goto(afterhours,s,1)
exten => s,14,Hangup
-----
For your situation I would do something
like:
exten =>
s,12,GotoIfTime(08:00-17:00|*|*|*?playsoundfile,s,1)
[playsoundfile]
exten => s,1,Playback(soundfile)
-----
I
personally use a record extension to get my files on the server, striaght out of
the wiki, sort of:
[205record]
; Record voice file to /tmp directory
exten => 9205,1,Wait(2) ; Call 205 to Record new Sound Files
exten => 9205,2,Record(/tmp/asterisk-recording:gsm) ; Press # to stop recording
exten => 9205,3,Wait(2)
exten => 9205,4,Playback(/tmp/asterisk-recording) ; Listen to your voice
exten => 9205,5,wait(2)
exten => 9205,6,Hangup
-----
; Record voice file to /tmp directory
exten => 9205,1,Wait(2) ; Call 205 to Record new Sound Files
exten => 9205,2,Record(/tmp/asterisk-recording:gsm) ; Press # to stop recording
exten => 9205,3,Wait(2)
exten => 9205,4,Playback(/tmp/asterisk-recording) ; Listen to your voice
exten => 9205,5,wait(2)
exten => 9205,6,Hangup
-----
If I
were to try and move the file to * from another PC, I'd probably upload said
file to my webserver then 'wget' it down to *.
Hope
this helps. There's nothing too special about it, but I'd really proud of
what we are going to be able to do with the awesome system.
If
anyone sees any faux pas in my config, please let me know.
Bob McDowell
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Faisal
Inam
Sent: Thursday, February 16, 2006 11:33 PM
To: [email protected]
Subject: [Asterisk-Users] Playing sound File using GotoifTime function
Sent: Thursday, February 16, 2006 11:33 PM
To: [email protected]
Subject: [Asterisk-Users] Playing sound File using GotoifTime function
I want to play a sound file using GotoifTime function.
1) What should be the appropriate format of this type of sound file?
2) Is there any method to copy this file into the destination directory using the browser of a PC other than the asterisk PC (currently i am using cp to copy the file in /var/lib/asterisk/sounds on asterisk PC)???
Waiting for ur kind reply !!
1) What should be the appropriate format of this type of sound file?
2) Is there any method to copy this file into the destination directory using the browser of a PC other than the asterisk PC (currently i am using cp to copy the file in /var/lib/asterisk/sounds on asterisk PC)???
Waiting for ur kind reply !!
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
_______________________________________________ --Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
