micolous.id.au

the result of a blogging accident

Thursday, February 16, 2006

Asterisk Time System

Filed under: Asterisk, VoIP — micolous @ 22:17

This is a simple dialplan menu that allows the user to enter an Australian postal code and display the current time for the location. It supports the major time zones.

[custom-time-menu]
; nsw
exten => _2[0-5]XX,1,SayUnixTime(,Australia/NSW)
exten => _2[0-5]XX,2,Goto(custom-new-main-menu,s,1)
; act
exten => _2[6-9]XX,1,SayUnixTime(,Australia/ACT)
exten => _2[6-9]XX,2,Goto(custom-new-main-menu,s,1)
; vic
exten => _3XXX,1,SayUnixTime(,Australia/Victoria)
exten => _3XXX,2,Goto(custom-new-main-menu,s,1)
; qld
exten => _4XXX,1,SayUnixTime(,Australia/Queensland)
exten => _4XXX,2,Goto(custom-new-main-menu,s,1)
; sa
exten => _5XXX,1,SayUnixTime(,Australia/South)
exten => _5XXX,2,Goto(custom-new-main-menu,s,1)
; wa
exten => _6XXX,1,SayUnixTime(,Australia/West)
exten => _6XXX,2,Goto(custom-new-main-menu,s,1)
; tas
exten => _7XXX,1,SayUnixTime(,Australia/Tasmania)
exten => _7XXX,2,Goto(custom-new-main-menu,s,1)
; nt
exten => _08XX,1,SayUnixTime(,Australia/North)
exten => _08XX,2,Goto(custom-new-main-menu,s,1)
; exit
exten => 9,1,Goto(custom-new-main-menu,s,1)

exten => s,1,ResponseTimeout(5)
exten => s,2,DigitTimeout(7)
exten => s,3,Wait(2)
exten => s,4,Background(custom/postcode-prompt)

exten => i,1,Wait(1)
exten => i,2,Playback(custom/unknown-location)
exten => i,3,Goto(s,1)

exten => t,1,Goto(custom-new-main-menu,s,1)

Thursday, February 2, 2006

conf.py 0.2

Filed under: Asterisk, Coding, VoIP — micolous @ 20:38

I’ve now updated “conf.py” to version 0.2. This release fixes a bug where if you had multiple Asterisk conferences, and conference A had users and conference B did not, that B would errornously report as having 1 user in it. That’s now been fixed now that the script takes into account responses from the Asterisk server a bit better.

Powered by WordPress