[Freeswitch-users] Outbound dialing to SPA3102 behind NAT

Nick Rosier nick.rosier at gmail.com
Sat Mar 19 20:03:18 MSK 2011


Hi,

I've currently got an Asterisk server running at home but want to
switch to FS on my external server (located in a DC).

Configuration:
- 2 SPA3102 connected to 2 PSTN lines and 2 phones (on Line1)
- Couple of voip phones

The Asterisk server is running on my local network as are all the
other devices; everything is connected to a DSL-router with NAT.
The SPA3102 are configured as Trunks in Asterisk with the following
configuration:
allow=ulaw
canreinvite=no
context=from-trunk
disallow=all
dtmfmode=rfc2833
host=dynamic
incominglimit=1
nat=never
port=5061
qualify=yes
secret=trunk1
username=trunk1
type=friend

The SPA3102 are configured to register their PSTN-line to the Asterisk
server. Outbound routes are configured to use 1 of the 2 Trunks.

I want to do the same thing with my FS running on a server in the DC.
I've setup all the devices and can make internal calls. Inbound calls
on the PSTN lines are also forwarded to the correct voip-devices. I
just cannot figure out how to configure outbound dialing to the
PSTN-lines. The Wiki
(http://wiki.freeswitch.org/wiki/SPA3102_FreeSwitch_HowTo) shows I
should configure them as following:

<include>
  <extension name="To PSTN">
    <condition field="destination_number" expression="(.*)">
      <action application="bridge"
data="sofia/internal/${destination_number}@[IP address of
SPA3102]:5061" />
    </condition>
  </extension>
</include>

The problem here is that the SPA3102 are behind my router so the only
possibility would be to setup some port forwarding to on the router
with different ports for the 2 devices. I would rather not do that so
I was wondering if there is an easier/better way to do that.

Any ideas?

Rgds,
N.



More information about the FreeSWITCH-users mailing list