Play Background & Read

I want to give caller ability to choosing while play message.
I try this

exten=6007,1,Background(to-reach-operator)
exten=6007,2,Background(abandon-all-hope)
exten=6007,3,Read(NUMBER,1)
exten=6007,n,SayNumber(${NUMBER})
exten=6007,n,Goto(3)

the result is hangup. it’s work only if the coller respond after the two message ended, why? how fix it?

I think you can’t number some priorities and then use “n” for the next priority, you have to use “n” just after the first priority, like this:

exten=6007,1,Background(to-reach-operator)
exten=6007,n,Background(abandon-all-hope)
exten=6007,n,Read(NUMBER,1)

but then you can’t use Goto, so try this way:

exten=6007,1,Background(to-reach-operator)
exten=6007,2,Background(abandon-all-hope)
exten=6007,3,Read(NUMBER,1)
exten=6007,4,SayNumber(${NUMBER})
exten=6007,5,Goto(3)

Regards.

Marco Bruni

I try:

exten=6007,1,Background(to-reach-operator)
exten=6007,2,Background(abandon-all-hope)
exten=6007,3,Read(NUMBER,1)
exten=6007,4,SayNumber(${NUMBER})
exten=6007,5,Goto(3)

but it’s still not work!

Please set the verbose level at least to 3, then do a call and post the cli log, so we should be able to see what’s going wrong.

Regards.

Marco Bruni

the true answer about Background is:
Background not intend to work with read. the Background work like a menue, so we need to catch a digit, we add rows like:

exten => 2,1,Playback(sorry)
exten => 2,2,Hangup()

or if you need to read to variable do that instead.

exten=i,1,SayNumber(${INVALID_EXTEN})

but you can do the only one per each context(this is true??). the main porpose of i is trap mistake keys. but we can use with this as way to read into variable.

the true answer about Background is:
Background not intend to work with read. the Background work like a menue, so we need to catch a digit, we add rows like:

exten => 2,1,Playback(sorry)
exten => 2,2,Hangup()

or if you need to read to variable do that instead.

exten=i,1,SayNumber(${INVALID_EXTEN})

but you can do the only one per each context(this is true??). the main porpose of i is trap mistake keys. but we can use with this as way to read into variable.

Ok, now I understand more about your problem…so you can try use Read() to play a prompt while waiting for digits, because the second parameter of the Read() application is the name of an audio prompt, it’s played while waiting for digits.

Hope it helps.

Regards.

Marco Bruni

[quote=“mbruni”]Ok, now I understand more about your problem…so you can try use Read() to play a prompt while waiting for digits, because the second parameter of the Read() application is the name of an audio prompt, it’s played while waiting for digits.

Hope it helps.

Regards.

Marco Bruni[/quote]

OK, but I need to play message that compound with sequence of file that depend on CRM Data for this customer?