Fellow stackoverflowers:
I come here bearing a question that I haven't been able to solve on my own so far.
I want to be able to pass the data from an array to an AGI script in my Asterisk PBX's dialplan that's formatted in the following way:
exten => some_exten,priority,AGI(agi:hostname:port/agi_script.agi?param1=value1¶m2=value2...¶mN=valueN)
But one of the parameters has to receive the array data as if it was an URL parameter in a CGI script, like:
exten => some_exten,priority,AGI(agi:hostname:port/agi_script.agi?param_array=value1,value2,value3...,valueN)
I know that AGI scripts are able to receive arrays as parameters, but the available documentation for AGI scripts in URL form does not say anything about how to receive array data as a script parameter; which is why I am posting this question here.
I have experimented (with unsuccessful results) passing the data in the following ways:
Comma-separated:
exten => some_exten,priority,AGI(agi:hostname:port/agi_script.agi?param_array=array_value1,array_value2...,array_valueN)
Pipe-seperated:
exten => some_exten,priority,AGI(agi:hostname:port/agi_script.agi?param_array=array_value1|array_value2...|array_valueN)
Semicolon-separated:
exten => some_exten,priority,AGI(agi:hostname:port/agi_script.agi?param_array=array_value1;array_value2...;array_valueN)
But so far, I have only succeeded passing the array data the following way:
exten => some_exten,priority,AGI(agi:hostname:port/agi_script.agi?param_array=array_value1¶m_array=array_value2...¶m_array=array_valueN)
From what I've read, this is not the correct way to pass parameters to a URL, which is the way that I'm using to pass the data to my AGI script.
I'd greatly appreciate if anyone could shed a light in this matter, because I really don't want to have to pass each array item individually like I've been doing so far.
param_array=variable1_value,variable2_value...,variableN_value
– Elbano Mibelli P.