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

Friendly Automation asteriskteam at digium.com
Wed Sep 14 07:04:43 CDT 2022


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

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(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit




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/+/19244
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: 19
Gerrit-Change-Id: I0f3cff8f6a443229718b635d20c53273c06797a4
Gerrit-Change-Number: 19244
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220914/60ba1770/attachment-0001.html>


More information about the asterisk-code-review mailing list