[general] static=yes ; These two lines prevent the command-line interface writeprotect=yes ; from overwriting the config file. Leave them here. [bogon-calls] ; ; Take unknown callers that may have found ; our system, and send them to a re-order tone. ; The string "_." matches any dialed sequence, so all ; calls will result in the Congestion tone application ; being called. They'll get bored and hang up eventually. ; exten => _.,1,Congestion [from-sip] ; ; If the number dialed by the calling party was "2000", then ; Dial the user "2000" via the SIP channel driver. Let the number ; ring for 20 seconds, and if no answer, proceed to priority 2. ; If the number gives a "busy" result, then jump to priority 102 ; exten => 2000,1,Dial(SIP/2000,20) ; ; Priority 2 send the caller to voicemail, and gives the "u"navailable ; message for user 2000, as recorded previously. The only way out ; of voicemail in this instance is to hang up, so we have reached ; the end of our priority list. ; exten => 2000,2,Voicemail(u2000) ; ; If the Dialed number in priority 1 above results in ; a "busy" code, then Dial will jump to 101 + (current priority) ; which in our case will be 101+1=102. This +101 jump is built ; into Asterisk and does not need to be defined. ; exten => 2000,102,Voicemail(b2000) exten => 2000,103,Hangup ; ; Now, what if the number dialed was "2001"? ; exten => 2001,1,Dial(SIP/2001,20) exten => 2001,2,Voicemail(u2001) exten => 2001,102,Voicemail(b2001) exten => 2001,103,Hangup ; ; Define a way so that users can dial a number to reach ; voicemail. Call the VoicemailMain application with the ; number of the caller already passed as a variable, so ; all the user needs to do is type in the password. ; exten => 2999,1,VoicemailMain(${CALLERIDNUM}) mordor:~#