exten => s,5,BackGround,my-custom-sound
The parameter (blabla) can be quoted with double quotes ("blabla"). In this case, a comma does not terminate the field. However, the double quotes will be passed down to the Background command, in this example.
Special characters that must be escaped to be used literally, are "[", "]", "\" (backslash) and " (double quote).
Dollar sign "$" does not require escaping, as long as it doesn't trigger variable expansion or expression evaluation (i.e. "$[" or "${"), - in that case you'd have to either surround it with double quotes or escape the next character with a backslash (See example code below).
Double quotes and escapes are evaluated at the level of the asterisk config file parser.
Double quotes can also be used inside expressions, as discussed later.
; Comma truncation exten => s,1,Verbose(Hi, James!) ; <- , James! exten => s,2,Verbose("Hi, James!") ; <- "Hi, James!" ; Variable expansion exten => s,1,Verbose(${EXTEN} is a standard variable) ; <- s is a standard variable exten => s,2,Verbose($\{EXTEN} is a standard variable) ; <- ${EXTEN} is a standard variable exten => s,3,Verbose("$"{EXTEN} is a standard variable) ; <- ${EXTEN} is a standard variable ; Expression expansion exten => s,1,Verbose(:-] smile!) ; <- (Syntax error) exten => s,2,Verbose(:-\] smile!) ; <- :-] smile! ; Quote stripping exten => s,1,Verbose("haxxor1337" is calling) ; <- haxxor1337 is calling exten => s,2,Verbose(\"haxxor1337\" is calling) ; <- "haxxor1337" is calling