Subject: [siprec] Reason header representation in XML and its schema

From: "Ram Mohan R (rmohanr)" <[email-masked]>
Date: Thu, 2 May 2013 17:07:48 +0000

Hi all,

In IETF86 we agreed on the following for Reason header.
1) support SIP reason header format  and have equivalent to SIP Reason
header in XML. We should also provide a way to carry over multiple reason
header(s) since a CS can have more than one SIP dialog.

Towards that the following is the change to XML schema. In the ver 11 of
the metadata, maxOccurs for reason XML element is not mentioned(defaulted
to 1). Now we have to modify the same to say unbounded to allow multiple
reason header XML elements and also to have the attributes cause and
protocol. Hence the XML element has to changed from simpleElement to
ComplexElement

Modified XML schema definition for reason header element is:

<xs:complexType name="reason" type="xs:string" minOccurs="0"
maxOccurs="unbounded">
   <xs:attribute name="cause" type="xs:nonNegativeInteger" use="required"/>
   <xs:attribute name="protocol" type="xs:string" fixed="SIP"/>
   </xs:complexType>

Example of how it would look is (already discussed in the mailer):

<reason cause="200" protocol="SIP">Call completed elsewhere</reason>
<reason cause="600" protocol="SIP">Busy Everywhere</reason>

A question here:
Do we really need the attribute protocol="SIP" here since SIPREC is going
to have only SIP always ?

Regards,
Ram

---

From: "Ram Mohan R (rmohanr)" <[email-masked]>
Date: Thu, 2 May 2013 17:30:00 +0000

> On 02/05/13 10:37 PM, "Ram Mohan R (rmohanr)" <[email-masked]> wrote:

>   <xs:attribute name="protocol" type="xs:string" fixed="SIP"/>

A small correction here. The above representation of schema gives some
warning when I validated with XSD tool.
Instead the below representation should be used

<xs:element name="reason" minOccurs="0" maxOccurs="unbounded">
  <xs:complexType>
    <xs:simpleContent>
     <xs:extension base="xs:string">
      <xs:attribute type="xs:short" name="cause" use="required"/>
      <xs:attribute type="xs:string" name="protocol" fixed="SIP"/>
     </xs:extension>
    </xs:simpleContent>
   </xs:complexType>
         </xs:element>

Regards,
Ram

>_______________________________________________
>siprec mailing list
>[email-masked]
>https://www.ietf.org/mailman/listinfo/siprec
>

---

From: Paul Kyzivat <[email-masked]>
Date: Thu, 02 May 2013 13:42:16 -0400

> to have only SIP always ?

Yes. The reason is (at least may) being carried over from an actual 
Reason header in the CS. And the Reason header in the CS can have other 
protocols. (E.g., Q.850.)

	Thanks,
	Paul

---

From: "Ram Mohan R (rmohanr)" <[email-masked]>
Date: Thu, 2 May 2013 17:45:37 +0000

> On 02/05/13 11:12 PM, "Paul Kyzivat" <[email-masked]> wrote:

>protocols. (E.g., Q.850.)

Ok. This is possible. In that case I would have to change the schema to
have the attribute take either SIP or Q.850.

Ram

---

From: Paul Kyzivat <[email-masked]>
Date: Thu, 02 May 2013 13:50:02 -0400

one comment inline

>        <xs:attribute type="xs:string" name="protocol" fixed="SIP"/>

I think the above should say 'default' rather than 'fixed'.

---

From: Paul Kyzivat <[email-masked]>
Date: Thu, 02 May 2013 13:56:06 -0400

> have the attribute take either SIP or Q.850.

I just replied on that. I think you should make the default SIP, but 
allow any string. That way it won't need to change as new reason 
protocols are defined.

	Thanks,
	Paul

---

From: "Ram Mohan R (rmohanr)" <[email-masked]>
Date: Fri, 3 May 2013 03:07:04 +0000

> On 02/05/13 11:26 PM, "Paul Kyzivat" <[email-masked]> wrote:

>allow any string. That way it won't need to change as new reason

Ok. Will make this change.

Thanks,
Ram

---

From: "Ram Mohan R (rmohanr)" <[email-masked]>
Date: Fri, 3 May 2013 12:55:03 +0000

Modified XML Schema incorporating the change suggested by Paul.

<xs:element name="reason" minOccurs="0" maxOccurs="unbounded">
 <xs:complexType>
  <xs:simpleContent>
   <xs:extension base="xs:string">
    <xs:attribute type="xs:short" name="cause" use="required"/>
    <xs:attribute type="xs:string" name="protocol" default="SIP"/>
   </xs:extension>
  </xs:simpleContent>
 </xs:complexType>
         </xs:element>

Examples would look like

<reason cause="200" protocol="SIP">Call completed elsewhere</reason>
<reason cause="600" protocol="SIP">Busy Everywhere</reason>
<reason cause="16" protocol="Q.850">Terminated</reason>

Let me know if any one has concerns with this approach before 10/5.
Otherwise we will incorporate this in the next revision.

Thanks,
Ram

> On 03/05/13 8:37 AM, "Ram Mohan R (rmohanr)" <[email-masked]> wrote:

---

From: Paul Kyzivat <[email-masked]>
Date: Fri, 03 May 2013 11:05:38 -0400

> <reason cause="600" protocol="SIP">Busy Everywhere</reason>

Of course, because of the default, the above could be simplified to:

   <reason cause="200">Call completed elsewhere</reason>
   <reason cause="600">Busy Everywhere</reason>

	Thanks,
	Paul