Re: [Asterisk-java-users] passing parameters on agi 'scripts'
Brought to you by:
srt
|
From: Stefan R. <sr...@re...> - 2005-04-06 19:16:27
|
I added parameters to AGIRequest in Asterisk-java's latest CVS.
On Wed, 2005-04-06 at 16:58 +0800, Dax Reyes wrote:
[snip]
> Yes, I am just basing my 'porting' on the fast-agi 'welcome' example
> so I am assuming that by adding that functionality, inside the
> method 'service' , I can add something like
>
> if (transcode == "dcx")
[snip]
You can do it like this:
if ("dcx".equals(request.getParameter("transcode"))
...
> Also what happens if two or more parameters/arguments get passed?
> exten => s,2,FastAGI(agi://server/testscript?arg1=dcx&arg2=something)
The implementation follows the notation of HTTP parameters.
So you can use as many parameters as you like and you can even assign a
parameter multiple values that can be retrieved as an array of Strings
via getParameterValues.
Please check out the lastest snapshot on
http://maven.reucon.com/maven/asterisk-java/distributions/
and tell me if it works for you.
Thanks,
Stefan
|