diff options
author | Mark Michelson <mmichelson@digium.com> | 2016-08-09 16:19:34 -0500 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2016-08-09 16:19:34 -0500 |
commit | a119bab6a66bd38243b242bb724b2ce874b89dae (patch) | |
tree | 8b6a94d3895abd03e178dd2cf0cb340c2eb47bd3 /res/ari/resource_channels.h | |
parent | 829b4ba8b3a5f74f9568adefc41d3ca2ac9876c5 (diff) |
res_rtp_asterisk: Cache local RTCP address.
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.
This patch addresses the issue by performing a lookup of the local
address when RTCP is allocated. We then use this cached local address
for the Stasis events when necessary.
ASTERISK-26280 #close
Reported by Mark Michelson
Change-Id: I3dd61882c2e57036f09f0c390cf38f7c87e9b556
Diffstat (limited to 'res/ari/resource_channels.h')
0 files changed, 0 insertions, 0 deletions