"Preprocessor" Variables
Those are the variables indicated by the syntax $${varname}. In a way, those are not actual variables, but they act as read-only ones. You assign them in one of the FreeSWITCH configuration files (/usr/local/freeswitch/conf/vars.xml), and then they are literally substituted at startup when encountered. This is exactly the same as the #define construct in C preprocessor, or a "Find and Replace" command in a text editor.
<X-PRE-PROCESS cmd="set" data="hold_music=local_stream://moh"/>
In this example, by editing the vars.xml configuration file you alter the value that will be substituted in all configuration files (dialplan included) when "$${hold_music} " is encountered. If you then write in dialplan:
<action application="set" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access