I am a beginner Asterisk developer .
I would like to know if there is a way to play an audio file during a call started with Dial() application.
My first attempt was to use Dial() with A(x) option in this way:
exten => 1000,1,Dial(DAHDI/1/number_to_call,20,A(audiofile1))
but it dials the number_to_call without playing audiofile1.
The second attempt was to use PlayBack() in this way:
exten => 1000,1,Dial(DAHDI/1/number_to_call,20)
exten => 1000,2,PlayBack(audiofile1)
but Dial() does not return if the called party off hook the phone (starting the call), so PlayBack() never starts while Dial() is “running”.
Can someone help me…?
Thanks in advance!!
I’m running CentOS 6 with Asterisk 1.8.24 and I’m using a TDM410 card with 2 FXO modules (channels 1 and 2) and 2 FXS modules (channels 3 and 4).