[incoming] ; put all external lines (ZAP, VoIP providers, etc) in here with context=incoming for their sip/iax.conf entriesinclude => internal-extensions ; allow callers to dial internal extensionsinclude => check-voicemail ; allow callers to check their VMexten => s,1,Answer()exten => s,2,Background(company-welcome) ; plays a file thanking caller for callingexten => s,3,Background(main-ivr-selections) ; press 1 for sales, 2 for service, etcexten => s,4,WaitExten(10) ; if they listen thru the whole menu, wait 10 seconds before dropping themexten => 1,1,Queue(sales) ; if they push 1, put them in the sales queueexten => 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 otherinclude => check-voicemailinclude => dial-outinclude => internal-extensions