On Sun, Jul 25, 2010 at 8:18 AM, Muro, Sam <resea...@businesstz.com> 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.
>
> Thanks
> Sam
>
> --

Hopefully you can modify the executable

#./retrieve 8675309
SET VARIABLE name Jenny
SET VARIABLE status Active

When running an AGI asterisk expects to have a conversation with the
application, so when the AGI does a command asterisk reports back with
whether or not it worked. I know a person can set one variable that
way, but when I got a need to set two variables I finally broke down
and read the documentation on AGI's :)

Start
Readlines from input until line is blank
print "SET VARIABLE name Jenny"
readline
print "SET VARIABLE status Active"
End

-- 
_____________________________________________________________________
-- 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