[Freeswitch-users] <macro> levels of <input pattern>?

Michael Collins msc at freeswitch.org
Sat Jan 19 02:15:45 MSK 2013


No, you can't nest them like that. But you can stack multiple patterns
inside a pattern and use break_on_match="true" to prevent further matching
attempts inside that macro. Look at "voicemail_message_count" macro in the
vanilla configs for a good example of that.

-MC

On Fri, Jan 18, 2013 at 2:00 PM, Jakob <freeswitch at orresta.no-ip.com> wrote:

> Hi,
>
> Can you make a construct like below? Match the second argument within a
> match statement. Or are there a switch statement that can be used?
>
>          <macro name="voicemail_message_count">
>                  <input pattern="^(1):(.*)$">
>                          <match>
>                                  <input pattern="(.*):(new)$">
>                                          <match>
>                                          </match>
>                                  </input>
>                                  <input pattern="(.*):(saved)$">
>                                          <match>
>                                          </match>
>                                  </input>
>                                  <input pattern="(.*):(urgent)$">
>                                          <match>
>                                          </match>
>                                  </input>
>                          </match>
>                          <nomatch>
>                          </nomatch>
>                  </input>
>          </macro>
>
> Best Regards
> Jakob
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.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
>



-- 
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130118/1aac329f/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list