John Congdon wrote:

Here is an example I stole off the list awhile back

exten => *5,1,DBget($Night=GlobalSettings/Night) ; if not night then set it
exten => *5,2,DBdel(GlobalSettings/Night)
exten => *5,3,Playback(night_off)
exten => *5,4,Hangup
exten => *5,102,DBput(GlobalSettings/Night=true)
exten => *5,103,Playback(night_on)
exten => *5,104,Hangup


Set Night and then have a voice response saying "Night on" or "Night Off" accordingly...

Do yu need to initiate any external db in anyway.
Exept from not having the right prompt recorded right know I get error messages like this:


Executing Hangup("SIP/9002-4f88", "") in new stack
== Spawn extension (siphone, *5, 4) exited non-zero on 'SIP/9002-4f88'
-- Executing DBget("SIP/9002-2e67", "$Night=GlobalSettings/Night") in new stack
-- DBget: varname=$Night, family=GlobalSettings, key=Night
-- DBget: Value not found in database.
-- Executing DBput("SIP/9002-2e67", "GlobalSettings/Night=true") in new stack
-- DBput: family=GlobalSettings, key=Night, value=true
-- Executing Playback("SIP/9002-2e67", "night_on") in new stack
WARNING[442385]: File file.c, Line 443 (ast_openstream): File night_on does not exist in any format
WARNING[442385]: File file.c, Line 717 (ast_streamfile): Unable to open night_on (format 4): No such file or directory
WARNING[442385]: File app_playback.c, Line 83 (playback_exec): ast_streamfile failed on SIP/9002-2e67 for night_on
-- Executing Hangup("SIP/9002-2e67", "") in new stack
== Spawn extension (siphone, *5, 104) exited non-zero on 'SIP/9002-2e67'
/t



_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to