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

2022-01-28 Thread Antony Stone
On Friday 28 January 2022 at 02:43:17, John Covici wrote:

> I have been using system commands in my dialplan for years and the &
> goes through and puts the process in background like it should,
> asterisk does not do anything, so you are left with what the shell
> does.

That's completely different from trying to put an & into the Background() or 
Playback() commands, where Asterisk does treat the symbol specially.


Antony.

-- 
+++ Divide By Cucumber Error.  Please Reinstall Universe And Reboot +++

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- 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

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

2022-01-27 Thread John Covici
I have been using system commands in my dialplan for years and the &
goes through and puts the process in background like it should,
asterisk does not do anything, so you are left with what the shell
does.

On Thu, 27 Jan 2022 17:48:46 -0500,
Dovid Bender wrote:
> 
> [1  ]
> [1.1  ]
> 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  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 
> > > wrote:
> > > > ${SPRINTF(%c,38)}
> > > > or
> > > > %26
> > > >
> > > > should work, I think.
> > > >
> > > > On Sun, 16 Jan 2022 at 13:21, Dovid Bender 
> > > > wrote:
> > > > > Hi,
> > > > >
> > > > > I am trying to play a sound file from AWS S3. The URL is
> > > > > something like this http://example.org?foo=bar=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
> [1.2  ]
> [2  ]
> -- 
> _
> -- 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

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici wb2una
 cov...@ccs.covici.com

-- 
_
-- 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

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

2022-01-27 Thread Dovid Bender
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  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 
> > wrote:
> > > ${SPRINTF(%c,38)}
> > > or
> > > %26
> > >
> > > should work, I think.
> > >
> > > On Sun, 16 Jan 2022 at 13:21, Dovid Bender 
> > > wrote:
> > > > Hi,
> > > >
> > > > I am trying to play a sound file from AWS S3. The URL is
> > > > something like this http://example.org?foo=bar=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
-- 
_
-- 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

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

2022-01-27 Thread Antony Stone
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.

-- 
_
-- 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

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

2022-01-27 Thread Kingsley Tart
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 
> wrote:
> > ${SPRINTF(%c,38)}
> > or
> > %26
> > 
> > should work, I think.
> > 
> > On Sun, 16 Jan 2022 at 13:21, Dovid Bender 
> > wrote:
> > > Hi,
> > > 
> > > I am trying to play a sound file from AWS S3. The URL is
> > > something like this http://example.org?foo=bar=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

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

2022-01-27 Thread Kingsley Tart - Barritel Ltd
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 
> wrote:
> > ${SPRINTF(%c,38)}
> > or
> > %26
> > 
> > should work, I think.
> > 
> > On Sun, 16 Jan 2022 at 13:21, Dovid Bender 
> > wrote:
> > > Hi,
> > > 
> > > I am trying to play a sound file from AWS S3. The URL is
> > > something like this http://example.org?foo=bar=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

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

2022-01-26 Thread Dovid Bender
I tried but it seems it does not.


On Tue, Jan 18, 2022 at 2:57 PM John Runyon  wrote:

> ${SPRINTF(%c,38)}
> or
> %26
>
> should work, I think.
>
> On Sun, 16 Jan 2022 at 13:21, Dovid Bender  wrote:
>
>> Hi,
>>
>> I am trying to play a sound file from AWS S3. The URL is something like
>> this http://example.org?foo=bar=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
-- 
_
-- 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

