; ; Extension configuration file, used by the pbx_config module. ; This is where you configure all your inbound and outbound calls in Asterisk. ; [general] static=yes writeprotect=yes autofallthrough=yes clearglobalvars=no priorityjumping=no ; Trunk interface - use group 1 from zapata.conf ; [globals] TRUNK=Zap/g1 ; This reads sip.conf, voicemail format is VoiceMail(mailbox_number@context_from_sip.conf) ; [sipusers] exten => 1234,1,Answer exten => 1234,2,Dial(SIP/onexlite,15) exten => 1234,3,GoToIf($[${DIALSTATUS} = CHANUNAVAIL]?5) exten => 1234,4,GoToIf($[${DIALSTATUS} = BUSY]?5) exten => 1234,5,Voicemail(1234@sipvoicemail) exten => 1234,6,Playback(vm-goodbye) exten => 1234,7,Wait,2 exten => 1234,8,Hangup ; exten => 1235,1,Answer exten => 1235,2,Dial(SIP/twoxlite,15) exten => 1235,3,GoToIf($[${DIALSTATUS} = CHANUNAVAIL]?5) exten => 1235,4,GoToIf($[${DIALSTATUS} = BUSY]?5) exten => 1235,5,Voicemail(1235@sipvoicemail) exten => 1235,6,Playback(vm-goodbye) exten => 1235,7,Wait,2 exten => 1235,8,Hangup ; This automatically calls the right mailbox using the ${CALLERIDNUM} variable in the current context (var ${CONTEXT}) ; exten => *98,1,VoicemailMain(${CALLERIDNUM}@${CONTEXT}) exten => *98,2,Playback(vm-goodbye) exten => *98,3,Wait,2 exten => *98,4,Hangup