On Sun, 25 Jul 2010, Muro, Sam wrote:

> I am having a problem understanding the way to retrieve some parameters 
> to asterisk via AGI or what ever method that fits. I have an executable 
> program that accept one parameter (CALLERID) and return customer status 
> from the database server which can be printed in the console.
>
> #./retrive 0117473789
> NAME: Franklin John
> STATUS: Active
>
> Can someone advice on how i can catch this values from AGI or directly 
> on dialplan.

AGI is a protocol used to interact with Asterisk. An AGI is a separate 
process created by Asterisk when you execute "agi()" in the dialplan.

>From best to worst...

1) You could recode your retrieve application so it uses the AGI protocol. 
Then, you could set channel variables to make these values accessible to 
the rest of your dialplan.

2) You could cobble up an AGI to execute your retrieve application using a 
"pipe" ("popen()" in c), parse the output and set channel variables.

3) You could cobble up something to execute your retrieve application, 
redirecting the output to a file and then use the FILE function read the 
text file and then parse the output using dialplan functions.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwa...@sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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

Reply via email to