<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6112">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pjsip presence: Fix tests for updated PIDF/XPIDF logic<br><br>ASTERISK-26659<br><br>Change-Id: Ifb7bfa23172cd6481f788c35124ddcca772dbe1f<br>---<br>M tests/channels/pjsip/publish/presence_pidf/sipp/publish.xml<br>M tests/channels/pjsip/publish/presence_xpidf/sipp/publish.xml<br>M tests/channels/pjsip/subscriptions/presence/presence_pidf/state_check.py<br>M tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml<br>M tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_xpidf/test-config.yaml<br>5 files changed, 42 insertions(+), 51 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/tests/channels/pjsip/publish/presence_pidf/sipp/publish.xml b/tests/channels/pjsip/publish/presence_pidf/sipp/publish.xml<br>index eb97c2a..98295c1 100644<br>--- a/tests/channels/pjsip/publish/presence_pidf/sipp/publish.xml<br>+++ b/tests/channels/pjsip/publish/presence_pidf/sipp/publish.xml<br>@@ -5,7 +5,7 @@<br>   <recv request="PUBLISH" crlf="true"><br>     <action><br>       <ereg regexp="<\?xml version=\"1.0\" encoding=\"UTF-8\"\?><br>-<presence entity=\"sip:presence@127.0.0.1:5061\" xmlns=\"urn:ietf:params:xml:ns:pidf\" xmlns:pp=\"urn:ietf:params:xml:ns:pidf:person\" xmlns:es=\"urn:ietf:params:xml:ns:pidf:rpid:status:rpid-status\" xmlns:ep=\"urn:ietf:params:xml:ns:pidf:rpid:rpid-person\"><br>+<presence entity=\"sip:presence@127.0.0.1:5061\" xmlns=\"urn:ietf:params:xml:ns:pidf\" xmlns:dm=\"urn:ietf:params:xml:ns:pidf:data-model\" xmlns:rpid=\"urn:ietf:params:xml:ns:pidf:rpid\"><br>  <note>Ready</note><br>  <tuple id=\"presence\"><br>   <status><br>@@ -13,9 +13,7 @@<br>   </status><br>   <contact priority=\"1\">sip:presence@127.0.0.1:5061</contact><br>  </tuple><br>- <pp:person><br>-  <status /><br>- </pp:person><br>+ <dm:person /><br> </presence>" check_it="true" search_in="body" assign_to="presence1" /><br>     </action><br>   </recv><br>@@ -40,19 +38,19 @@<br>   <recv request="PUBLISH" crlf="true"><br>     <action><br>       <ereg regexp="<\?xml version=\"1.0\" encoding=\"UTF-8\"\?><br>-<presence entity=\"sip:presence@127.0.0.1:5061\" xmlns=\"urn:ietf:params:xml:ns:pidf\" xmlns:pp=\"urn:ietf:params:xml:ns:pidf:person\" xmlns:es=\"urn:ietf:params:xml:ns:pidf:rpid:status:rpid-status\" xmlns:ep=\"urn:ietf:params:xml:ns:pidf:rpid:rpid-person\"><br>+<presence entity=\"sip:presence@127.0.0.1:5061\" xmlns=\"urn:ietf:params:xml:ns:pidf\" xmlns:dm=\"urn:ietf:params:xml:ns:pidf:data-model\" xmlns:rpid=\"urn:ietf:params:xml:ns:pidf:rpid\"><br>  <note>Ringing</note><br>  <tuple id=\"presence\"><br>   <status><br>-   <basic>closed</basic><br>+   <basic>open</basic><br>   </status><br>   <contact priority=\"1\">sip:presence@127.0.0.1:5061</contact><br>  </tuple><br>- <pp:person><br>-  <status><br>-   <ep:activities>ep:busy</ep:activities><br>-  </status><br>- </pp:person><br>+ <dm:person><br>+  <rpid:activities><br>+   <rpid:on-the-phone /><br>+  </rpid:activities><br>+ </dm:person><br> </presence>" check_it="true" search_in="body" assign_to="presence2" /><br>     </action><br>   </recv><br>@@ -77,19 +75,19 @@<br>   <recv request="PUBLISH" crlf="true"><br>     <action><br>       <ereg regexp="<\?xml version=\"1.0\" encoding=\"UTF-8\"\?><br>-<presence entity=\"sip:presence@127.0.0.1:5061\" xmlns=\"urn:ietf:params:xml:ns:pidf\" xmlns:pp=\"urn:ietf:params:xml:ns:pidf:person\" xmlns:es=\"urn:ietf:params:xml:ns:pidf:rpid:status:rpid-status\" xmlns:ep=\"urn:ietf:params:xml:ns:pidf:rpid:rpid-person\"><br>+<presence entity=\"sip:presence@127.0.0.1:5061\" xmlns=\"urn:ietf:params:xml:ns:pidf\" xmlns:dm=\"urn:ietf:params:xml:ns:pidf:data-model\" xmlns:rpid=\"urn:ietf:params:xml:ns:pidf:rpid\"><br>  <note>On the phone</note><br>  <tuple id=\"presence\"><br>   <status><br>-   <basic>closed</basic><br>+   <basic>open</basic><br>   </status><br>   <contact priority=\"1\">sip:presence@127.0.0.1:5061</contact><br>  </tuple><br>- <pp:person><br>-  <status><br>-   <ep:activities>ep:busy</ep:activities><br>-  </status><br>- </pp:person><br>+ <dm:person><br>+  <rpid:activities><br>+   <rpid:on-the-phone /><br>+  </rpid:activities><br>+ </dm:person><br> </presence>" check_it="true" search_in="body" assign_to="presence3" /><br>     </action><br>   </recv><br>@@ -114,19 +112,19 @@<br>   <recv request="PUBLISH" crlf="true"><br>     <action><br>       <ereg regexp="<\?xml version=\"1.0\" encoding=\"UTF-8\"\?><br>-<presence entity=\"sip:presence@127.0.0.1:5061\" xmlns=\"urn:ietf:params:xml:ns:pidf\" xmlns:pp=\"urn:ietf:params:xml:ns:pidf:person\" xmlns:es=\"urn:ietf:params:xml:ns:pidf:rpid:status:rpid-status\" xmlns:ep=\"urn:ietf:params:xml:ns:pidf:rpid:rpid-person\"><br>+<presence entity=\"sip:presence@127.0.0.1:5061\" xmlns=\"urn:ietf:params:xml:ns:pidf\" xmlns:dm=\"urn:ietf:params:xml:ns:pidf:data-model\" xmlns:rpid=\"urn:ietf:params:xml:ns:pidf:rpid\"><br>  <note>On hold</note><br>  <tuple id=\"presence\"><br>   <status><br>-   <basic>closed</basic><br>+   <basic>open</basic><br>   </status><br>   <contact priority=\"1\">sip:presence@127.0.0.1:5061</contact><br>  </tuple><br>- <pp:person><br>-  <status><br>-   <ep:activities>ep:busy</ep:activities><br>-  </status><br>- </pp:person><br>+ <dm:person><br>+  <rpid:activities><br>+   <rpid:on-the-phone /><br>+  </rpid:activities><br>+ </dm:person><br> </presence>" check_it="true" search_in="body" assign_to="presence4" /><br>     </action><br>   </recv><br>@@ -151,7 +149,7 @@<br>   <recv request="PUBLISH" crlf="true"><br>     <action><br>       <ereg regexp="<\?xml version=\"1.0\" encoding=\"UTF-8\"\?><br>-<presence entity=\"sip:presence@127.0.0.1:5061\" xmlns=\"urn:ietf:params:xml:ns:pidf\" xmlns:pp=\"urn:ietf:params:xml:ns:pidf:person\" xmlns:es=\"urn:ietf:params:xml:ns:pidf:rpid:status:rpid-status\" xmlns:ep=\"urn:ietf:params:xml:ns:pidf:rpid:rpid-person\"><br>+<presence entity=\"sip:presence@127.0.0.1:5061\" xmlns=\"urn:ietf:params:xml:ns:pidf\" xmlns:dm=\"urn:ietf:params:xml:ns:pidf:data-model\" xmlns:rpid=\"urn:ietf:params:xml:ns:pidf:rpid\"><br>  <note>Ready</note><br>  <tuple id=\"presence\"><br>   <status><br>@@ -159,9 +157,7 @@<br>   </status><br>   <contact priority=\"1\">sip:presence@127.0.0.1:5061</contact><br>  </tuple><br>- <pp:person><br>-  <status /><br>- </pp:person><br>+ <dm:person /><br> </presence>" check_it="true" search_in="body" assign_to="presence5" /><br>     </action><br>   </recv><br>diff --git a/tests/channels/pjsip/publish/presence_xpidf/sipp/publish.xml b/tests/channels/pjsip/publish/presence_xpidf/sipp/publish.xml<br>index 599009d..af0f6e3 100644<br>--- a/tests/channels/pjsip/publish/presence_xpidf/sipp/publish.xml<br>+++ b/tests/channels/pjsip/publish/presence_xpidf/sipp/publish.xml<br>@@ -105,8 +105,8 @@<br>  <presentity uri=\"sip:presence@127.0.0.1:5061;method=SUBSCRIBE\" /><br>  <atom atomid=(.*?) id=\"presence\"><br>   <address uri=\"sip:presence@127.0.0.1:5061;user=ip\" priority=\"0.80000\"><br>-   <status status=\"closed\" /><br>-   <msnsubstatus substatus=\"offline\" /><br>+   <status status=\"inuse\" /><br>+   <msnsubstatus substatus=\"onthephone\" /><br>   </address><br>  </atom><br> </presence>" check_it="true" search_in="body" assign_to="presence4" /><br>diff --git a/tests/channels/pjsip/subscriptions/presence/presence_pidf/state_check.py b/tests/channels/pjsip/subscriptions/presence/presence_pidf/state_check.py<br>index f51a725..ffe82a0 100644<br>--- a/tests/channels/pjsip/subscriptions/presence/presence_pidf/state_check.py<br>+++ b/tests/channels/pjsip/subscriptions/presence/presence_pidf/state_check.py<br>@@ -11,10 +11,10 @@<br> LOGGER = logging.getLogger(__name__)<br> <br> states = [<br>-    ('INUSE', 2, "On the phone"),<br>-    ('ONHOLD', 2, "On hold"),<br>-    ('BUSY', 2, "On the phone"),<br>-    ('RINGING', 2, "Ringing"),<br>+    ('INUSE', 1, "On the phone"),<br>+    ('ONHOLD', 1, "On hold"),<br>+    ('BUSY', 1, "On the phone"),<br>+    ('RINGING', 1, "Ringing"),<br>     ('UNAVAILABLE', 2, "Unavailable"),<br>     ('NOT_INUSE', 1, "Ready"),<br>     ('', 1, "Ready")  # Final state upon subscription teardown<br>diff --git a/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml b/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml<br>index 17bba83..027c6e1 100644<br>--- a/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml<br>+++ b/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml<br>@@ -62,12 +62,12 @@<br>         # Expected namespaces for PIDF bodies.<br>         namespaces:<br>             default: 'urn:ietf:params:xml:ns:pidf'<br>-            pp: 'urn:ietf:params:xml:ns:pidf:person'<br>-            ep: 'urn:ietf:params:xml:ns:pidf:rpid:rpid-person'<br>+            pp: 'urn:ietf:params:xml:ns:pidf:data-model'<br>+            ep: 'urn:ietf:params:xml:ns:pidf:rpid'<br>         # All expected element tag names for PIDF bodies.<br>         tags:<br>             ['presence', 'note', 'tuple', 'status', 'basic', 'contact',<br>-             'pp:person', 'ep:activities']<br>+             'pp:person', 'ep:activities', 'ep:on-the-phone']<br>         # Regex patterns for element attributes for each body in order. Some<br>         # attribute values of elements differ for each body depending on the<br>         # body type and state changes. Therefore we list them in the order that<br>@@ -134,28 +134,23 @@<br>                 contact: '^"alice" <sip:alice@127.0.0.1(:5060)?>$'<br>             -<br>                 note: 'Ringing'<br>-                basic: 'closed'<br>-                activities: 'ep:busy'<br>+                basic: 'open'<br>                 contact: '^"alice" <sip:alice@127.0.0.1(:5060)?>$'<br>             -<br>                 note: 'On the phone'<br>-                basic: 'closed'<br>-                activities: 'ep:busy'<br>+                basic: 'open'<br>                 contact: '^"alice" <sip:alice@127.0.0.1(:5060)?>$'<br>             -<br>                 note: 'On hold'<br>-                basic: 'closed'<br>-                activities: 'ep:busy'<br>+                basic: 'open'<br>                 contact: '^"alice" <sip:alice@127.0.0.1(:5060)?>$'<br>             -<br>                 note: 'On the phone'<br>-                basic: 'closed'<br>-                activities: 'ep:busy'<br>+                basic: 'open'<br>                 contact: '^"alice" <sip:alice@127.0.0.1(:5060)?>$'<br>             -<br>                 note: 'Unavailable'<br>                 basic: 'closed'<br>-                activities: 'ep:away'<br>                 contact: '^"alice" <sip:alice@127.0.0.1(:5060)?>$'<br>             -<br>                 note: 'Ready'<br>diff --git a/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_xpidf/test-config.yaml b/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_xpidf/test-config.yaml<br>index b6bfc53..8918bae 100644<br>--- a/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_xpidf/test-config.yaml<br>+++ b/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_xpidf/test-config.yaml<br>@@ -118,9 +118,9 @@<br>                     uri: '^"alice" <sip:alice@127.0.0.1(:5060)?>;user=ip$'<br>                     priority: '^0\.80000$'<br>                 status:<br>-                    status: '^closed$'<br>+                    status: '^inuse$'<br>                 msnsubstatus:<br>-                    substatus: '^offline$'<br>+                    substatus: '^onthephone$'<br>             -<br>                 presentity:<br>                     uri: '^sip:bob@127.0.0.1(:5060)?;method=SUBSCRIBE$'<br>@@ -131,9 +131,9 @@<br>                     uri: '^"alice" <sip:alice@127.0.0.1(:5060)?>;user=ip$'<br>                     priority: '^0\.80000$'<br>                 status:<br>-                    status: '^closed$'<br>+                    status: '^inuse$'<br>                 msnsubstatus:<br>-                    substatus: '^offline$'<br>+                    substatus: '^onthephone$'<br>             -<br>                 presentity:<br>                     uri: '^sip:bob@127.0.0.1(:5060)?;method=SUBSCRIBE$'<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6112">change 6112</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6112"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ifb7bfa23172cd6481f788c35124ddcca772dbe1f </div>
<div style="display:none"> Gerrit-Change-Number: 6112 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>