[asterisk-users] How to escape the & in BackGround

Antony Stone Antony.Stone at asterisk.open.source.it
Thu Jan 27 14:58:52 CST 2022


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.



More information about the asterisk-users mailing list