Subject: [Sipping] RFC3680 , outbound, reg-event and gruu-reg-event

From: OKUMURA Shinji <[email-masked]>
Date: Thu, 19 Feb 2009 14:06:46 +0900

Hi,

Now I'm studying RFC3680 and draft-ietf-sip-outbound-16.
I have some questions about the following SIP sequence.

Q1. Call-ID of 5 and 11 is different, but should the both be the same one?
	if those are not the same and contact is gruu, will old temp-gruus be deleted?

Q2. "id"s of two <contact> in 15 are the same, but should two "id"s be different?
	RFC3680 says,
	"However, unlike the id attribute for an address-
	of-record, if the URI for two contacts are the same, their
	id attributes SHOULD be the same across notifications."

	Is the above rule adapted to this case?

Q3. Is unknown-param "reg-id" necessary in 15?
	If optional attributes(expires, call-id, cseq and duration) are not exist,
	two <contact> element will be identical.

     Bob         EP1   EP2     Proxy        Alice
      |           |     |        |            |
    1)|           |     |        |<-SUBSCRIBE-|
    2)|           |     |        |-200 OK---->|
    3)|           |     |        |-NOTIFY---->|
    4)|           |     |        |<-200 OK----|
    5)|-REGISTER->|     |        |            |
    6)|           |---REGISTER-->|            |
    7)|           |<----200 OK---|            |
    8)|<-200 OK---|     |        |            |
    9)|           |     |        |-NOTIFY---->|
   10)|           |     |        |<-200 OK----|
   11)|----REGISTER---->|        |            |
   12)|           |     |--REG-->|            |
   13)|           |     |<-200---|            |
   14)|<----200 OK------|        |            |
   15)|           |     |        |-NOTIFY---->|
   16)|           |     |        |<-200 OK----|
      |           |     |        |            |

 1)
   SUBSCRIBE sip:[email-masked] SIP/2.0
   Via: SIP/2.0/UDP 192.0.2.1;branch=z9hG4bKnashds7
   From: sip:[email-masked];tag=123aa9
   To: sip:[email-masked]
   Call-ID: [email-masked]
   CSeq: 9887 SUBSCRIBE
   Contact: sip:[email-masked]
   Event: reg
   Max-Forwards: 70
   Accept: application/reginfo+xml

 2)
   SIP/2.0 200 OK
   Via: SIP/2.0/UDP 192.0.2.1;branch=z9hG4bKnashds7
   From: sip:[email-masked];tag=123aa9
   To: sip:[email-masked];tag=xyzygg
   Call-ID: [email-masked]
   CSeq: 9987 SUBSCRIBE
   Contact: sip:proxy.example.com
   Expires: 3600

 3)
   NOTIFY sip:[email-masked] SIP/2.0
   Via: SIP/2.0/UDP proxy.example.com;branch=z9hG4bKnasaii
   From: sip:[email-masked];tag=xyzygg
   To: sip:[email-masked];tag=123aa9
   Call-ID: [email-masked]
   CSeq: 1288 NOTIFY
   Contact: sip:proxy.example.com
   Event: reg
   Max-Forwards: 70
   Content-Type: application/reginfo+xml
   Content-Length: ...

   <?xml version="1.0"?>
   <reginfo xmlns="urn:ietf:params:xml:ns:reginfo"
                version="0" state="full">
     <registration aor="sip:[email-masked]" id="a7" state="init" />
   </reginfo>

 5)
   REGISTER sip:example.com SIP/2.0
   Via: SIP/2.0/TCP 192.0.2.2;branch=z9hG4bKnashds7
   Max-Forwards: 70
   From: Bob <sip:[email-masked]>;tag=7F94778B653B
   To: Bob <sip:[email-masked]>
   Call-ID: 16CB75F21C70
   CSeq: 1 REGISTER
   Supported: path, outbound
   Route: <sip:ep1.example.com;lr>
   Contact: <sip:[email-masked];transport=tcp>;reg-id=1
    ;+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
   Content-Length: 0

 8)
   SIP/2.0 200 OK
   Via: SIP/2.0/TCP 192.0.2.15;branch=z9hG4bKnuiqisi
   Via: SIP/2.0/TCP 192.0.2.2;branch=z9hG4bKnashds7
   From: Bob <sip:[email-masked]>;tag=7F94778B653B
   To: Bob <sip:[email-masked]>;tag=6AF99445E44A
   Call-ID: 16CB75F21C70
   CSeq: 1 REGISTER
   Supported: path, outbound
   Require: outbound
   Contact: <sip:[email-masked];transport=tcp>;reg-id=1;expires=3600
    ;+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
   Path: <sip:VskztcQ/[email-masked];lr;ob>
   Content-Length: 0

 9)
   NOTIFY sip:[email-masked] SIP/2.0
   Via: SIP/2.0/UDP proxy.example.com;branch=z9hG4bKnasaij
   From: sip:[email-masked];tag=xyzygg
   To: sip:[email-masked];tag=123aa9
   Call-ID: [email-masked]
   CSeq: 1289 NOTIFY
   Contact: sip:proxy.example.com
   Event: reg
   Max-Forwards: 70
   Content-Type: application/reginfo+xml
   Content-Length: ...

   <?xml version="1.0"?>
   <reginfo xmlns="urn:ietf:params:xml:ns:reginfo"
             version="1" state="partial">
     <registration aor="sip:[email-masked]" id="a7" state="active">
       <contact id="76" state="active" event="registered" expires="3600"
             duration-registered="0">
          <uri>sip:[email-masked];transport=tcp</uri>
       </contact>
     </registration>
   </reginfo>

