Does asterisk follow HTTP redirects? If so can you use something like tinyurl.com to produce an alternative URL? Or, base64 encode the URL, and then set a variable with Set(url=${BASE64_DECODE(${encodedURL})) ? Cheers, Kingsley. On Wed, 2022-01-26 at 16:56 -0500, Dovid Bender wrote:> I tried but it seems it does not. > > > On Tue, Jan 18, 2022 at 2:57 PM John Runyon <john at simplynuc.com> > wrote: > > ${SPRINTF(%c,38)} > > or > > %26 > > > > should work, I think. > > > > On Sun, 16 Jan 2022 at 13:21, Dovid Bender <dovid at telecurve.com> > > wrote: > > > Hi, > > > > > > I am trying to play a sound file from AWS S3. The URL is > > > something like this http://example.org?foo=bar&a=b. The issue > > > seems to be that as soon as Asterisk see's the & it assumes there > > > is a new file and the a=b is not sent along. I tried doing \& but > > > that did not work. Does anyone know a way of telling Asterisk > > > that & is part of the URL and to pass it along as a string?
On Thursday 27 January 2022 at 21:31:35, Kingsley Tart wrote:> Does asterisk follow HTTP redirects? If so can you use something like > tinyurl.com to produce an alternative URL?I'm (pretty) sure that that would work. The other similar idea I had was to use a reverse proxy server to accept an Asterisk-compatible URL and convert it into whatever the outisde world requires.> Or, base64 encode the URL, and then set a variable with > Set(url=${BASE64_DECODE(${encodedURL})) ?No, doesn't work - I tried several things yesterday to see if I could get this to work, and you don't even need to use Base64 en/de-coding - you can set an Asterisk variable to the URL including the &, and then pass that to the Background() command, and it fails. I tried it pointing to a web server I run, so I can see the requests which are sent, and a ? gets through, but a & doesn't. Converting it to %26 simply sends that through as-is, which fails at the web server end. So, I think this is a bug/feature-fail in Asterisk, which can't be worked around. Antony. -- "In fact I wanted to be John Cleese and it took me some time to realise that the job was already taken." - Douglas Adams Please reply to the list; please *don't* CC me.
I tried tinyURL and that did not work. I got an error of: file.c:789 ast_openstream_full: File https://tinyurl.com/bdfye5ts9 does not exist in any format (URL changed to hide aws key). I tried adding \;foo=wav. but that did not work either. On Thu, Jan 27, 2022 at 3:32 PM Kingsley Tart <kingsley at dns99.co.uk> wrote:> Does asterisk follow HTTP redirects? If so can you use something like > tinyurl.com to produce an alternative URL? > > Or, base64 encode the URL, and then set a variable with > Set(url=${BASE64_DECODE(${encodedURL})) ? > > Cheers, > Kingsley. > > On Wed, 2022-01-26 at 16:56 -0500, Dovid Bender wrote: > > I tried but it seems it does not. > > > > > > On Tue, Jan 18, 2022 at 2:57 PM John Runyon <john at simplynuc.com> > > wrote: > > > ${SPRINTF(%c,38)} > > > or > > > %26 > > > > > > should work, I think. > > > > > > On Sun, 16 Jan 2022 at 13:21, Dovid Bender <dovid at telecurve.com> > > > wrote: > > > > Hi, > > > > > > > > I am trying to play a sound file from AWS S3. The URL is > > > > something like this http://example.org?foo=bar&a=b. The issue > > > > seems to be that as soon as Asterisk see's the & it assumes there > > > > is a new file and the a=b is not sent along. I tried doing \& but > > > > that did not work. Does anyone know a way of telling Asterisk > > > > that & is part of the URL and to pass it along as a string? > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20220127/0d941d3e/attachment.html>