aboutsummaryrefslogtreecommitdiffstats
path: root/configs
diff options
context:
space:
mode:
authorlmadsen <lmadsen@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-13 19:32:09 +0000
committerlmadsen <lmadsen@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-13 19:32:09 +0000
commit958acb4ebc4446b6a6efefd34e014f01d81d108e (patch)
tree6f0d37c4c3214195d2f0a13448e7ef719051658d /configs
parent72790bc506b0d5c01e96e51fe81c4035fc4b970b (diff)
Merged revisions 239834 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r239834 | lmadsen | 2010-01-13 13:31:13 -0600 (Wed, 13 Jan 2010) | 8 lines Add more examples to extensions.conf showing how to use various functionality and provide commonly useful features. (closes issue #16090) Reported by: pprindeville Patches: extensions.conf-bugid16090.patch#3 uploaded by pprindeville (license 347) Tested by: tzafrir, pprindeville, lmadsen ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@239837 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configs')
-rw-r--r--configs/extensions.conf.sample64
1 files changed, 64 insertions, 0 deletions
diff --git a/configs/extensions.conf.sample b/configs/extensions.conf.sample
index 69370376c..520b92a2e 100644
--- a/configs/extensions.conf.sample
+++ b/configs/extensions.conf.sample
@@ -723,6 +723,70 @@ include => demo
;
; end of acme example
+;
+; Time context: you can patch this in via the following.
+;
+; [acme-internal]
+; ...
+; exten => 777,1,Gosub(time)
+; exten => 777,n,Hangup()
+;
+; ...
+; include => time
+;
+; Note: if you're geographically spread out, you can have SIP extensions
+; specify their own local timezone in sip.conf as:
+;
+; [boi]
+; type=friend
+; context=acme-internal
+; callerid="Boise Ofc. <2083451111>"
+; ...
+; ; use system-wide default timezone of MST7MDT
+;
+; [lws]
+; type=friend
+; context=acme-internal
+; callerid="Lewiston Ofc. <2087431111>"
+; ...
+; setvar=timezone=PST8PDT
+;
+; "timezone" isn't a 'reserved' name in any way, and other places where
+; the timezone is significant (e.g. calls to "SayUnixTime()", etc) will
+; require modification as well. Note that voicemail.conf already has
+; a mechanism for timezones.
+;
+
+[time]
+exten => _X.,30000(time),NoOp(Time: ${EXTEN} ${timezone})
+exten => _X.,n,Wait(0.25)
+exten => _X.,n,Answer()
+; the amount of delay is set for English; you may need to adjust this time
+; for other languages if there's no pause before the synchronizing beep.
+exten => _X.,n,Set(FUTURETIME=$[${EPOCH} + 12])
+exten => _X.,n,SayUnixTime(${FUTURETIME},Zulu,HNS)
+exten => _X.,n,SayPhonetic(z)
+; use the timezone associated with the extension (sip only), or system-wide
+; default if one hasn't been set.
+exten => _X.,n,SayUnixTime(${FUTURETIME},${timezone},HNS)
+exten => _X.,n,Playback(spy-local)
+exten => _X.,n,WaitUntil(${FUTURETIME})
+exten => _X.,n,Playback(beep)
+exten => _X.,n,Return()
+
+;
+; ANI context: use in the same way as "time" above
+;
+
+[ani]
+exten => _X.,40000(ani),NoOp(ANI: ${EXTEN})
+exten => _X.,n,Wait(0.25)
+exten => _X.,n,Answer()
+exten => _X.,n,Playback(vm-from)
+exten => _X.,n,SayDigits(${CALLERID(ani)})
+exten => _X.,n,Wait(1.25)
+exten => _X.,n,SayDigits(${CALLERID(ani)}) ; playback again in case of missed digit
+exten => _X.,n,Return()
; For more information on applications, just type "core show applications" at your
; friendly Asterisk CLI prompt.