[asterisk-bugs] [JIRA] (ASTERISK-26729) Asterisk behind NAT not sending audio according to SDP

Luke Escude (JIRA) noreply at issues.asterisk.org
Tue Mar 14 12:24:10 CDT 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235803#comment-235803 ] 

Luke Escude commented on ASTERISK-26729:
----------------------------------------

I think this is the issue:

An audio call functions properly because Kamailio sends it's IP address and RTP Ports in both SDPs (one to asterisk and one to endpoint)... Endpoint will always work, since that's what they're supposed to do... But Asterisk needs Answer() or Playback() to "kick-start" audio being sent to the proper IP and port in that SDP... This is necessary because Asterisk is also behind NAT.

A video invite, which happens after the audio call is already in progress, can't possibly have an Answer() command because there's no dial plan to handle a mid-call INVITE. So the answer() band-aid fix doesn't work here anymore.

The answer is to simply configure asterisk to ALWAYS send RTP packets to whatever it receives in the SDP, regardless if the call is connected or not. rtp_keepalive doesn't seem to work, at least not with video.

> Asterisk behind NAT not sending audio according to SDP
> ------------------------------------------------------
>
>                 Key: ASTERISK-26729
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26729
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 13.13.1
>         Environment: x64 CentOS
>            Reporter: Luke Escude
>            Assignee: Unassigned
>         Attachments: call1.pcap, Call1.txt, echo1.pcap, Echo1.txt, video.pcap, Video.txt
>
>
> We are running Asterisk 13.13.1 with PJSIP.
> The setup is as follows:
> The Asterisk boxes are all virtualized behind NAT - let's say their address space is 172.x.x.x. The router that controls that nat is IP address 10.0.4.1. Kamailio/RTPProxy is running on 10.0.1.1.
> Kamailio essentially looks like a "public" IP to the asterisk boxes - we have them REGISTERING to kamailio to IP address 10.0.1.1 (which is routable of course). That way, Kamailio knows how to get to the Asterisks via their "public IP" (10.0.4.1) and NAT port (probably like 16875 or whatever).
> SIP communication happens wonderfully with this setup.
> However, when Kamailio sends an SDP containing its address 10.0.1.1 and an RTP address, it seems like Asterisk doesn't want to send audio to that address. In order for a new NAT port to open, Asterisk has to "talk" first.
> Regardless of our pjsip configuration, we cannot get Asterisk to behave properly, even by following the wiki and setting the external signaling/media addresses.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list