Asterisk – best practice to play multiple sound files in .call files

If you want to play multiple sound file with .call then you can send it like this:

Setvar: file_max=2
Setvar: file1=custom/1_message
Setvar: file2=custom/2_message

After that use asterisk’s dialplan to play files one-by-one. For example like this:

exten => 123,3,Set(i=0);
exten => 123,n(loop),Set(i=$[ ${i} + 1 ])
exten => 123,n,GotoIF($[ $i > ${file_max} ]?exit)
exten => 123,n,Playback(${file${i}})
exten => 123,n,Goto(loop)
exten => 123,n(exit),Noop(end)

Note, there will be alot of other issues with this task, i recomend you check opensource dialler code like vicidial or hire expert.

INET-EXPERT-TECHNOLOGY 2

Leave a Reply