[Asterisk-Users] Re: Asterisk and a SPA3000 behind NATpeerregistration

Alchaemist info at lnet.com.ar
Wed Sep 21 21:14:11 MST 2005


Hi Lan,

SPA 3000 <----> NAT <-----> Internet < NAT> Asterisk

That is two NATs... so, as it is, it will NEVER work, so you have only one 
way to go.
This is the recipe:

1- Asterisk side, MUST have SIP/RTP ports forwarded in your router
2- RTP ports must be a fixed range in rtp.conf
    [general]
    ; RTP start and RTP end configure start and end addresses
    rtpstart=5061 (whatever range you want to add here...)
    rtpend=5099
3- Asterisk must be told that is using NAT in sip.conf
    nat=yes
    externip=123.123.123.123 (your external IP address)
    localnet=192.168.0.1/255.255.255.0 (your local IP range)
4- The extensions must be configured for NAT
    qualify=yes
    nat=yes
5- Configure a fixed port range for the RTP in the Sipura
6- Forward the SIP ports (Line 1 & PSTN Line) AND the RTP portson the router


That way should work flawlessly.
If it is too much bother to forward ports or ranges of ports, and you don't 
care for security, particullarly in the asterisk, then configure the DMZ of 
both routers to their respective device IP (Asterisk and SPA).

Without Forwarding or DMZ you will never be able to do it...

Now... if you have dynamic IP in the asterisk... things change.... because 
Asterisk must know in sip.conf the external IP.
I think I read in this list, that the best (only?) way to get arround, is to 
place a script that detects the external IP when it changes,updates sip.conf 
(preferably another conf like sip_nat.conf that is included into sip.conf), 
and then uses the CLI to reload the sip configuration, you have a command I 
cannot recall right now to only reload that part instead of the whole bunch 
of confs.

Cheers!
Alchaemist


"Maps" <mapsair at hotmail.com> wrote in message 
news:BAY103-DAV12333C5F4ADB028E2A01CFBA970 at phx.gbl...
> Dear Richard and supporters!
> I see that you guys could be able to setup the SPA 3000 to connect to the
> asterisk thru the NAT.  I don't know how would to do this.  As my 
> understand
> is that the SPA 3000 is just able to configure with the SIP that not NAT
> aware in Asterisk.
> I am trying to configure the SPA 3000 <----> NAT <-----> Internet < NAT>
> Asterisk, but I am unsuccess to do that.
> Also I have the SPA2100 and try to do the same thing.
>
> If you guys could be able to do so.  Would you PLEASE tell me how could I 
> do
> that?  or please direct me to the information where I can find out the way
> to setup that up!  I am very appreciated
>
>
> Thanks in advance!
>
> Lan
>
>
>>
>> > Hi,
>> >
>> >         I have a little situation here :( Perhaps somebody can give me 
>> > a
>> > hand with it.
>> >
>> >         I have an Asterisk working, and in another office, a Sipura
>> > SPA-3000.
>> >         I configured the SPA and I have the extension working, the
> incomming
>> > trunk working, but the outgoing trunk (peer) does not work.
>> >
>> >         The issue is that I have a dynamic IP where the SPA is, and
> neither
>> > the SPA nor my router have DynamicDNS.
>> >         So, if I manually change the host for the peer for the SPA PSTN
>> > Line, then everything works fine, and I can make local calls through 
>> > it.
>> >         BUT when my router's IP changes... I am lost. (EVEN while the
>> > extension SPAN Line 1, or the incomming trunk are registered and DO
> work.)
>> >
>> >         According to what I read, if I setup the outgoing trunk to
> type=peer
>> > with host=dynamic, then I can make the peer to register itself into the
>> > Asterisk, so the asterisk will know where to contact the peer.
>> >         But.... I cannot figure out how to make the SPA register as the
>> > peer? I can make it register as a type=friend for the incomming 
>> > traffic,
> but
>> > not as a peer..
>>
>> Don't bother with the peer.
>>
>> Define both the Line1 and PSTN ports on the SPA to register with asterisk
>> using different UserID/Passwords for each, use port 5060 for one and 5061
>> for the other, and in asterisk's sip.conf file define them as 
>> type=friend.
>>
>> It does work just fine that way.
>>
>>
>> _______________________________________________
>> --Bandwidth and Colocation sponsored by Easynews.com --
>>
>> Asterisk-Users mailing list
>> Asterisk-Users at lists.digium.com
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>
> _______________________________________________
> --Bandwidth and Colocation sponsored by Easynews.com --
>
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
> 






More information about the asterisk-users mailing list