[asterisk-users] PJSIP, NAT and STUN/ICE

O. Hartmann ohartmann at walstatt.org
Tue Oct 10 03:13:09 CDT 2017


Am Tue, 10 Oct 2017 09:32:54 +0200
Guido Falsi <mad at madpilot.net> schrieb:

> On 10/09/2017 23:56, O. Hartmann wrote:
> > I'm quite new to Asterisk and using Asterisk 13 on FreeBSD current. Asterisk is
> > behind a NAT router, the physical setup is very much a trivial one. The Asterisk PBX
> > is supposed to act as the telephone gateway for several VoIP/SIP phones.
> > 
> > I'm using throughout pjsip as configuration, I have no experience with chan_sip since
> > I started recently using Asterisk for several SoHo and lab's projects. So be alarmed,
> > there may come some noobish questions.
> > 
> > When planning and setting up the Asterisk, I had to deal with NAT. The Asterisk config
> > object of type=transport knows about essential entries:
> > 
> > local_net=                      192.168.254.1/24
> > bind=                           192.168.254.1:5060
> > external_media_address=		dyndns FQDN
> > external_signaling_address=	dyndns FQDN
> > direct_media=			no
> > rtp_symmetric=			yes
> > force_rport=			yes
> > 
> > dyndns FQDN is the FQDN of my broadband access point provided by some dynamical DNS
> > provider.
> > 
> > This setup is not working properly with when external_media_address= and
> > external_signaling_address= are set that way, but commenting out both makes all of the
> > ITSP which provides me with service happy.
> > 
> > I think, at this point I have no idea of the concept or, there is simply a missing
> > link, even a (dangerously) misconfigured router - on which the Asterisk runs. When
> > external_xxxx_xxxx are not set, I suppose they're set to 0.0.0.0/0.0.0.0, aren't they,
> > implying that they listen on all configured IPs?  
> 
> the external_xxx settings are not configuring where to listen. Simply
> tell asterisk what IP to put in the SDP data. You don't need to suppose
> or guess the content of the SIP/SDP packets, you can look at them by
> enabling asterisk debug output.
> 
> you can enable it following this guide:
> 
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+PJSIP+Troubleshooting+Guide
> 
Thank you very much.

That is the way I figured out that the DDNS has been inserted into the packets and not,
as expected, my "outbound" IP (I expected the IP to be resolved by giving the DDNS FQDN).
Commenting out the options in question made Asterisk then work properly with the ITSP.
Obviously, Asterisk 13.17.2 is capable of figuring this out by itself, I try to
understand.


-- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 313 bytes
Desc: OpenPGP digital signature
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20171010/4aacd9c1/attachment.pgp>


More information about the asterisk-users mailing list