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

Jared Hull (JIRA) noreply at issues.asterisk.org
Tue Mar 14 14:39:10 CDT 2017


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

Jared Hull commented on ASTERISK-26729:
---------------------------------------

Thanks Mr. Colp,
I think we are beginning to make sense of this now.

By "allocated" it means locally for transmission. I am seeing the same sort of behavior in the 1st INVITE which has working RTP, so I guess there is no problem there. Asterisk is not ignoring the ports in the SDP as we first though, but is simply not sending anything to them to open them.
Since this is an echo, there is no other party to receive RTP from until we first send RTP from Asterisk to open the port.
So the only way we can get this to work is if Asterisk sends just one RTP packet to open the port, and that is where the problem lies.

Only an Answer() or Playback() seemed to solve our underlying issue with RTP and NAT. It works okay for opening the RTP port initially; but now we are sending a reINVITE to add an h264 stream to the call; and it doesn't look like there is anything we can do in dialplan to initiate RTP video to open that port.

We have experimented with just about all the NAT and media related options we could find.
https://github.com/asterisk/asterisk/blob/master/configs/samples/pjsip.conf.sample

I think what we need is an option in pjsip.conf which forces Asterisk to send an RTP packet to the port it receives in the SDP of an INVITE. Have I missed anything?

> 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, Video2.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