<p></p>
<p>Ok. Then it should be this one. <a href="https://tools.ietf.org/html/rfc3903#section-8.2" rel="nofollow">https://tools.ietf.org/html/rfc3903#section-8.2</a></p>
<p>The <code>SIP-If-Match</code> is missing from any PUBLISH. pua is not doing the same depending on db_mode.</p>
<p>Even if <code>etag</code> is not set we need to search for previous record. OK, first PUBLISH will never have a record but the rest yes.</p>
<p>So, with db_mode == 0:<br>
First PUBLISH</p>
<pre><code>PUBLISH sip:testuser1002@spce.test SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bK5b55.aee12144000000000000000000000000.0
To: <sip:testuser1002@spce.test>
From: <sip:testuser1002@spce.test>;tag=40bd18ec79e1d8f7e9c3f54805d1ecb3-441aa447
CSeq: 10 PUBLISH
Call-ID: 3cce05ee326f0119-24523@127.0.0.1
Content-Length: 577
User-Agent: Sipwise NGCP Proxy 8.X
Max-Forwards: 70
Event: dialog
Expires: 23761
Content-Type: application/dialog-info+xml

<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="0" state="full" entity="sip:testuser1002@spce.test">
  <dialog id="NGCP%invite_shared_line%///1-26774@127.126.0.1" call-id="NGCP%invite_shared_line%///1-26774@127.126.0.1" direction="initiator">
    <state>Trying</state>
    <remote>
      <identity>sip:1003@spce.test</identity>
      <target uri="sip:1003@spce.test"/>
    </remote>
    <local>
      <identity>sip:testuser1002@spce.test</identity>
      <target uri="sip:testuser1002@spce.test"/>
    </local>
  </dialog>
</dialog-info>
</code></pre>
<pre><code>SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bK5b55.aee12144000000000000000000000000.0
To: <sip:testuser1002@spce.test>;tag=f3067022b00c564156251ba2f28f331f-7286b99a
From: <sip:testuser1002@spce.test>;tag=40bd18ec79e1d8f7e9c3f54805d1ecb3-441aa447
CSeq: 10 PUBLISH
Call-ID: 3cce05ee326f0119-24523@127.0.0.1
Expires: 3600
SIP-ETag: a.1596025051.24523.1.0
Server: Sipwise NGCP Proxy 8.X
Content-Length: 0
</code></pre>
<p>second PUBLISH</p>
<pre><code>PUBLISH sip:testuser1002@spce.test SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bK5e55.d35147e4000000000000000000000000.0
To: <sip:testuser1002@spce.test>
From: <sip:testuser1002@spce.test>;tag=40bd18ec79e1d8f7e9c3f54805d1ecb3-84a3a447
CSeq: 10 PUBLISH
Call-ID: 3cce05ee326f011b-24523@127.0.0.1
Content-Length: 682
User-Agent: Sipwise NGCP Proxy 8.X
Max-Forwards: 70
Event: dialog
Expires: 23761
SIP-If-Match: a.1596025051.24523.1.0
Content-Type: application/dialog-info+xml

<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="0" state="full" entity="sip:testuser1002@spce.test">
  <dialog id="NGCP%invite_shared_line%///1-26774@127.126.0.1" call-id="NGCP%invite_shared_line%///1-26774@127.126.0.1" local-tag="26774SIPpTag001" remote-tag="51E6E31F-5F2168FA000B8FF4-430B7700" direction="initiator">
    <state>early</state>
    <remote>
      <identity>sip:testuser1003@spce.test</identity>
      <target uri="sip:127.0.0.1:5085;transport=udp"/>
    </remote>
    <local>
      <identity>sip:testuser1002@spce.test</identity>
      <target uri="sip:testuser1002@127.126.0.1:51602"/>
    </local>
  </dialog>
