[Asterisk-Users] Asterisk behind LinkSys NAT Routing

Martin Pycko martinp at digium.com
Mon Nov 3 13:50:43 MST 2003


It's for setting asterisk box with SIP support behind a NAT.
You need to do port redirection of eg. 5060 and then setup
externip=ip_of_your_nat_gateway

Martin

On Mon, 3 Nov 2003, Andrew Thompson wrote:

> According to the source, it goes in the general section of sip.conf:
>
> } else if (!strcasecmp(v->name, "externip")) {
> if (!(hp = gethostbyname(v->value))) {
> ast_log(LOG_WARNING, "Invalid address for externip keyword: %s\n", v->value);
> } else {
> memcpy(&__ourip, hp->h_addr, sizeof(__ourip));
> use_external_ip = 1;
> }
>
> Apparently, it expects the IP address that you want to use instead of the default (bindaddr, I guess?).
>
> Can someone tell me, does the second line that I quoted, with the gethostbyname function mean that it will accept a hostname instead of just an IP? This would be really really good for Dynamic IP users.
>
> Note: I'm not savy enough to figure out how often this variable is refreshed!
>
> This was taken from the CVS Viewer at: http://asterisk.espia-net.net/
> chan_sip.c: http://asterisk.espia-net.net/horde/chora/co.php/asterisk/channels/chan_sip.c?login=2&r=1.204
>
> -----
> Andrew Thompson
>
> ----- Original Message -----
> From: "Martin Pycko" <martinp at digium.com>
> To: <asterisk-users at lists.digium.com>
> Sent: Monday, November 03, 2003 12:34 PM
> Subject: Re: [Asterisk-Users] Asterisk behind LinkSys NAT Routing
>
>
> > It's new. It prevents asterisk from putting the private IP in the messages
> > that asterisk sends with SIP.
> >
> > Martin
> >
> > On Mon, 3 Nov 2003, WipeOut wrote:
> >
> > > Martin Pycko wrote:
> > >
> > > >You can port forward the 5060 SIP port and use externip keyword in
> > > >sip.conf to have it working behind a NAT.
> > > >
> > > >Martin
> > > >
> > > >
> > > >
> > > Martin,
> > >
> > > Is "externip" and new parameter??
> > >
> > > Does it do a similar thing for the server as what "nat=yes" does for the
> > > phone?
> > >
> > > Later..
> > >
> > > _______________________________________________
> > > Asterisk-Users mailing list
> > > Asterisk-Users at lists.digium.com
> > > http://lists.digium.com/mailman/listinfo/asterisk-users
> > >
> >
> > _______________________________________________
> > Asterisk-Users mailing list
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÀ²×«ŠÉÿRÇ«²f¢–)à–+-Ë^®+$ýK
®ÏåŠËlýØ Šéÿr‰¡¶Úÿÿùb²Ûÿv("ºoÜ¢oæj)fjåŠËbú?jË^®+$þë

>




More information about the asterisk-users mailing list