Ok. Then it should be this one. https://tools.ietf.org/html/rfc3903#section-8.2
The ``SIP-If-Match`` is missing from any PUBLISH. pua is not doing the same depending on db_mode.
Even if ``etag`` is not set we need to search for previous record. OK, first PUBLISH will never have a record but the rest yes.
So, with db_mode == 0: First PUBLISH ``` 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> ``` ``` 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 ``` second PUBLISH ``` 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> ``` ``` 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 ```
But with db_mode == 2: fist PUBLISH ``` 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> ``` ``` 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 ``` second PUBLISH: ``` 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> ``` ``` 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 ```