On 11/2/07, Arpit Mehta <[EMAIL PROTECTED]> wrote:
>
> Hello * users,
>
> I know that passing variable in the AGI script is by
>
> exten => _.,1,AGI(simple_c_prgm|123|789)  ; 123, 789 are arguments being
> passed and simple_c_prgm is C code
>
> Now how will I receive these variables within C code ? Is it by the same
> way arguments are passed in command line to C by using argc and argv or
> there is more to be done than that?


>From the wiki (http://www.voip-info.org/wiki-Asterisk+AGI):

When Asterisk starts an AGI script, it feeds the channel variables to the
script on standard input. The variable names are prefixed with "agi_" and
are separated from their values by a colon and a space. Though the actual
channel variables may be in the upper case, the names passed to an AGI
script are all lower case. Also, some channel variable names as passed to
AGI script differ from the current variable names used in the dial plan.

These docs, while dated, are also useful:

http://www.bitflipper.ca/Documentation/agi.html

It even includes code for getting at variables from several languages.

-- 
j.
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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

Reply via email to