[Freeswitch-users] Outbound dialing to SPA3102 behind NAT
Nick Rosier
nick.rosier at gmail.com
Mon Mar 21 00:28:17 MSK 2011
I've using Bluebox to configure the FS. I've defined a gateway as following:
<gateways>
<gateway name="trunk1">
<param name="realm" value=""/>
<param name="username" value="trunk1"/>
<param name="password" value="trunk1"/>
<param name="register" value="false"/>
</gateway>
</gateways>
sofia status show the SPA3102:
Call-ID: abb17a79-760cd2dc at 192.168.1.153
User: trunk1 at pbx.domain
Contact: Trunk1
<sip:trunk1@<internal-ip>:5078;transport=tcp;fs_nat=yes;fs_path=sip%3Atrunk1%40<external-ip>%3A5078%3Btransport%3Dtcp>
Agent: Linksys/SPA3102-5.1.10(GW)
Status: Registered(TCP-NAT)(unknown) EXP(2011-03-20 23:04:09)
EXPSECS(2795)
Host: pbx.domain
IP: <external-ip>
Port: 5078
Auth-User: unknown
Auth-Realm: pbx.domain
MWI-Account: trunk1 at pbx.domain
I can see the dialplan matching but nothing happens; from the log it
looks like the dialing fails instantly:
2011-03-20 22:14:47.713322 [DEBUG] sofia.c:4581 Channel
sofia/sipinterface_1/ entering state [calling][0]
2011-03-20 22:14:47.713322 [DEBUG] sofia.c:4581 Channel
sofia/sipinterface_1/ entering state [terminated][503]
Any ideas what else I need to do?
Rgds,
N.
On 20 March 2011 10:38, <covici at ccs.covici.com> wrote:
> Only way I can think of is have the spa3102 register as an fs gateway
> using user name and password and bridge to the gateway -- and make sure
> natis enabled on the 3102, so fs can detect its external ip address.
>
> Nick Rosier <nick.rosier at gmail.com> wrote:
>
>> 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.
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>
> --
> Your life is like a penny. You're going to lose it. The question is:
> How do
> you spend it?
>
> John Covici
> covici at ccs.covici.com
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
More information about the FreeSWITCH-users
mailing list