[Asterisk-Users] Re: Media Path Optimization & NAT

Rich Adamson radamson at routers.com
Mon Jan 17 15:59:24 MST 2005


> >>I have a bunch of setups where an Asterisk system with a public IP 
> >>doubles as a router/gateway/firewall for a set of phones on a private 
> >>network.
> >>
> >>We're using external SIP providers.
> >>
> >>Everything works quite nicely.
> >>
> >>Now, I would very much like to remove the "canreinvite=no" from the 
> >>provider's definition on sip.conf, but doing so causes Asterisk to send 
> >>a re-invite to the provider pointing to a private IP. I thought that 
> >>correct localnet entries would solve this...
> >>
> >>Is what I'm after even possible? Am I looking in the wrong place?
> > 
> > By changing to canreinvite=yes, are you expecting the asterisk box to
> > act as a router, passing rtp traffic from your sip provider through
> > the box to a sip phone with a private address (without passing
> > asterisk code in the middle of the rtp session)?
> 
> No, sorry. I'm looking for Asterisk to not issue the re-invites if the 
> two devices can't see each other. Think of mobile users who are often 
> behind the corporate firewall but also travel. I'm trying to avoid 
> having the media path be "user->corporate lan->pstn provider". I want it 
> to be "user->pstn provider".
> 
> If not to accomplish this, what are the localnet configuration entries for?

Okay, maybe I'm a little dense here; is this what you're looking for?

When a user is in the office, his phone registers with asterisk, and he
places calls through asterisk to the sip provider. But, when he's
out of the office, he takes his phone with him, and you are wanting
him to make use of the canreinvite=yes to allow his phone to connect
directly to the sip provider avoiding asterisk (from an rtp perspective). 
Is that right?

If not, then I'm not at all understanding 'exactly' what you're trying
to accomplish. Maybe a better example would help.





More information about the asterisk-users mailing list