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       [email protected]      Voice: +1-760-468-3867 PST
            https://www.linkedin.com/in/steve-edwards-4244281
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
      http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to