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

LATEEF, IRFAN, ATTSI il110w at att.com
Mon Apr 6 13:19:36 EDT 2009


Hi,

 

I am using VoiceGlue 0.8 and trying to pass the URL dynamically as
discussed in this thread and show in the VoiceGlue 0.9 UserGuide.

And it is not working as expected. It playing the file given the
/etc/voiceglue.conf.

I just wanted to find out if this feature is available in VoiceGlue 0.8.

 

If not and if I have update the from 0.8 to 0.9 how stable is it. Any
feedback would greatly appreciated .

 

 
Agi(agi://localhost/url=http%3A%2F%2Falt.com%2Fvxml%2Fdoit.vxml&arg1=foo
&arg2=bar)

 

 

Thanks and Regards,

Irfan Lateef

Systems Engineer,CBUS

 

From: voiceglue-bounces at voiceglue.org
[mailto:voiceglue-bounces at voiceglue.org] On Behalf Of Stephen Smith
Sent: Friday, April 03, 2009 7:01 AM
To: General discussion about voiceglue
Subject: Re: [Voiceglue] Passing a parameter from Asterisk,slashes won't
work.

 

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.il
sole24ore.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/20090406/d9ed15c2/attachment.html 


More information about the Voiceglue mailing list