Last active
August 29, 2015 14:11
-
-
Save sammachin/3bd36c1957787206d060 to your computer and use it in GitHub Desktop.
Excerpt from my asterisk extenstions.conf to screen my incomming calls and ask unknown's to press 1 before it will call me
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[from-external] | |
// Send Notification | |
exten => 01934xxxxxx,1,AGI(agi://192.168.1.11:4573/log?chan=landline&cli=${CALLERID(num)}) | |
// Allow whitelisted numbers | |
exten => 01934xxxxxx/07970xxxxxx,2,Dial(SIP/1000&SIP/1001&SIP/1002&SIP/2000) | |
exten => 01934xxxxxx/01202xxxxxx,2,Dial(SIP/1000&SIP/1001&SIP/1002&SIP/2000) | |
// If not on whitelist screen the call | |
exten => 01934xxxxxx,2,Goto(screencall,s,1) | |
[screencall] | |
exten => s,1,Answer | |
exten => s,2,Background(custom/Human_Press1) | |
exten => s,3,WaitExten() | |
// If they've pressed 1 then connect the call to the phones | |
exten => 1,1,Dial(SIP/1000&SIP/1001&SIP/1002&SIP/2000) | |
exten => 1,2,Hangup() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
notes: I've redacted the last part of the numbers for privacy but in this example 01934xxxxxx is my real home number which is the extension that the FXO adaptor dials on incoming calls, 07970xxxxxx and 01202xxxxxx are examples of numbers I want whitelisted you can just duplicate this line for each number on your whitelist.
1000, 1001, 1002 and 2000 are my SIP extensions that I want the allowed calls to ring