res_rtp_asterisk: Resolve further timing issues with DTLS negotiation
authorDade Brandon <dade@xencall.com>
Fri, 18 Dec 2015 01:05:00 +0000 (17:05 -0800)
committerDade Brandon <dade@xencall.com>
Mon, 21 Dec 2015 19:13:46 +0000 (11:13 -0800)
commit648ca2b1b811e266c9dc75f686ec29cf26cacbc0
tree6474048236617a9614ef23aac2f6fc5e46610f30
parentf0b4375b86e3168d1a80078ed34ee9058f699edb
res_rtp_asterisk: Resolve further timing issues with DTLS negotiation

Resolves an edge case dtls negotiation delay for certain networks which
somehow manage to drop the rtcp side's packet when these are both sent
ast_rtp_remote_address_set, causing it to have to time-out and restart
the handshake.

Move dtls pending bio flush in to it's own function, and call it from
ast_rtp_on_ice_complete, when we're rtp->ice, rather than when
ast_rtp_remote_address_set.

Keep the existing flush from the recent change to res_rtp_remote_address_set
if ice is not being used.

ASTERISK-25614 #close
Reported-by: XenCALL
Tested by: XenCALL

Change-Id: Ie2caedbdee1783159f375589b6fd3845c8577ba5
res/res_rtp_asterisk.c