From: Joshua Colp Date: Mon, 24 Sep 2018 17:43:17 +0000 (+0000) Subject: res_rtp_asterisk: Raise event when RTP port is allocated X-Git-Tag: 13.24.0-rc1~89^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=155ff8e174f01efbbeb6f913f92257b5528512cf;p=thirdparty%2Fasterisk.git res_rtp_asterisk: Raise event when RTP port is allocated This change raises a testsuite event to provide what port Asterisk has actually allocated for RTP. This ensures that testsuite tests can remove any assumption of ports and instead use the actual port in use. ASTERISK-28070 Change-Id: I91bd45782e84284e01c89acf4b2da352e14ae044 --- diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index e562627c92..0cee8f6f55 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -3184,6 +3184,7 @@ static int ast_rtp_new(struct ast_rtp_instance *instance, if (!ast_bind(rtp->s, addr)) { ast_debug(1, "Allocated port %d for RTP instance '%p'\n", x, instance); ast_rtp_instance_set_local_address(instance, addr); + ast_test_suite_event_notify("RTP_PORT_ALLOCATED", "Port: %d", x); break; }