make preprocessor also be a tag for everyone who keeps begging for it

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6259 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-11-14 20:29:19 +00:00
parent 93b45edf30
commit 92476db4b9
3 changed files with 53 additions and 50 deletions

View File

@ -9,63 +9,66 @@
(note the double $$ which denotes preprocessor variables) (note the double $$ which denotes preprocessor variables)
#comment ==> A general comment such as this #comment ==> A general comment such as this
The preprocessor will compile the full xml document to ${prefix}/log/freeswitch.registry The preprocessor will compile the full xml document to ${prefix}/log/freeswitch.xml.fsxml
Don't modify it while freeswitch is running cos it is mem mapped in most cases =D Don't modify it while freeswitch is running cos it is mem mapped in most cases =D
The same can be achieved with the <X-PRE-PROCESS> tag where the attrs 'cmd' and 'data' are
parsed in the same way.
--> -->
<!--#comment <!--#comment
vars.xml contains all the #set directives for the preprocessor. vars.xml contains all the #set directives for the preprocessor.
--> -->
<!--#include "vars.xml"--> <X-PRE-PROCESS cmd="include" data="vars.xml"/>
<section name="configuration" description="Various Configuration"> <section name="configuration" description="Various Configuration">
<!--#include "switch.conf.xml"--> <X-PRE-PROCESS cmd="include" data="switch.conf.xml"/>
<!--#include "modules.conf.xml"--> <X-PRE-PROCESS cmd="include" data="modules.conf.xml"/>
<!-- Order doesn't matter, but for clarity these are in same order as modules.conf.xml. <!-- Order doesn't matter, but for clarity these are in same order as modules.conf.xml.
If they aren't loaded by modules.conf.xml, then they are ignored. If they aren't loaded by modules.conf.xml, then they are ignored.
--> -->
<!-- Loggers --> <!-- Loggers -->
<!--#include "console.conf.xml"--> <X-PRE-PROCESS cmd="include" data="console.conf.xml"/>
<!--#include "syslog.conf.xml"--> <X-PRE-PROCESS cmd="include" data="syslog.conf.xml"/>
<!-- Multi-Faceted --> <!-- Multi-Faceted -->
<!--#include "enum.conf.xml"--> <X-PRE-PROCESS cmd="include" data="enum.conf.xml"/>
<!-- XML Interfaces --> <!-- XML Interfaces -->
<!--#include "xml_rpc.conf.xml"--> <X-PRE-PROCESS cmd="include" data="xml_rpc.conf.xml"/>
<!--#include "xml_cdr.conf.xml"--> <X-PRE-PROCESS cmd="include" data="xml_cdr.conf.xml"/>
<!--#include "xml_curl.conf.xml"--> <X-PRE-PROCESS cmd="include" data="xml_curl.conf.xml"/>
<!-- none for mod_xml_cdr --> <!-- none for mod_xml_cdr -->
<!-- Event Handlers --> <!-- Event Handlers -->
<!--#include "cdr.conf.xml"--> <X-PRE-PROCESS cmd="include" data="cdr.conf.xml"/>
<!--#include "event_multicast.conf.xml"--> <X-PRE-PROCESS cmd="include" data="event_multicast.conf.xml"/>
<!--#include "event_socket.conf.xml"--> <X-PRE-PROCESS cmd="include" data="event_socket.conf.xml"/>
<!--#include "xmpp_event.conf.xml"--> <X-PRE-PROCESS cmd="include" data="xmpp_event.conf.xml"/>
<!--#include "zeroconf.conf.xml"--> <X-PRE-PROCESS cmd="include" data="zeroconf.conf.xml"/>
<!-- Directory Interfaces --> <!-- Directory Interfaces -->
<!-- none for mod_ldap; dialplan_directory.conf.xml has ldap connection info --> <!-- none for mod_ldap; dialplan_directory.conf.xml has ldap connection info -->
<!-- Endpoints --> <!-- Endpoints -->
<!--#include "dingaling.conf.xml"--> <X-PRE-PROCESS cmd="include" data="dingaling.conf.xml"/>
<!--#include "iax.conf.xml"--> <X-PRE-PROCESS cmd="include" data="iax.conf.xml"/>
<!--#include "portaudio.conf.xml"--> <X-PRE-PROCESS cmd="include" data="portaudio.conf.xml"/>
<!--#include "alsa.conf.xml"--> <X-PRE-PROCESS cmd="include" data="alsa.conf.xml"/>
<!--#include "sofia.conf.xml"--> <X-PRE-PROCESS cmd="include" data="sofia.conf.xml"/>
<!--#include "wanpipe.conf.xml"--> <X-PRE-PROCESS cmd="include" data="wanpipe.conf.xml"/>
<!--#include "woomera.conf.xml"--> <X-PRE-PROCESS cmd="include" data="woomera.conf.xml"/>
<!-- Applications --> <!-- Applications -->
<!-- none for mod_bridgecall, mod_commands, mod_echo, mod_park, mod_playback --> <!-- none for mod_bridgecall, mod_commands, mod_echo, mod_park, mod_playback -->
<!--#include "conference.conf.xml"--> <X-PRE-PROCESS cmd="include" data="conference.conf.xml"/>
<!-- ivr.conf is used by mod_dptools --> <!-- ivr.conf is used by mod_dptools -->
<!--#include "ivr.conf.xml"--> <X-PRE-PROCESS cmd="include" data="ivr.conf.xml"/>
<!--#include "voicemail.conf.xml"--> <X-PRE-PROCESS cmd="include" data="voicemail.conf.xml"/>
<!--#include "limit.conf.xml"--> <X-PRE-PROCESS cmd="include" data="limit.conf.xml"/>
<!-- Dialplan Interfaces --> <!-- Dialplan Interfaces -->
<!--#include "dialplan_directory.conf.xml"--> <X-PRE-PROCESS cmd="include" data="dialplan_directory.conf.xml"/>
<!-- mod_dialplan_xml is configured in the separate "dialplan" section. --> <!-- mod_dialplan_xml is configured in the separate "dialplan" section. -->
<!-- Codec Interfaces --> <!-- Codec Interfaces -->
@ -76,41 +79,41 @@
<!-- no configuration needed --> <!-- no configuration needed -->
<!-- Languages --> <!-- Languages -->
<!--#include "spidermonkey.conf.xml"--> <X-PRE-PROCESS cmd="include" data="spidermonkey.conf.xml"/>
<!-- none for mod_perl --> <!-- none for mod_perl -->
<!--#include "java.conf.xml"--> <X-PRE-PROCESS cmd="include" data="java.conf.xml"/>
<!-- ASR /TTS --> <!-- ASR /TTS -->
<!-- none for mod_cepstral --> <!-- none for mod_cepstral -->
<!--#include "rss.conf.xml"--> <X-PRE-PROCESS cmd="include" data="rss.conf.xml"/>
<!--#include "mod_openmrcp.conf.xml"--> <X-PRE-PROCESS cmd="include" data="mod_openmrcp.conf.xml"/>
<!-- Say --> <!-- Say -->
<!-- none for mod_say_en --> <!-- none for mod_say_en -->
<!--#include "mod_cdr.conf.xml"--> <X-PRE-PROCESS cmd="include" data="mod_cdr.conf.xml"/>
<!--#include "mod_local_stream.conf.xml"--> <X-PRE-PROCESS cmd="include" data="mod_local_stream.conf.xml"/>
</section> </section>
<section name="dialplan" description="Regex/XML Dialplan"> <section name="dialplan" description="Regex/XML Dialplan">
<!--#include "dialplan/*.xml"--> <X-PRE-PROCESS cmd="include" data="dialplan/*.xml"/>
</section> </section>
<!-- mod_dingaling is reliant on the vcard data in the "directory" section. --> <!-- mod_dingaling is reliant on the vcard data in the "directory" section. -->
<!-- mod_sofia is reliant on the user data for authorization --> <!-- mod_sofia is reliant on the user data for authorization -->
<section name="directory" description="User Directory"> <section name="directory" description="User Directory">
<!--#include "directory/*.xml"--> <X-PRE-PROCESS cmd="include" data="directory/*.xml"/>
</section> </section>
<!-- phrases section (under development still) --> <!-- phrases section (under development still) -->
<section name="phrases" description="Speech Phrase Management"> <section name="phrases" description="Speech Phrase Management">
<macros> <macros>
<language name="en" sound-path="/snds" tts-engine="cepstral" tts-voice="david"> <language name="en" sound-path="/snds" tts-engine="cepstral" tts-voice="david">
<!--#include "lang_en.xml"--> <X-PRE-PROCESS cmd="include" data="lang_en.xml"/>
<!--voicemail_en_tts is purely implemented with tts, we need a files based implementation too --> <!--voicemail_en_tts is purely implemented with tts, we need a files based implementation too -->
<!--#include "voicemail_en_tts.xml"--> <X-PRE-PROCESS cmd="include" data="voicemail_en_tts.xml"/>
</language> </language>
<language name="fr" sound_path="/var/sounds/lang/fr/jean" tts_engine="cepstral" tts_voice="jean-pierre"> <language name="fr" sound_path="/var/sounds/lang/fr/jean" tts_engine="cepstral" tts_voice="jean-pierre">
<!--#include "lang_fr.xml"--> <X-PRE-PROCESS cmd="include" data="lang_fr.xml"/>
</language> </language>
</macros> </macros>
</section> </section>

