On Sun, Jul 25, 2010 at 9:04 AM, Muro, Sam <[email protected]> wrote:
> Kyle Kienapfel wrote:
>> On Sun, Jul 25, 2010 at 8:18 AM, Muro, Sam <[email protected]>
>> 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
>>
>> --
>
> Thanks,
> So I you suggesting that the executable to changed to output say
> cout <<"SET VARIABLE name Jenny";
> and let the AGI retrieve them as per the pseudo you mentioned?
>
> Sam
>

Does doing that output a newline at the end of the line?

If it doesn't you might want something more like (i am just guessing
syntax here btw)
cout <<"SET VARIABLE name Jenny" << ENDL;
or
cout <<"SET VARIABLE name Jenny\n";

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