11)
   REGISTER sip:example.com SIP/2.0
   Via: SIP/2.0/TCP 192.0.2.2;branch=z9hG4bKnqr9bym
   Max-Forwards: 70
   From: Bob <sip:[email-masked]>;tag=755285EABDE2
   To: Bob <sip:[email-masked]>
   Call-ID: E05133BD26DD
   CSeq: 1 REGISTER
   Supported: path, outbound
   Route: <sip:ep2.example.com;lr>
   Contact: <sip:[email-masked];transport=tcp>;reg-id=2
    ;+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
   Content-Length: 0

14)
   SIP/2.0 200 OK
   Via: SIP/2.0/TCP 192.0.2.2;branch=z9hG4bKnqr9bym
   From: Bob <sip:[email-masked]>;tag=755285EABDE2
   To: Bob <sip:[email-masked]>;tag=49A9AD0B3F6A
   Call-ID: E05133BD26DD
   Supported: path, outbound
   Require: outbound
   CSeq: 1 REGISTER
   Contact: <sip:[email-masked];transport=tcp>;reg-id=1;expires=3590
    ;+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
   Contact: <sip:[email-masked];transport=tcp>;reg-id=2;expires=3600
    ;+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
   Path: <sip:wazHDLdIMtUg6r0I/[email-masked];lr;ob>
   Content-Length: 0

15)
   NOTIFY sip:[email-masked] SIP/2.0
   Via: SIP/2.0/UDP proxy.example.com;branch=z9hG4bKnasaik
   From: sip:[email-masked];tag=xyzygg
   To: sip:[email-masked];tag=123aa9
   Call-ID: [email-masked]
   CSeq: 1290 NOTIFY
   Contact: sip:proxy.example.com
   Event: reg
   Max-Forwards: 70
   Content-Type: application/reginfo+xml
   Content-Length: ...

   <?xml version="1.0"?>
   <reginfo xmlns="urn:ietf:params:xml:ns:reginfo"
             version="1" state="partial">
     <registration aor="sip:[email-masked]" id="a7" state="active">
       <contact id="76" state="active" event="registered" expires="3590"
             callid="16CB75F21C70" cseq="1" duration-registered="10">
          <uri>sip:[email-masked];transport=tcp</uri>
          <unknown-param name="+sip.instance">
            "&lt;urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF&gt;"
          </unknown-param>
          <unknown-param name="reg-id">"1"</unknown-param>
       </contact>
       <contact id="76" state="active" event="registered" expires="3600"
             callid="E05133BD26DD" cseq="1" duration-registered="0">
          <uri>sip:[email-masked];transport=tcp</uri>
          <unknown-param name="+sip.instance">
            "&lt;urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF&gt;"
          </unknown-param>
          <unknown-param name="reg-id">"2"</unknown-param>
       </contact>
     </registration>
   </reginfo>

Regards,
Shinji