It's because the whole dialplan is templated and I wanted to have one piece of data that could neatly go in.
Lua would have been a possibility, I guess, but I quite like the phrase macro system.

On 29/07/2015 18:16, Michael Jerris wrote:
Or even dialplan. When would this actually add any value over maybe just calling playback multiple times in a row?

On Jul 29, 2015, at 1:02 PM, Stanislav Sinyagin <ssinyagin@gmail.com> wrote:

Why not just using Lua instead?

On Jul 29, 2015 3:08 PM, "Alex Lake" <alex@digitalmail.com> wrote:
OK - Got this working. Just in case anyone is interested:

     <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>

Example of use:

       <action application="playback"
data="phrase:xplayN:/home/pabx/004-3774/x,001,0211,0221,0231"/>



_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
consulting@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org