[asterisk-commits] file: branch 11 r382296 - /branches/11/res/res_rtp_asterisk.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Feb 28 15:37:04 CST 2013
Author: file
Date: Thu Feb 28 15:37:01 2013
New Revision: 382296
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382296
Log:
Fix a bug with ICE and strictrtp where media could get dropped.
If the end result of the ICE negotiation resulted in the path for media
changing it was possible for the strictrtp code to discard the RTP packets.
This change causes strictrtp to enter learning mode once again when the
ICE negotiation has completed successfully.
Modified:
branches/11/res/res_rtp_asterisk.c
Modified: branches/11/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/res_rtp_asterisk.c?view=diff&rev=382296&r1=382295&r2=382296
==============================================================================
--- branches/11/res/res_rtp_asterisk.c (original)
+++ branches/11/res/res_rtp_asterisk.c Thu Feb 28 15:37:01 2013
@@ -1023,6 +1023,20 @@
#endif
};
+static void rtp_learning_seq_init(struct ast_rtp *rtp, uint16_t seq);
+
+static void ast_rtp_on_ice_complete(pj_ice_sess *ice, pj_status_t status)
+{
+ struct ast_rtp *rtp = ice->user_data;
+
+ if (status != PJ_SUCCESS || !strictrtp) {
+ return;
+ }
+
+ rtp->strict_rtp_state = STRICT_RTP_LEARN;
+ rtp_learning_seq_init(rtp, (uint16_t)rtp->seqno);
+}
+
static void ast_rtp_on_ice_rx_data(pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, void *pkt, pj_size_t size, const pj_sockaddr_t *src_addr, unsigned src_addr_len)
{
struct ast_rtp *rtp = ice->user_data;
@@ -1069,6 +1083,7 @@
/* ICE Session interface declaration */
static pj_ice_sess_cb ast_rtp_ice_sess_cb = {
+ .on_ice_complete = ast_rtp_on_ice_complete,
.on_rx_data = ast_rtp_on_ice_rx_data,
.on_tx_pkt = ast_rtp_on_ice_tx_pkt,
};
More information about the asterisk-commits
mailing list