[asterisk-users] Passing parameter from executable program to asterisk dialplan

Steve Edwards asterisk.org at sedwards.com
Sun Jul 25 11:14:44 CDT 2010


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.

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

It's a little bit more involved than than.

You should google for an AGI library for your source language. It's a lot 
easier to use an established, debugged framework than figure it out 
yourself. Nobody gets it right the first time.

If you follow the protocol, your retrieve application will be stable and 
reliable. If you just hack it up, it may work now but not under load or 
not in the future or not when your boss is looking or not when...

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



More information about the asterisk-users mailing list