Hi,
I have a use case using ESL, where I need to originate a call from from Freeswitch to a mobile number and play a .wav after the recipient has answered the call.
I am using following way to achieve this :
Step 1 . Issue esl command = ""originate " + gateway + "+91" + phone_number + " &park""
Step 2. command = ""uuid_transfer " + uuid + " 4441""
where dialplan 4441 has :
<extension name="ivr_demo">
<condition field="destination_number" expression="^4441$">
<action application="playback" data="/usr/local/freeswitch/recordings/file.wav"/>
<action application="sleep" data="1000"/>
</condition>
</extension>
This works fine but sometimes, after answering of the call, listener does not hear anything, file does not play.
If I do not use the park command and directly transfer to dialplan then the file starts playing immediately even if the user has not answered. How can I add a condition of answering in dialplan (<action application="answer"/> does not work).
Is any other alternative to achieve this correctly.
Regards,
Deepika