</dialog-info>
</code></pre>
<pre><code>SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bK5e55.d35147e4000000000000000000000000.0
To: <sip:testuser1002@spce.test>;tag=f3067022b00c564156251ba2f28f331f-7286b99a
From: <sip:testuser1002@spce.test>;tag=40bd18ec79e1d8f7e9c3f54805d1ecb3-84a3a447
CSeq: 10 PUBLISH
Call-ID: 3cce05ee326f011b-24523@127.0.0.1
Expires: 3600
SIP-ETag: a.1596025051.24523.3.1
Server: Sipwise NGCP Proxy 8.X
Content-Length: 0
</code></pre>
<p>But with db_mode == 2:<br>
fist PUBLISH</p>
<pre><code>PUBLISH sip:testuser1002@spce.test SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bKbc38.a66034a3000000000000000000000000.0
To: <sip:testuser1002@spce.test>
From: <sip:testuser1002@spce.test>;tag=40bd18ec79e1d8f7e9c3f54805d1ecb3-245ea447
CSeq: 10 PUBLISH
Call-ID: 200464472a3c6cfb-497@127.0.0.1
Content-Length: 575
User-Agent: Sipwise NGCP Proxy 8.X
Max-Forwards: 70
Event: dialog
Expires: 23761
Content-Type: application/dialog-info+xml

<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="0" state="full" entity="sip:testuser1002@spce.test">
  <dialog id="NGCP%invite_shared_line%///1-2484@127.126.0.1" call-id="NGCP%invite_shared_line%///1-2484@127.126.0.1" direction="initiator">
    <state>Trying</state>
    <remote>
      <identity>sip:1003@spce.test</identity>
      <target uri="sip:1003@spce.test"/>
    </remote>
    <local>
      <identity>sip:testuser1002@spce.test</identity>
      <target uri="sip:testuser1002@spce.test"/>
    </local>
  </dialog>
</dialog-info>
</code></pre>
<pre><code>SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bKbc38.a66034a3000000000000000000000000.0
To: <sip:testuser1002@spce.test>;tag=f3067022b00c564156251ba2f28f331f-7286b99a
From: <sip:testuser1002@spce.test>;tag=40bd18ec79e1d8f7e9c3f54805d1ecb3-245ea447
CSeq: 10 PUBLISH
Call-ID: 200464472a3c6cfb-497@127.0.0.1
Expires: 3600
SIP-ETag: a.1596025403.497.1.0
Server: Sipwise NGCP Proxy 8.X
Content-Length: 0
</code></pre>
<p>second PUBLISH:</p>
<pre><code>PUBLISH sip:testuser1002@spce.test SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bK5c38.492e72e6000000000000000000000000.0
To: <sip:testuser1002@spce.test>
From: <sip:testuser1002@spce.test>;tag=40bd18ec79e1d8f7e9c3f54805d1ecb3-fad5a447
CSeq: 10 PUBLISH
Call-ID: 200464472a3c6cfd-497@127.0.0.1
Content-Length: 679
User-Agent: Sipwise NGCP Proxy 8.X
Max-Forwards: 70
Event: dialog
Expires: 23761
Content-Type: application/dialog-info+xml

<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="0" state="full" entity="sip:testuser1002@spce.test">
  <dialog id="NGCP%invite_shared_line%///1-2484@127.126.0.1" call-id="NGCP%invite_shared_line%///1-2484@127.126.0.1" local-tag="2484SIPpTag001" remote-tag="0485C5EB-5F216A4A00017C06-431B8700" direction="initiator">
    <state>early</state>
    <remote>
      <identity>sip:testuser1003@spce.test</identity>
      <target uri="sip:127.0.0.1:5085;transport=udp"/>
    </remote>
    <local>
      <identity>sip:testuser1002@spce.test</identity>
      <target uri="sip:testuser1002@127.126.0.1:51602"/>
    </local>
  </dialog>
</dialog-info>
</code></pre>
<pre><code>SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=z9hG4bK5c38.492e72e6000000000000000000000000.0
To: <sip:testuser1002@spce.test>;tag=f3067022b00c564156251ba2f28f331f-7286b99a
From: <sip:testuser1002@spce.test>;tag=40bd18ec79e1d8f7e9c3f54805d1ecb3-fad5a447
CSeq: 10 PUBLISH
Call-ID: 200464472a3c6cfd-497@127.0.0.1
Expires: 3600
SIP-ETag: a.1596025403.497.3.0
Server: Sipwise NGCP Proxy 8.X
Content-Length: 0
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2414#issuecomment-666228920">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZKKQ6O5DVFU4WX3P5DR6EWJTANCNFSM4PLSO44A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZP3O5WW3QJTFBE5NJLR6EWJTA5CNFSM4PLSO44KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE625ROA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2414#issuecomment-666228920",
"url": "https://github.com/kamailio/kamailio/issues/2414#issuecomment-666228920",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>