How to use multiple applications in a single call file

Hi all,

I want to use multiple applications and data in a single call file.

Requirement:

I want to call a number and called party will get an audio and then I need the DTMF input provided by called party.

I have tried using call file.

I am able to call a number and called number was getting audio file but I am not getting DTMF input because call was dropping after completing the audio.

I have used below call file.

Channel: DAHDI/g0/XXXXXXXXXX
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Priority: 1
Application: Background
data: ./custom/IVR

Then I tried to multiple applications like below call file but I am not getting audio file but I am getting the DTMF input provided by called party.

Channel: DAHDI/g0/9493634373
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Priority: 1
Application: Background
data: ./custom/IVR
Application: Read
data: NUMBER,1,3,3
set: CDR(userfield)=${NUMBER}

Thanks in advance.

You can not use multiple applications. You would have to direct it to the dialplan to do so.

Thank you jcolp,

I have directed to the dialplan and it’s working.

But I don’t want to direct to dialplan because my background file will change for every call file and I don’t want to reload the services/modules.
Can we do this with call file or is there any way to generate the dynamic context in dialplan.

Requirement:

Asterisk server will get the audio file and call file.
Audio file will vary for every call file
Called party will get the audio and provide us the DTMF input. We need to save that DTMF input into CDR.

if you set Variable in call file.
you can use variable at dial-plan for playback.

Hi,
Thank you,

If I set variable in call file, can that variable will automatically change the background audio file name.
Can you please brief me what it will do.

Please find the below requirement.

My background file will vary for every call file and I don’t want to reload the services/modules.

Asterisk server will get the audio file and call file.
Audio file will vary for every call file
Called party will get the audio and provide us the DTMF input. We need to save that DTMF input into CDR.

Thanks in advance

If I set FILE_NAME variable in call file,
you can use it for playback at dial-plan. like this…

exten => _XXXX.,n, Playback(${FILE_NAME})

Thank you very much hsunryou,

It’s working with
setvar: FILE_NAME= in call file and

exten => s,n,Background(${FILE_NAME}) in dialplan