[Voiceglue] Passing a parameter from Asterisk, slashes won't work.
Emiliano Esposito
emiespo at tiscali.it
Thu Apr 2 18:38:24 EDT 2009
I've discovered that passing an entire url as a parameter from Asterisk
did not work.
I mean (according to Asterisk console) this works:
- - Executing [s at phoneglue-feed:3] AGI("SIP/localhost-094f52c8",
"agi://localhost/url=http%3A%2F%2Flocalhost%2FReadMyFeed%2FReadMyFeed.php%3Ffeed%3Diltempo.ilsole24ore.com%2frss%2fhome.xml%26max%3D")
in new stack
While this:
-- Executing [s at phoneglue-feed:3] AGI("SIP/localhost-094f52c8",
"agi://localhost/url=http%3A%2F%2Flocalhost%2FReadMyFeed%2FReadMyFeed.php%3Ffeed%3Diltempo.ilsole24ore.com%2frss%2fhome.xml%26max%3D")
in new stack
doesn't. Notice I'm passing these URLS (I removed URI encoding for easy
reading):
../ReadMyFeed.php?feed=iltempo.ilsole24ore.com (works)
and (I have also omitted the initial part of the URL):
../ReadMyFeed.php?feed=http://iltempo.ilsole24ore.com/rss/home.xml
(doesn't work)
these won't work either:
../ReadMyFeed.php?feed=http://iltempo.ilsole24ore.com
../ReadMyFeed.php?feed=iltempo.ilsole24ore.com/rss/home.xml
I think it's due to the " / " sign.
I've also discovered you have to URI encode the ampersand among
parameters too; if you don't, Asterisk 1.4 would pass VG a question mark
instead of a &.
I'm asking where in the code (sorry I have no time at all to check) such
parameter parsing happens, so I can possibly fix it and return it to
this list.
Thank you.
E.E.
More information about the Voiceglue
mailing list