[asterisk-bugs] [Asterisk 0010335]: directrtpsetup doesn't work with 'nat=yes' devices

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Aug 8 08:35:50 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10335 
====================================================================== 
Reported By:                adamgundy
Assigned To:                file
====================================================================== 
Project:                    Asterisk
Issue ID:                   10335
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           1.4.9  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             07-30-2007 13:33 CDT
Last Modified:              08-08-2007 08:35 CDT
====================================================================== 
Summary:                    directrtpsetup doesn't work with 'nat=yes' devices
Description: 
I've been trying to get two copies of OpenWengo to talk to one another
without asterisk in the middle (video kills my bandwidth!). OpenWengo
unfortunately seems to be very unhappy with SIP reinvites, so I was hoping
the new directrtpsetup behavior would be ideal.

it's worth noting that everything works well without reinvites turned on.

unfortunately, OpenWengo also doesn't appear to do STUN for 'custom' SIP
accounts, so it presents LAN IP addresses to asterisk. with 'nat=yes',
asterisk works around this by replying to the source IP address, rather
than the one specified in the SIP message. HOWEVER, asterisk seems to
figure out the RTP IP address/port by waiting for an incoming packet in
'nat=yes' mode, which of course never happens with 'directrtpsetup=yes'.
instead, asterisk sends both SIP clients the LAN IP addresses and port
numbers.

my thought is, depending on the definition of 'nat=yes', we still might be
able to make this work - eg if 'nat=yes' means 'port forwarding, 1:1
mapping, symmetric NAT', then in theory we should be able to force the RTP
IP address(es) to be the same as the SIP IP address, *IF* the SIP message
contains the same (LAN) IP address for both SIP and RTP? other than that,
we need to fail the direct invite...

that would at least allow people with NAT-blind devices to setup port
forwarding and still have asterisk connect them directly.

====================================================================== 

---------------------------------------------------------------------- 
 file - 08-08-07 08:35  
---------------------------------------------------------------------- 
I ended up just adding a note to sip.conf, I came to the conclusion that if
you are specifically doing canreinvite then you are saying the two devices
can talk directly to eachother. As for another option for trunk feel free
to open another bug if you have a patch for that. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
08-08-07 08:35  file           Note Added: 0068606                          
======================================================================




More information about the asterisk-bugs mailing list