[asterisk-users] NAT and Dial to two channels at once

Brad Templeton brad+aster at templetons.com
Sun Dec 10 12:41:29 MST 2006


On Sun, Dec 10, 2006 at 01:39:10PM -0500, Eric Jacksch wrote:
> Someone may have a more elegant solution, but I have found that allowing
> reinvite on a phone connected via NAT gateway causes too many problems,
> especially with the difference in the various NAT implementations.  I
> set canreinvite=no host=dynamic nat=yes qualify=yes for all phones that
> connect from the Internet. 
> 
> A note to anyone doing Internet telephony -- the latest Linksys routers
> seem to ignore the small UDP keepalive that some phones like the
> grandstreams send, so the NAT hole closes.  I've had to start using
> qualify=yes to get asterisk to keep the NAT hole open.
> 

Actually, that part is working, and in any event I can hand-open holes
in the NAT in cases where it doesn't work.

As long as the incoming call is redirected to a single channel, it
works fine.   Setting canreinvite=no and nat=yes and the rest don't
help the problem we get when the incoming call is sent to a
Dial(chan1&chan2).    

I don't want to turn reinvite off, it's a very important feature.
I'm giving IP phones to all members of the family this christmas,
and most of them live 2500 miles away.   Nobody will want to have
their audio hairpin through my server.   That would just add lots of
latency -- indeed enough to make the calls much less pleasant -- as
well as eat my own bandwidth and add risk of packet loss for no
reason.

As noted, it all works with just one channel, but for many of them,
to get them introduced to voip, it would be nice if I could have their
DID ring both their new SIP phone and their old PSTN phone (and
possibly their cell phone at the same time, though the voice-mail
problem remains a curse if you do that until I can convince Mark to
put in my fix for that.)


Ringing both the pstn phone and the IP phone is not just for
newcomers, however.  If you only have one IP phone in the house,
and you are not near it, you may not hear it and you don't want to
have to run elsewhere to get it.  (Could do call pickup over
PSTN.)

I understand if you Dial(chan1&chan2) you need to do independent
invites with their own SDPs, because the two channels can be in
different places, with different codecs.  You don't know until
one answers what you will finally do, though if the one that answers
can be native bridged, it should be native bridged.

However, the current situation -- no audio at all until a reinvite
is triggered by putting the call on hold -- is obviously not very
exciting.


More information about the asterisk-users mailing list