[asterisk-users] Re: NAT: RTP Path Optimization
Conrad Wood
asterisk-users at conradwood.net
Wed Jan 31 06:28:04 MST 2007
> > >>PC> When I set for Extern1/2 canreinvite=yes it works, but
> > >>PC> "Intern-2-Extern" doesn't work because Asteisk gives out the
> > >>PC> private IP-Adresses of Int1/2
> > >>
> > >>Asterisk can't give out a public IP-address for Int1/2. Where
> > >>would it get one from?
> > >>
> > >
> > >Correct that it doesn't. But some kind sould could indeed code a
> > >variety of techniques to get it, such as:
> >
> > Again: My Problem is not "Intern-to-Extern" (NAT,Stun). My Problem is
> > "Extern-to-Extern", that the external phones are not talking RTP
> > *directly* to each other. This is bad, when Asterisk is in Europe and
> > the Phones are in Asia.
> > _______________________________________________
Just an idea, it's completely unverified and if I missed the point
somewhat, please excuse me ;) - but maybe this approach leads to the OPs
desired result if thought through further.
I wonder wether some clever dialplan constructs couldn't help.
I'm thinking along the lines of:
[globals]
ALLOWDIRECT=
REMAININPATH=tTwW
[internalphones] <- registration context of internal phones
exten => extern1,1,Dial(SIP/${EXTEN},30,${REMAINPATH})
exten => extern2,1,Dial(SIP/${EXTEN},30,${REMAINPATH})
exten => intern1,1,Dial(SIP/${EXTEN},30,${ALLOWDIRECT})
exten => intern2,1,Dial(SIP/${EXTEN},30,${ALLOWDIRECT})
[externalphones] <- registration context of internal phones
exten => intern1,1,Dial(SIP/${EXTEN},30,${REMAINPATH})
exten => intern2,1,Dial(SIP/${EXTEN},30,${REMAINPATH})
exten => extern1,1,Dial(SIP/${EXTEN},30,${ALLOWDIRECT})
exten => extern2,1,Dial(SIP/${EXTEN},30,${ALLOWDIRECT})
This assumes all sip phones are set to reinvite=yes.
I expect (one of) the options to dial (tTw or W) to force asterisk to
remain in the media path. This way *only* if it's int<->int or ext<->ext
will it send sip reinvite, right?
I have another idea just now, but that's even weirder ... ;)
Conrad
More information about the asterisk-users
mailing list