[Asterisk-code-review] user_eq_phone: Add privacy headers to test (testsuite[20])

Michael Bradeen asteriskteam at digium.com
Tue Sep 13 10:20:58 CDT 2022


Michael Bradeen has uploaded this change for review. ( https://gerrit.asterisk.org/c/testsuite/+/19245 )


Change subject: user_eq_phone: Add privacy headers to test
......................................................................

user_eq_phone: Add privacy headers to test

In order to test that the user=phone flag is being added correctly, we
need to send a non-anonymous invite with send privacy flags enabled.

ASTERISK-30178

Change-Id: I0f3cff8f6a443229718b635d20c53273c06797a4
---
M tests/channels/pjsip/user_eq_phone/configs/ast1/extensions.conf
M tests/channels/pjsip/user_eq_phone/configs/ast1/pjsip.conf
M tests/channels/pjsip/user_eq_phone/sipp/uas.xml
3 files changed, 41 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/45/19245/1

diff --git a/tests/channels/pjsip/user_eq_phone/configs/ast1/extensions.conf b/tests/channels/pjsip/user_eq_phone/configs/ast1/extensions.conf
index e857f91..0ee8e0f 100644
--- a/tests/channels/pjsip/user_eq_phone/configs/ast1/extensions.conf
+++ b/tests/channels/pjsip/user_eq_phone/configs/ast1/extensions.conf
@@ -1,5 +1,7 @@
 [default]
 
 exten => s,1,NoOp()
+ same => n,Set(CALLERID(num)=5550113)
+ same => n,Set(CALLERID(name)=Homer)
  same => n,Dial(PJSIP/+12568675309 at jenny)
  same => n,Hangup()
diff --git a/tests/channels/pjsip/user_eq_phone/configs/ast1/pjsip.conf b/tests/channels/pjsip/user_eq_phone/configs/ast1/pjsip.conf
index f810a59..1e77193 100644
--- a/tests/channels/pjsip/user_eq_phone/configs/ast1/pjsip.conf
+++ b/tests/channels/pjsip/user_eq_phone/configs/ast1/pjsip.conf
@@ -14,6 +14,8 @@
 allow=!all,ulaw,alaw,g722
 user_eq_phone=yes
 aors=jenny
+send_pai=yes
+send_rpid=yes
 
 [jenny]
 type=aor
diff --git a/tests/channels/pjsip/user_eq_phone/sipp/uas.xml b/tests/channels/pjsip/user_eq_phone/sipp/uas.xml
index 3062dcf..ba79ddf 100644
--- a/tests/channels/pjsip/user_eq_phone/sipp/uas.xml
+++ b/tests/channels/pjsip/user_eq_phone/sipp/uas.xml
@@ -11,13 +11,34 @@
               search_in="hdr"
               check_it="true"
               assign_to="remote_tag"/>
-          <ereg regexp=".*;user=phone.*"
+          <!-- Check the R-URI, To, From and Priv headers for the tag-->
+          <ereg regexp=".*;user=phone SIP.*"
               search_in="msg"
               check_it="true"
               assign_to="1"/>
+          <ereg regexp=".*;user=phone.*"
+              search_in="hdr"
+              check_it="true"
+              header="From"
+              assign_to="2"/>
+          <ereg regexp=".*;user=phone.*"
+              search_in="hdr"
+              check_it="true"
+              header="To"
+              assign_to="3"/>
+          <ereg regexp=".*;user=phone.*"
+              search_in="hdr"
+              check_it="true"
+              header="P-Asserted-Identity"
+              assign_to="4"/>
+          <ereg regexp=".*;user=phone.*"
+              search_in="hdr"
+              check_it="true"
+              header="Remote-Party-ID"
+              assign_to="5"/>
       </action>
   </recv>
-  <Reference variables="1" />
+  <Reference variables="1,2,3,4,5" />
 
   <send retrans="500">
     <![CDATA[

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

Gerrit-Project: testsuite
Gerrit-Branch: 20
Gerrit-Change-Id: I0f3cff8f6a443229718b635d20c53273c06797a4
Gerrit-Change-Number: 19245
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220913/8579418a/attachment-0001.html>


More information about the asterisk-code-review mailing list