[asterisk-bugs] [JIRA] (ASTERISK-29433) Frequently no audio and/or video due to Asterisk sending dat to the wrong port

Asterisk Team (JIRA) noreply at issues.asterisk.org
Tue May 18 03:13:17 CDT 2021


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

Asterisk Team commented on ASTERISK-29433:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

> Frequently no audio and/or video due to Asterisk sending dat to the wrong port
> ------------------------------------------------------------------------------
>
>                 Key: ASTERISK-29433
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29433
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: pjproject/pjsip
>    Affects Versions: 16.17.0
>            Reporter: Chris
>            Severity: Major
>
> Frequently our field-testers are complaining about missing audio and video.
> After troubleshooting with the developer of our client SIP stack (AmSip/OSip2) we came to the conclusion that the root-cause is in Asterisk.
> In the cases where no audio (or video) is received, it seems that Asterisk is sending the media packets to the wrong port.
> See our engineer's detailed network analysis below.
> _________________________________
> FIRST OBSERVATION
> _________________________________
> From asterisk_tcpdump.cap
> packet 1243: asterisk (192.168.1.2) makes a STUN BINDING REQUEST from port 14429
> packet 1251: asterisk receive an answer MAPPED-ADDRESS: 78.22.132.194:14429
> This means the packet was received by stun server from the NAT IP 78.22.132.194 AND NAT PORT 14429
> This means the NAT has forwarded the packet **without** changing the PORT. (NAT are often changing port)
> This means the candidate should be:
> a=candidate:S4e1684c2 2 UDP 1694498814 78.22.132.194 14429 typ srflx raddr 192.168.1.2 rport 14429\r\n
> But it appears in SDP as:
> a=candidate:S4e1684c2 2 UDP 1694498814 78.22.132.194 14429 typ srflx raddr 192.168.1.2 rport 14428\r\n
> CONCLUSION: THIS IS AN ERROR FROM ASTERISK
> _________________________________
> SECOND OBSERVATION
> _________________________________
> Let's look at iphone_tcpdump.pcap  "with filter (udp.port == 12600) && (ip.addr == 192.168.1.2)"
> We can see many packets being sent to 192.168.1.2:14428, but nothing received. I guess
> this is expected.
> Let's look at asterisk_tcpdump.pcap  "with filter udp.port == 14428 && ip.addr == 192.168.0.201"
> packet 1529: We can see a a bind request being sent  + a retransmission
> The request is sent FROM 192.168.1.2 from port 14428 to 192.168.0.201on port 12601
> The request TID is :Message Transaction ID: 0e5c00008d4ca0783b1a7b48
> Then, asterisk receive a response:
> packet 1538 is the symmetric response. It contains a XOR-MAPPED-ADDRESS: 192.168.0.145:14428
> This response has been built from amsip.
> This response is coming from 192.168.0.201from PORT 12601
> Let's look  iphone_tcpdump.pcap if we can find this request + answer:
> Let's use the filter "(udp.port == 12601) && (ip.addr == 192.168.0.145 && udp.port == 14428)"
> The packet 721 is matching the request. It's coming on RTCP port (12601) but comes from the RTP port (14428)
> The packet 723 is correct and match the response
> amsip has correct processing: amsip understand this is coming to the RTCP port and establish the RTCP connection.
> Unfortunately, asterisk has sent the packet from port 14428 instead and this is NOT CORRECT.
> ____________________
> FINAL CONCLUSION
> ______________________
> Asterisk has sent packet 1529 from the wrong port.
> The fact that asterisk is using the wrong port (14428) in the RTCP candidate has no impact, but still it's WRONG.
> There was no NAT issue.



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



More information about the asterisk-bugs mailing list