[Freeswitch-users] dialplan xml pre-process include other xml

Michael Jerris mike at jerris.com
Thu Nov 29 20:36:09 UTC 2018


https://freeswitch.org/confluence/display/FREESWITCH/Understanding+the+Configuration+Files#UnderstandingtheConfigurationFiles-include

> On Nov 16, 2018, at 2:40 PM, Allen Underdown <allen at praecom.com> wrote:
> 
> I'm having a problem understanding the steps and/or proper formatting of including a xml file inside a "host" xml file within the dial plan.
> 
> I have limited access to the dial plan, so need to insert a call to a file in a different directory for a customized extension.
> 
> Example - in /dialplan/somedialplan.xml
> 
> <?xml version="1.0"?>
> <document type="freeswitch/xml">
>   <section name="dialplan" description="Dialplan">
>    <context name="default">
>     <extension name="nowhere">
>     <blah>
>     </extension>
>    </context>
>  </section>
> </document>
> 
> I want to add:
> <X-PRE-PROCESS cmd="include" data="/custom-dir/custom_dial.xml"/> so that every time somedialplan.xml is
> read, custom_dial.xml is included.
> 
> I've tried adding it after the section name, and after the context, but it's never parsed (according to watching fs_cli).
> 
> So I can't seem to figure out where to put it and have it parsed. I'm also a bit confused on exactly the XML required
> in custom_dial.xml. Do I need to specify the context that I want the extension executed in?
> 
> In custom_dial.xml I've tried using with and without the <include> tags. I've scoured freeswitch.org but can't seem to
> find the documentation in a way that I can figure this out.




More information about the FreeSWITCH-users mailing list