[Freeswitch-users] Complex phrase macro

Alex Lake alex at digitalmail.com
Wed Jul 29 15:46:58 MSD 2015


BTW - Is something like this possible (using recursion):

     <macro name="xplayN">
         <input pattern="(.*),(.*),(.*)">
             <match>
                 <action function="play-file" data="$1/$2.wav"/>
                 <action function="play-file" data="phrase:xplayN:$1,$3"/>
             </match>
         </input>
         <input pattern="(.*),(.*)">
             <match>
                 <action function="play-file" data="$1/$2.wav"/>
             </match>
         </input>
     </macro>


On 29/07/2015 12:42, Alex Lake wrote:
> I'd like a macro that can play multiple sound files from a specific
> directory.
>
> eg. here's one that should (though I've not tested it!) play 3 sound files:
>
>         phrase "xplay3:/home/pabx/004-3774/x,001,002,003"
>
>       <macro name="xplay3">
>         <input pattern="(.*),(.*),(.*),(.*)">
>           <match>
>             <action function="play-file" data="$1/$2.wav"/>
>             <action function="play-file" data="$1/$3.wav"/>
>             <action function="play-file" data="$1/$4.wav"/>
>           </match>
>         </input>
>       </macro>
>
> What I'd like to do is one that can play an arbitrary number of files.
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>




Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list