[Voiceglue] Passing a parameter from Asterisk, slashes won't work.

Stephen Smith s.smith at ampersand.com
Fri Apr 3 07:00:55 EDT 2009


Hey Emiliano glad that you got it working and it's a good point about the
Users Guide.  We're just about to update the user guide prior to the next
minor release, and we'll try to get your suggested updates incorporated.
If you have time and inclination, the user guide is a wiki and the Voiceglue
community is welcome to make updates.    So whether in this case or in the
future feel free to go in and make some changes if you think wording could
be improved or expanded on.

That's a cool project that you have going there, please keep us posted from
time to time on the mailing list.

- Steve

On Fri, Apr 3, 2009 at 5:18 AM, Emiliano Esposito <emiespo at tiscali.it>wrote:

> Andrew Zitnay ha scritto:
> > I don't know whether or not this will fix your problem, but the
> > slashes in the feed parameter of your URL should probably be
> > URL-encoded, i.e.:
> >
> >
> http://localhost/ReadMyFeed/ReadMyFeed.php?feed=iltempo.ilsole24ore.com%2Frss%2Fhome.xml&max=
> >
> > Thus causing them to be double-URL-encoded when you URL-encode again:
> >
> > http%3A%2F%2Flocalhost%2FReadMyFeed%2FReadMyFeed.php%3Ffeed%
> 3Diltempo.ilsole24ore.com%252Frss%252Fhome.xml%26max%3D
> >
> That seemed to work, but I couldn't find an easy way to do the trick in
> Asterisk (I mean, simply calling URIENCODE twice has no effect,
> obviously, nor would have passing an already encoded URL from SIP).
>
> So I did something like this in Asterisk:
>
> exten => s,n,Set(feed=${BASE64_ENCODE(${feed})})
> exten => s,n,Set(feed=${URIENCODE(${feed})})
>
> And just base64 decode on the CGI side.
>
> Anyway, Voiceglue user guide should warn about this, and warn that the
> "&" sign in URIs has to be encoded too.
>
> Thank you for pointing me in the right direction!
> Regards.
>
> Emiliano E.
> _______________________________________________
> Voiceglue mailing list
> Voiceglue at voiceglue.org
> http://www.voiceglue.org/mailman/listinfo/voiceglue
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.voiceglue.org/pipermail/voiceglue/attachments/20090403/5a9ca8a4/attachment.html 


More information about the Voiceglue mailing list