[Freeswitch-users] Check if an audio file exists to play an alternative one if not

Lucas Ducculi lucas at toptive.co
Fri Mar 19 19:57:03 UTC 2021


Different macros are defined in the phrases.xml file, I want to know if it
is possible to implement a condition in the macro to check if the audio
file exists and if not, play an alternative one.
Thanks.

<macro name="greeting">
    <input pattern="(.*)">
        <match>
            <action function="play-file"
data="/home/admin/freeswitch/conf/lang/en/ivr/wav/greeting.wav"/>
        </match>
    </input>
</macro>

-- 
Lucas Eduardo Dúcculi
Software Developer
 lucaseduc at hotmail.com
 +54 0358 4853837
 lucas at toptive.co
------------------------------
TOP TIER DEVELOPERS
Av. Italia 1684 - Plata Alta, Río Cuarto, Cba. Argentina
www.toptive.co
[image: LinkedIn icon] <https://www.linkedin.com/company/toptive> [image:
Facebook icon] <https://www.facebook.com/toptive/> [image: Facebook icon]
<https://www.instagram.com/toptierdevelopers/> [image: Facebook icon]
<https://medium.com/@toptive>

This email is confidential and for the exclusive use of the person(s) to
whom it is addressed. If you have received this email by mistake we ask you
to immediately notify the person who sent it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20210319/729ccd18/attachment.html>


More information about the FreeSWITCH-users mailing list