hi all,
It does work for me.
SIP: C1(2001) <--> FS1(PBX) <--> FS2(RTP) <--> C2(2002)
RTP: C1(2001) <--> FS2(RTP) <--> C2(2002)
FS1: 192.168.10.150, internal port 5090, external port 5091
FS2: 192.168.10.157, internal port 5060, external port 5080
1. Setting FS1(PBX)
$ cd /usr/local/freeswitch/conf/dialplan
$ vi default.xml
# add this setting
<extension name="phone to FS2 server">
<condition field="destination_number" expression="^([2].*)$">
<action application="set" data="bypass_media_after_bridge=true"/>
<action application="bridge" data="sofia/external/sip:${destination_number}@192.168.10.157:5080" />
</condition>
</extension>
$ vi public.xml
# add this setting
<extension name="Local_Extension">
<condition field="destination_number" expression="^([2]0[01][0-9])$">
<action application="set" data="bypass_media_after_bridge=true"/>
<action application="export" data="dialed_extension=$1"/>
<action application="set" data="ringback=${us-ring}"/>
<action application="set" data="transfer_ringback=$${hold_music}"/>
<action application="set" data="call_timeout=30"/>
<action application="bridge" data="user/${dialed_extension}@${domain_name}"/>
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/>
</condition>
</extension>
2. Setting FS2(RTP)
$ cd /usr/local/freeswitch/conf/dialplan
$ vi public.xml
# add this setting
<extension name="transfrom_call">
<condition field="destination_number" expression="^[2].*$">
<action application="set" data="bypass_media=false" />
<action application="set" data="disable-transcoding=true"/>
<action application="bridge" data="sofia/external/sip:${destination_number}@192.168.10.150:5091" />
</condition>
</extension>
Copy From:
http://freeswitch-users.2379917.n2.nabble.com/FreeSwitch-Proxy-RTPProxy-Media-server-td7590972.html