[asterisk-bugs] [JIRA] (ASTERISK-26280) DNS lookups can block channel media paths

Mark Michelson (JIRA) noreply at issues.asterisk.org
Tue Aug 9 16:19:56 CDT 2016


Mark Michelson created ASTERISK-26280:
-----------------------------------------

             Summary: DNS lookups can block channel media paths
                 Key: ASTERISK-26280
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26280
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Resources/res_rtp_asterisk
    Affects Versions: 13.10.0
            Reporter: Mark Michelson


When an RTCP packet is sent or received, res_rtp_asterisk generates a Stasis event that contains the RTCP report as well as the local and remote addresses that the report pertains to.

The addresses are determined using {{ast_find_ourip()}}. For the local address, this will typically result in a lookup of the hostname of the server, and then a DNS lookup of that hostname. If you do not have the host in {{/etc/hosts}}, then this results in a full DNS lookup, which can potentially block for some time.

This is especially problematic when performing RTCP reads, since those are done on the same thread responsible for reading and writing media.

A workaround exists. The lookup can be avoided if in {{pjsip.conf}} the endpoint has {{bind_rtp_to_media_address=yes}} and has set an explicit {{media_address}}.



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



More information about the asterisk-bugs mailing list