On Wed, Apr 11, 2018, at 4:33 AM, Benjamin Marty wrote:> I added the bind_rtp_to_media_address=yes on all endpoints but still the > same behaviour. The funny thing is that the G711 audio early media works > and doesn't have that Private IP issue. I was also able to cross check with > chan_sip on Asterisk 15, exactly the same wrong behaviour. See following > capture (PJSIP):As I stated previously in order for media to go to the source IP address and port, media has to be received from the endpoint. If this doesn't happen then you'll see exactly this behavior - we'll send to the IP address and port they told us. There's nothing that Asterisk itself can do in that instance, the endpoint has to send media or place the correct IP address and port in the messages. Was any media received from it? -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org
Benjamin Marty
2018-Apr-13 14:56 UTC
[asterisk-users] Asterisk behind NAT Early Media Video
The current behaviour is that Earlymedia video isn't working when NAT's in between are involved. The source/destination IP's are correct. So the client is sending Early media video + Early media audio to the Asterisk Server "in the cloud" and the Asterisk Server "in the cloud" is sending both to the IP where the Client is located. But strangely just the Early media audio is passing the NAT to the recipent. My guess is that the NAT traversal for Early media audio is fine, but the one for Early media video not yet. Can you propably comprehend something in that direction? Or can you guide me to the code part where Asterisk is doing the Port change when a NAT is detected and the Client itself is sending "fake" RTP Early media traffic to get a NAT Binding for incoming RTP Early media traffic? Benjamin 2018-04-11 11:50 GMT+02:00 Joshua Colp <jcolp at digium.com>:> On Wed, Apr 11, 2018, at 4:33 AM, Benjamin Marty wrote: > > I added the bind_rtp_to_media_address=yes on all endpoints but still the > > same behaviour. The funny thing is that the G711 audio early media works > > and doesn't have that Private IP issue. I was also able to cross check > with > > chan_sip on Asterisk 15, exactly the same wrong behaviour. See following > > capture (PJSIP): > > As I stated previously in order for media to go to the source IP address > and port, media has to be received from the endpoint. If this doesn't > happen then you'll see exactly this behavior - we'll send to the IP address > and port they told us. There's nothing that Asterisk itself can do in that > instance, the endpoint has to send media or place the correct IP address > and port in the messages. > > Was any media received from it? > > -- > Joshua Colp > Digium, Inc. | Senior Software Developer > 445 Jan Davis Drive NW - Huntsville, AL 35806 - US > Check us out at: www.digium.com & www.asterisk.org > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: https://community.asterisk. > org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20180413/3d5a37b0/attachment.html>
On Fri, Apr 13, 2018, at 11:56 AM, Benjamin Marty wrote:> The current behaviour is that Earlymedia video isn't working when NAT's in > between are involved. The source/destination IP's are correct. So the > client is sending Early media video + Early media audio to the Asterisk > Server "in the cloud" and the Asterisk Server "in the cloud" is sending > both to the IP where the Client is located. But strangely just the Early > media audio is passing the NAT to the recipent. > > My guess is that the NAT traversal for Early media audio is fine, but the > one for Early media video not yet. Can you propably comprehend something in > that direction? Or can you guide me to the code part where Asterisk is > doing the Port change when a NAT is detected and the Client itself is > sending "fake" RTP Early media traffic to get a NAT Binding for incoming > RTP Early media traffic?The code is in res_rtp_asterisk[1]. It's not complex and despite the comment is not specific to video. Without logs showing where things are coming from and going I don't really have anything else to add. [1] https://github.com/asterisk/asterisk/blob/master/res/res_rtp_asterisk.c#L6140 -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org