Re: [asterisk-users] How to escape the & in BackGround (Dovid Bender

2022-01-26 Thread Dovid Bender
I tried that, it did not work. I assume I will need to make my own
function to play sounds?

On Tue, Jan 18, 2022 at 2:33 AM Israel Gottlieb  wrote:

>
>
> On Mon, Jan 17, 2022, 19:58 
> wrote:
>
>> Send asterisk-users mailing list submissions to
>> asterisk-users@lists.digium.com
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>> or, via email, send a message with subject or body 'help' to
>> asterisk-users-requ...@lists.digium.com
>>
>> You can reach the person managing the list at
>> asterisk-users-ow...@lists.digium.com
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of asterisk-users digest..."
>>
>>
>> Today's Topics:
>>
>>1. )
>>2. Re: How to escape the & in BackGround (Doug Lytle)
>>3. Re: How to escape the & in BackGround (Dovid Bender)
>>
>>
>> --
>>
>> Message: 1
>> Date: Sun, 16 Jan 2022 14:19:28 -0500
>> From: Dovid Bender 
>> To: Asterisk Users Mailing List - Non-Commercial Discussion
>> 
>> Subject: [asterisk-users] How to escape the & in BackGround
>> Message-ID:
>> <
>> cam3tth3asg-ed-dmy7rnrwora18ldfpndqxtmwtfsp_ahns...@mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Hi,
>>
>> I am trying to play a sound file from AWS S3. The URL is something like
>> this http://example.org?foo=bar=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?
>> -- next part ------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://lists.digium.com/pipermail/asterisk-users/attachments/20220116/e8325ce8/attachment-0001.html
>> >
>>
>> --
>>
>> Message: 2
>> Date: Sun, 16 Jan 2022 16:10:39 -0500
>> From: Doug Lytle 
>> To: asterisk-users@lists.digium.com
>> Subject: Re: [asterisk-users] How to escape the & in BackGround
>> Message-ID:
>> 
>> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>>
>> On 1/16/22 2:19 PM, Dovid Bender wrote:
>> > Does anyone know a way of telling Asterisk that & is part of the URL
>> > and to pass it along as a string?
>>
>> Try enclosing the URL in single quotes,
>>
>> Doug
>> -- next part --
>> An HTML attachment was scrubbed...
>> URL: <
>> http://lists.digium.com/pipermail/asterisk-users/attachments/20220116/a2824e19/attachment-0001.html
>> >
>>
>> --
>>
>> Message: 3
>> Date: Sun, 16 Jan 2022 16:39:13 -0500
>> From: Dovid Bender 
>> To: Asterisk Users Mailing List - Non-Commercial Discussion
>> 
>> Subject: Re: [asterisk-users] How to escape the & in BackGround
>> Message-ID:
>> > f09d66jv0fbomkfbym...@mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> I tried single quotes, double quotes, backslash etc and none of it worked
>>
>> On Sun, Jan 16, 2022 at 16:11 Doug Lytle  wrote:
>>
>> > On 1/16/22 2:19 PM, Dovid Bender wrote:
>> >
>> > Does anyone know a way of telling Asterisk that & is part of the URL and
>> > to pass it along as a string?
>> >
>> >
>> > Try enclosing the URL in single quotes,
>> >
>> > Doug
>> >
>> > --
>> > _
>> > -- 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

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

2022-01-18 Thread John Runyon
${SPRINTF(%c,38)}
or
%26

should work, I think.

On Sun, 16 Jan 2022 at 13:21, Dovid Bender  wrote:

> Hi,
>
> I am trying to play a sound file from AWS S3. The URL is something like
> this http://example.org?foo=bar=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

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

2022-01-16 Thread Dovid Bender
I tried single quotes, double quotes, backslash etc and none of it worked

On Sun, Jan 16, 2022 at 16:11 Doug Lytle  wrote:

> On 1/16/22 2:19 PM, Dovid Bender wrote:
>
> Does anyone know a way of telling Asterisk that & is part of the URL and
> to pass it along as a string?
>
>
> Try enclosing the URL in single quotes,
>
> Doug
>
> --
> _
> -- 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
-- 
_
-- 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

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

2022-01-16 Thread Doug Lytle

On 1/16/22 2:19 PM, Dovid Bender wrote:
Does anyone know a way of telling Asterisk that & is part of the URL 
and to pass it along as a string?


Try enclosing the URL in single quotes,

Doug
-- 
_
-- 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