View File

@ -1,5 +1,5 @@
<configuration name="sofia.conf" description="sofia Endpoint"> <configuration name="sofia.conf" description="sofia Endpoint">
<profiles> <profiles>
<!--#include "sip_profiles/*.xml" --> <X-PRE-PROCESS cmd="include" data="sip_profiles/*.xml"/>
</profiles> </profiles>
</configuration> </configuration>

View File

@ -1,23 +1,23 @@
<!-- Preprocessor Variables <!-- Preprocessor Variables
These are introduced when configuration strings must be consistent across modules. These are introduced when configuration strings must be consistent across modules.
--> -->
<!--#set "domain=$${local_ip_v4}"--> <X-PRE-PROCESS cmd="set" data="domain=$${local_ip_v4}"/>
<!-- sip_profile <!-- sip_profile
Must be a domain name if you are being a registry server; otherwise Must be a domain name if you are being a registry server; otherwise
can be any string. can be any string.
used by: sofia.conf.xml enum.conf.xml default_context.xml directory.xml used by: sofia.conf.xml enum.conf.xml default_context.xml directory.xml
--> -->
<!--#set "sip_profile=$${domain}"--> <X-PRE-PROCESS cmd="set" data="sip_profile=$${domain}"/>
<!--#set "nat_sip_profile=nat_$${domain}"--> <X-PRE-PROCESS cmd="set" data="nat_sip_profile=nat_$${domain}"/>
<!-- xmpp_client_profile and xmpp_server_profile <!-- xmpp_client_profile and xmpp_server_profile
xmpp_client_profile can be any string. xmpp_client_profile can be any string.
xmpp_server_profile is appended to "dingaling_" to form the database name xmpp_server_profile is appended to "dingaling_" to form the database name
containing the "subscriptions" table. containing the "subscriptions" table.
used by: dingaling.conf.xml enum.conf.xml used by: dingaling.conf.xml enum.conf.xml
--> -->
<!--#set "global_codec_prefs=PCMU@20i"--> <X-PRE-PROCESS cmd="set" data="global_codec_prefs=PCMU@20i"/>
<!--#set "xmpp_client_profile=xmppc"--> <X-PRE-PROCESS cmd="set" data="xmpp_client_profile=xmppc"/>
<!--#set "xmpp_server_profile=xmpps"--> <X-PRE-PROCESS cmd="set" data="xmpp_server_profile=xmpps"/>
<!-- bind_server_ip <!-- bind_server_ip
Can be an ip address, a dns name, or "auto". Can be an ip address, a dns name, or "auto".
This determines an ip address available on this host to bind. This determines an ip address available on this host to bind.
@ -25,21 +25,21 @@
use different addresses where this variable appears. use different addresses where this variable appears.
Used by: sofia.conf.xml dingaling.conf.xml Used by: sofia.conf.xml dingaling.conf.xml
--> -->
<!--#set "bind_server_ip=auto"--> <X-PRE-PROCESS cmd="set" data="bind_server_ip=auto"/>
<!-- external_rtp_ip <!-- external_rtp_ip
Used as the public IP address for SDP. Used as the public IP address for SDP.
Can be an ip address or a string like "stun:stun.server.com" Can be an ip address or a string like "stun:stun.server.com"
If unspecified, the bind_server_ip value is used. If unspecified, the bind_server_ip value is used.
Used by: sofia.conf.xml dingaling.conf.xml Used by: sofia.conf.xml dingaling.conf.xml
--> -->
<!--#set "external_rtp_ip=stun:stun.fwdnet.net"--> <X-PRE-PROCESS cmd="set" data="external_rtp_ip=stun:stun.fwdnet.net"/>
<!-- external_sip_ip <!-- external_sip_ip
Used as the public IP address for SDP. Used as the public IP address for SDP.
Can be an ip address or a string like "stun:stun.server.com" Can be an ip address or a string like "stun:stun.server.com"
If unspecified, the bind_server_ip value is used. If unspecified, the bind_server_ip value is used.
Used by: sofia.conf.xml dingaling.conf.xml Used by: sofia.conf.xml dingaling.conf.xml
--> -->
<!--#set "external_sip_ip=stun:stun.fwdnet.net"--> <X-PRE-PROCESS cmd="set" data="external_sip_ip=stun:stun.fwdnet.net"/>
<!-- server_name <!-- server_name
A public ip address or DNS name that is used when advertising conference A public ip address or DNS name that is used when advertising conference
presence or registering sip. presence or registering sip.
@ -49,6 +49,6 @@
The caller ID telephone number we should use when calling out. The caller ID telephone number we should use when calling out.
Used by: conference.conf.xml Used by: conference.conf.xml
--> -->
<!--#set "outbound_caller_name=FreeSWITCH"--> <X-PRE-PROCESS cmd="set" data="outbound_caller_name=FreeSWITCH"/>
<!--#set "outbound_caller_id=8777423583"--> <X-PRE-PROCESS cmd="set" data="outbound_caller_id=8777423583"/>