[general]
static=yes
writeprotect=yes
autofallthrough=yes
clearglobalvars=no
priorityjumping=yes

[globals]

[default]

[macro-InternalExtNoVoiceMail]
exten=>s,1,Dial(${ARG1},30,Ttr)
exten=>s,2,Hangup

[macro-InternalExt]
exten=>s,1,Dial(${ARG1},30,Ttr)
exten=>s,2,GoTo(s-${DIALSTATUS},1)
exten=>s-NOANSWER,1,Answer
exten=>s-NOANSWER,2,VoiceMail(u${ARG2}@mailbox)
exten=>s-NOANSWER,3,Hangup
exten=>s-BUSY,1,VoiceMail(b${ARG2}@mailbox)
exten=>s-BUSY,2,Hangup
exten=>_s-.,1,GoTo(s-NOANSWER,1)

[LocalExt]
exten=>111,1,MailboxExists(111@mailbox)
exten=>111,2,Macro(InternalExtNoVoiceMail,SIP/111)
exten=>111,3,Hangup
exten=>111,102,Macro(InternalExt,SIP/111,${EXTEN})
exten=>112,1,MailboxExists(112@mailbox)
exten=>112,2,Macro(InternalExtNoVoiceMail,SIP/112)
exten=>112,3,Hangup
exten=>112,102,Macro(InternalExt,SIP/112,${EXTEN})
exten=>113,1,MailboxExists(113@mailbox)
exten=>113,2,Macro(InternalExtNoVoiceMail,SIP/113)
exten=>113,3,Hangup
exten=>113,102,Macro(InternalExt,SIP/113,${EXTEN})


[gContextGroup_1]
include=>LocalExt
