[Home]

Summary:ASTERISK-01737: In NoOp and System , is still converted to |
Reporter:ewieling (ewieling)Labels:
Date Opened:2004-06-01 09:24:27Date Closed:2011-06-07 14:10:03
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When calling System or NoOp ,s are still converted to |s

****** ADDITIONAL INFORMATION ******

exten => 801,1,NoOp(I love Asterisk, but it has it's quirks)

exten => 802,1,System(echo I love Asterisk, but it has it's quirks > /dev/null)


   -- Starting simple switch on 'Zap/2-1'
   -- Executing NoOp("Zap/2-1", "I love Asterisk| but it has it's quirks") in new stack
   -- Hungup 'Zap/2-1'

   -- Starting simple switch on 'Zap/2-1'
   -- Executing System("Zap/2-1", "echo I love Asterisk| but it has it's quirks > /dev/null") in new stack
   -- Hungup 'Zap/2-1'
Comments:By: Mark Spencer (markster) 2004-06-01 10:55:55

This isn't a bug.  This is just the way the syntax works.  app(foo,bar) is always equivalent to app,foo|bar but you can bypass it by using the following syntax:

exten => 801,1,Noop,"I love Asterisk, but it's got its quirks."

By: ewieling (ewieling) 2004-06-04 09:29:57

Also happens with quotes.

exten => 0,7,System(/bin/echo "AST_CAUSE_NOTDEFINED received when dialing ${SAVED_EXTEN}, trying again using ${SAVED_ARG1}." | /bin/mail -s "WAVELAND PBX ERROR" pbxadmin-pager@stirlingprop.com)


   -- Executing System("Zap/2-1", "/bin/echo "AST_CAUSE_NOTDEFINED received when dialing 95048587689| trying again using IAX2/XXX@NuFone/15048587689." | /bin/mail -s "WAVELAND PBX ERROR" pbxadmin-pager@stirlingprop.com") in new stack

By: Mark Spencer (markster) 2004-06-05 18:19:47

The important part of my previous example was that you used Foo,bar,baz and NOT Foo(bar,baz).  

However, that still won't let you escape quotes yet, so I did the following to work around it:

[globals]
COMMA=,

and then:


Which produced the following output:
exten => 559,1,System(echo "I love Asterisk${COMMA} the PBX")

*CLI> dial 559
   -- Executing System("OSS/dsp", "echo "I love Asterisk, the PBX"") in new stack
I love Asterisk, the PBX
*CLI>

If you want to provide a feature to do it more intuitively I'm certainly willing to consider it, but this is really not a bug -- it's just the way it's had to historically evolve.