[Asterisk-code-review] pjsip/rtp/asymmetric rtp codec: Wait for SDP negotiation. (testsuite[15])

Jenkins2 asteriskteam at digium.com
Fri Jun 29 06:50:49 CDT 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/9304 )

Change subject: pjsip/rtp/asymmetric_rtp_codec: Wait for SDP negotiation.
......................................................................

pjsip/rtp/asymmetric_rtp_codec: Wait for SDP negotiation.

SDP negotiation in PJSIP happens in an asynchronous fashion.
We may start executing dialplan before it is fully completed
resulting in the formats on the channel being the configured
ones momentarily. The asymmetric RTP codec tests did not
take this into account and could sometimes query for formats
before the SDP negotiation was complete.

This change adds a wait to ensure that the SDP negotiation
has completed before getting the formats.

Change-Id: I6907ae7ca7c0ddfdd2dafaa35f5385cb044c75ed
---
M tests/channels/pjsip/rtp/asymmetric_rtp_codec/off/configs/ast1/extensions.conf
M tests/channels/pjsip/rtp/asymmetric_rtp_codec/on/configs/ast1/extensions.conf
2 files changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/tests/channels/pjsip/rtp/asymmetric_rtp_codec/off/configs/ast1/extensions.conf b/tests/channels/pjsip/rtp/asymmetric_rtp_codec/off/configs/ast1/extensions.conf
index 080601d..02c6fd9 100644
--- a/tests/channels/pjsip/rtp/asymmetric_rtp_codec/off/configs/ast1/extensions.conf
+++ b/tests/channels/pjsip/rtp/asymmetric_rtp_codec/off/configs/ast1/extensions.conf
@@ -1,5 +1,6 @@
 [default]
 exten => tacos,1,Answer()
+same => n,Wait(5) ; Give time for SDP negotiation to occur as it is done asynchronously
 same => n,UserEvent(${CHANNEL(audionativeformat)})
 same => n,Hangup()
 
diff --git a/tests/channels/pjsip/rtp/asymmetric_rtp_codec/on/configs/ast1/extensions.conf b/tests/channels/pjsip/rtp/asymmetric_rtp_codec/on/configs/ast1/extensions.conf
index 080601d..02c6fd9 100644
--- a/tests/channels/pjsip/rtp/asymmetric_rtp_codec/on/configs/ast1/extensions.conf
+++ b/tests/channels/pjsip/rtp/asymmetric_rtp_codec/on/configs/ast1/extensions.conf
@@ -1,5 +1,6 @@
 [default]
 exten => tacos,1,Answer()
+same => n,Wait(5) ; Give time for SDP negotiation to occur as it is done asynchronously
 same => n,UserEvent(${CHANNEL(audionativeformat)})
 same => n,Hangup()
 

-- 
To view, visit https://gerrit.asterisk.org/9304
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I6907ae7ca7c0ddfdd2dafaa35f5385cb044c75ed
Gerrit-Change-Number: 9304
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180629/e1281b74/attachment.html>


More information about the asterisk-code-review mailing list