[Asterisk-code-review] res rtp asterisk: Raise event when RTP port is allocated (asterisk[15])

Joshua Colp asteriskteam at digium.com
Tue Sep 25 05:34:42 CDT 2018


Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/10256


Change subject: res_rtp_asterisk: Raise event when RTP port is allocated
......................................................................

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
---
M res/res_rtp_asterisk.c
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/56/10256/1

diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 192840c..6915186 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -3492,6 +3492,7 @@
 		if (!ast_bind(rtp->s, &rtp->bind_address)) {
 			ast_debug(1, "Allocated port %d for RTP instance '%p'\n", x, instance);
 			ast_rtp_instance_set_local_address(instance, &rtp->bind_address);
+			ast_test_suite_event_notify("RTP_PORT_ALLOCATED", "Port: %d", x);
 			break;
 		}
 

-- 
To view, visit https://gerrit.asterisk.org/10256
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I91bd45782e84284e01c89acf4b2da352e14ae044
Gerrit-Change-Number: 10256
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180925/b3cf839b/attachment.html>


More information about the asterisk-code-review mailing list