[incoming] ; put all external lines (ZAP, VoIP providers, etc) in here with context=incoming for their sip/iax.conf entries include => internal-extensions ; allow callers to dial internal extensions include => check-voicemail ; allow callers to check their VM exten => s,1,Answer() exten => s,2,Background(company-welcome) ; plays a file thanking caller for calling exten => s,3,Background(main-ivr-selections) ; press 1 for sales, 2 for service, etc exten => s,4,WaitExten(10) ; if they listen thru the whole menu, wait 10 seconds before dropping them exten => 1,1,Queue(sales) ; if they push 1, put them in the sales queue exten => 2,1,Dial(SIP/1234&SIP/1235,30) ; 1234 and 1235 are the support guys. try them for 30 seconds. exten => 2,2,VoiceMail(support@vmcontext) ; if they dont answer, send caller to support mailbox [internal-extensions] exten => _8XXX,1,Dial(SIP/${EXTEN},20) exten => _8XXX,2,VoiceMail(${EXTEN}@vmcontext) [check-voicemail] exten => *99,1,VoiceMailMain(${CALLERIDNUM}@vmcontext) ; if they dial *99, check voicemail for (their caller ID)@vmcontext. If they call extenrally, mailbox wont exist and they will be prompted to enter VM exten # [dial-out] exten => _1NXXNXXXXXX,1,Dial(SIP/provider/${EXTEN}) ; allow outgoing calls to american numbers via SIP/provider [internal-users] ; put internal users into this context with context=internal-users in sip.conf or iax.conf. they can check VM, make outoging calls and call each other include => check-voicemail include => dial-out include => internal-extensions