Help with Dial Plan issue

Disclaimer: new to Asterisk!

Hello,
I have this:

;same=>n,Playback(/var/lib/asterisk/sounds/edc/greeting) same=>n,Background(/var/lib/asterisk/sounds/edc/greeting&/var/lib/asterisk/sounds/edc/options) same=>n,Saydigits(${orderfour})

Notice that I used to use Playback… which would say a greeting, then Saydigits would say 4 numbers.
When I moved to “Background”, Saydigits no longer works.

I have read about Background(digits/)… but I must be using an incorrect syntax or something, as it didn’t work.

Any ideas to get the four digits to speak in between ‘greeting’ and ‘options’?

Thanks!
Donovan

same=>n,Background(/var/lib/asterisk/sounds/edc/greeting)
same=>n,Saydigits(${orderfour})
same=>n,Background(/var/lib/asterisk/sounds/edc/options)

Okay, the above works… but of course, a user can’t DTMF when the Saydigits is being read… I guess that is okay, but not ideal.

Donovan

I came across this issue when searching for a solution to “background” saydigits.

Could not find anything so I have made up the following univeral to use (any lenght input) sub-routine.

[sub-backgrounddigits]

exten => start,1,Verbose(1, "SUB routine to play ( ${ARG1} ) a integer as separate digits in background)

same = n,Set(dign=1)
same = n,Set(bgd=digits/${ARG1:0:1)
same = n,While($[${dign} < ${LEN(${ARG1})}])
same = n,Set(bgd=${bgd}&digits/${ARG1:${dign}:1})
same = n,NoOp(${bgd})
same = n,set(dign=$[${dign} + 1])
same = n,EndWhile
same = n,Verbose(backgrounddigits playlist = ${bgd})
same = n,Return()

To call this sub as a test which plays the pin input both as Saydigits and as background:

[from-internal]

exten = 1255,1,Verbose(1,test the background digits playlist routine)

same = n,Answer()
same = n,Read(testinput,conf-getpin,,,,5)
same = n,SayDigits(${testinput})
same = n,GoSub(sub-backgrounddigits,start,1(${testinput}))
same = n,Background(hello-world&${bgd})
same = n,WaitExten(10)
same = n,Hangup()