Конфиг.
Код:
<?xml version="1.0"?>
<document type="freeswitch/xml">
<X-PRE-PROCESS cmd="set" data="local_address=10.0.0.1"/>
<X-PRE-PROCESS cmd="set" data="sound_prefix=$${sounds_dir}/en/us/callie"/>
<section name="configuration">
<configuration name="switch.conf">
<settings>
<param name="colorize-console" value="true"/>
<param name="max-sessions" value="1000"/>
<param name="sessions-per-second" value="30"/>
<param name="loglevel" value="debug"/>
</settings>
</configuration>
<configuration name="modules.conf">
<modules>
<load module="mod_console"/>
<load module="mod_logfile"/>
<!-- <load module="mod_event_socket"/> -->
<load module="mod_sofia"/>
<load module="mod_spandsp"/>
<load module="mod_dialplan_xml"/>
<load module="mod_dptools"/>
<load module="mod_commands"/>
<load module="mod_expr"/>
<load module="mod_sndfile"/>
</modules>
</configuration>
<configuration name="console.conf">
<mappings>
<map name="all" value="console,debug,info,notice,warning,err,crit,alert"/>
</mappings>
<settings>
<param name="colorize" value="true"/>
<param name="loglevel" value="info"/>
</settings>
</configuration>
<configuration name="logfile.conf">
<settings>
<param name="rotate-on-hup" value="true"/>
</settings>
<profiles>
<profile name="default">
<settings>
<param name="logfile" value="/var/log/freeswitch/freeswitch.log"/>
<param name="rollover" value="10485760"/>
</settings>
<mappings>
<map name="all" value="debug,info,notice,warning,err,crit,alert"/>
</mappings>
</profile>
</profiles>
</configuration>
<configuration name="sofia.conf">
<global_settings>
<param name="log-level" value="0"/>
<param name="debug-presence" value="0"/>
</global_settings>
<profiles>
<profile name="local">
<domains>
<domain name="all" alias="true" parse="false"/>
</domains>
<settings>
<param name="context" value="local"/>
<param name="sip-port" value="5060"/>
<param name="dialplan" value="XML"/>
<param name="rtp-ip" value="$${local_address}"/>
<param name="sip-ip" value="$${local_address}"/>
<param name="auth-calls" value="true"/>
</settings>
</profile>
</profiles>
</configuration>
</section>
<section name="dialplan">
<context name="local">
<extension name="local-accounts">
<condition field="destination_number" expression="^(300[1246-9])$">
<action application="tone_detect" data="fax 1100 r +5000 transfer fax XML context_1"/>
<action application="bridge" data="user/$1@$${local_address}"/>
</condition>
</extension>
<extension name="fax-user">
<condition field="destination_number" expression="^(3005)$">
<action application="tone_detect" data="fax 1100 r +5000 transfer fax XML context_1"/>
<action application="set" data="hangup_after_bridge=false"/>
<action application="bridge" data="user/3005@$${local_address}"/>
</condition>
</extension>
<extension name="fax">
<condition field="destination_number" expression="^fax$">
<action application="answer" />
<action application="playback" data="silence_stream://2000"/>
<action application="set" data="fax_enable_t38=true"/>
<action application="set" data="fax_enable_t38_request=true"/>
<action application="rxfax" data="/usr/local/fax/${caller_id_number}-${strftime(%Y-%m-%d-%H-%M-%S)}.tif"/>
</condition>
</extension>
</context>
</section>
<section name="directory">
<domain name="$${local_address}">
<params>
<param name="dial-string" value="{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
</params>
<groups>
<group name="local">
<users>
<user id="3001"><params><param name="password" value="***"/></params></user>
<user id="3002"><params><param name="password" value="***"/></params></user>
<user id="3003"><params><param name="password" value="***"/></params></user>
<user id="3004"><params><param name="password" value="***"/></params></user>
<user id="3005"><params><param name="password" value="***"/></params></user>
<user id="3006"><params><param name="password" value="***"/></params></user>
<user id="3007"><params><param name="password" value="***"/></params></user>
<user id="3008"><params><param name="password" value="***"/></params></user>
</users>
</group>
</groups>
</domain>
</section>
</document>