[Asterisk-code-review] pjsip/sdp_offer_answer/attribute_passthrough: Fix XML regexes (testsuite[17])

Friendly Automation asteriskteam at digium.com
Wed Apr 1 14:31:15 CDT 2020


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/testsuite/+/14079 )

Change subject: pjsip/sdp_offer_answer/attribute_passthrough: Fix XML regexes
......................................................................

pjsip/sdp_offer_answer/attribute_passthrough: Fix XML regexes

The regex in phone_B_h264.xml was passing when it shouldn't have
been because of missing parentheses.

The regexes in phone_A_speex.xml and phone_B_speex.xml were also
passing when they shouldn't have been because "check_it" was set to
"false" instead of "check_it_inverse" being set to "true".

Change-Id: I1537249b6f25b12dfd5d5ea74edf9fee7b7e9d26
---
M tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/configs/ast1/pjsip.conf
M tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_A_speex.xml
M tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_B_h264.xml
M tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_B_speex.xml
4 files changed, 3 insertions(+), 5 deletions(-)

Approvals:
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  Friendly Automation: Looks good to me, approved; Approved for Submit



diff --git a/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/configs/ast1/pjsip.conf b/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/configs/ast1/pjsip.conf
index a2d4d92..5598d0d 100644
--- a/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/configs/ast1/pjsip.conf
+++ b/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/configs/ast1/pjsip.conf
@@ -36,7 +36,6 @@
 contact=sip:127.0.0.3:5063
 
 [phoneB-h264](endpoint-template)
-type=endpoint
 aors=phoneB-h264
 disallow=all
 allow=ulaw
@@ -47,7 +46,6 @@
 contact=sip:127.0.0.3:5064
 
 [phoneB-speex](endpoint-template)
-type=peer
 aors=phoneB-speex
 disallow=all
 allow=ulaw
diff --git a/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_A_speex.xml b/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_A_speex.xml
index 98805ac..f2adbfb 100644
--- a/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_A_speex.xml
+++ b/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_A_speex.xml
@@ -44,7 +44,7 @@
   <recv response="200" rtd="true">
     <action>
       <ereg regexp="a=fmtp:99 sr=8000,mode=any"
-	    search_in="body" check_it="false" assign_to="1"/>
+	    search_in="body" check_it_inverse="true" assign_to="1"/>
       <strcmp assign_to="1" variable="1" value=""/>
     </action>
   </recv>
diff --git a/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_B_h264.xml b/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_B_h264.xml
index 5af8629..c203b01 100644
--- a/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_B_h264.xml
+++ b/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_B_h264.xml
@@ -11,7 +11,7 @@
 				search_in="hdr"
 				check_it="true"
 				assign_to="global_call_id"/>
-			<ereg regexp="m=video [0-9]{1,5} RTP/AVP( [0-9]{1,3})+..*a=rtpmap:9[6-9]|1{0,1}[0-9]|12[0-7] H264/90000.*a=fmtp:9[6-9]|1{0,1}[0-9]|12[0-7] max-mbps=48600;packetization-mode=1;profile-level-id=42801E"
+			<ereg regexp="m=video [0-9]{1,5} RTP/AVP( [0-9]{1,3})+..*a=rtpmap:(9[6-9]|1{0,1}[0-9]|12[0-7]) H264/90000.*a=fmtp:(9[6-9]|1{0,1}[0-9]|12[0-7]) max-mbps=48600;packetization-mode=1;profile-level-id=42801E"
 			      search_in="body" check_it="true" assign_to="1"/>
 			<strcmp assign_to="1" variable="1" value=""/>
 
diff --git a/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_B_speex.xml b/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_B_speex.xml
index cc5b445..017e4ee 100644
--- a/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_B_speex.xml
+++ b/tests/channels/pjsip/sdp_offer_answer/attribute_passthrough/speex_h263_h264/sipp/phone_B_speex.xml
@@ -12,7 +12,7 @@
 				check_it="true"
 				assign_to="global_call_id"/>
 			<ereg regexp="a=fmtp:99 sr=8000,mode=any"
-			      search_in="body" check_it="false" assign_to="1"/>
+			      search_in="body" check_it_inverse="true" assign_to="1"/>
 			<strcmp assign_to="1" variable="1" value=""/>
 
 		</action>

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

Gerrit-Project: testsuite
Gerrit-Branch: 17
Gerrit-Change-Id: I1537249b6f25b12dfd5d5ea74edf9fee7b7e9d26
Gerrit-Change-Number: 14079
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200401/bcefaad2/attachment-0001.html>


More information about the asterisk-code-review mailing list