[asterisk-users] Blacklist callers from file
Steve Edwards
asterisk.org at sedwards.com
Sun Aug 28 11:51:49 CDT 2016
Please don't top-post.
> On 27/8/2016 10:48 μμ, Steve Edwards wrote:
>>
>> Other alternatives involve modifying your dial plan. If you are
>> comfortable with that then you can consider alternatives like an AGI
>> that reads your text file and sets a channel variable.
On Sun, 28 Aug 2016, john wrote:
> Script seems good, but i am stuck on how to make it.
Sounds like time for a bit of reading.
The AGI protocol is simple. You give Asterisk a request. You get a
response. It's all text based and you can enable AGI debug mode and watch
the 'conversation' on the console.
There are lots of examples on the net.
You can pick any language you're comfortable with. Save yourself a lot of
frustration and use an existing AGI library.
For your needs, your AGI may be as simple as:
) Read the AGI environment if your library does not do it automagically.
) Look for the ANI/caller ID in your text file (or database).
) Either set a channel variable (like AGISTATUS) or set the
context/extension/priority. I've written AGIs both ways. I think setting a
channel variable makes for more reusable code.
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281
More information about the asterisk-users
mailing list