Hi Michael, m...@freeswitch.org (Michael Collins) writes:
> On Wed, Oct 14, 2009 at 3:01 PM, Simon J Mudd <sjm...@pobox.com> wrote: > > > I'm trying to build up a soho dialplan to replicate an existing Asterisk > > setup I want to replace. ... > > My question is how do I avoid repeatedly using these same 8-9 lines and > > "merge" this into some macro which given the right parameters allows me > > to define various extensions using different gateways but all configured > > "the same way"? > > > > Thanks for any pointers to how this should be done. > > Try using the execute_extension app. It's kinda like a gosub in BASIC: it'll > go and execute an extension and then come back and continue executing. Put > all those lines into a single extension and then call them from other > extensions via execute_extension. OK. That looks clear. However it doesn't look as if it's possible to pass parameters this way which means that data can only be passed to the "extension" via variables. That works but isn't so clean. I'll check this out further shortly. I'm planning later to pass info like "which gateway to talk to" and perhaps some sort of flag which indicates "record: yes/no", and even include the bridge application into this extension/macro. That reduces the original dialplan pattern matching to a much simpler and easier to configure setup for me. excecute_extension does avoid a lot of redundancy, so thanks for the pointer. I'll get that working first. Simon _______________________________________________ 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