<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type=<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="no"?>
<?rfc iprnotified="no" ?>
<?rfc strict="no" ?>
<?rfc compact="no" ?>
<?rfc subcompact="no" ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2392 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2392.xml">
<!ENTITY RFC3261 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3261.xml">
<!ENTITY RFC3428 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3428.xml">
<!ENTITY RFC5234 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5234.xml">
<!ENTITY RFC3023 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3023.xml">
<!ENTITY RFC3629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3629.xml">
<!ENTITY RFC4474 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4474.xml">
<!ENTITY RFC3325 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3325.xml">
<!ENTITY RFC6442 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6442.xml">
<!ENTITY RFC6443 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6443.xml">
<!ENTITY RFC6881 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6881.xml">
<!ENTITY RFC7378 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7378.xml">

<!ENTITY I-D.ietf-ecrit-additional-data SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-ecrit-additional-data.xml">
<!ENTITY I-D.rosen-ecrit-addldata-subnot SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.rosen-ecrit-addldata-subnot.xml">
]>
<rfc category="std" docName="draft-ietf-ecrit-data-only-ea-13.txt" ipr="trust200902">
  <front>
    <title>Data-Only Emergency Calls</title>
    <author initials="B." surname="Rosen" fullname="Brian Rosen">
      <organization>NeuStar, Inc. </organization>
      <address>
        <postal>
          <street>470 Conrad Dr</street>
          <city>Mars</city>
          <region> PA </region>
          <code>16046 </code>
          <country>US </country>
        </postal>
        <phone> </phone>
        <email>br@brianrosen.net
        </email>
      </address>
    </author>
    <author initials="H." surname="Schulzrinne" fullname="Henning Schulzrinne">
      <organization abbrev="Columbia U.">Columbia University</organization>
      <address>
        <postal>
          <street>Department of Computer Science</street>
          <street>450 Computer Science Building</street>
          <city>New York</city>
          <region>NY</region>
          <code>10027</code>
          <country>US</country>
        </postal>
        <phone>+1 212 939 7004</phone>
        <email>hgs+ecrit@cs.columbia.edu</email>
        <uri>http://www.cs.columbia.edu</uri>
      </address>
    </author>
    <author initials="H." surname="Tschofenig" fullname="Hannes Tschofenig">
      <organization>ARM Limited</organization>
      <address>
        <postal>
          <street> </street>
          <country>Austria</country>
        </postal>
        <email>Hannes.Tschofenig@gmx.net</email>
        <uri>http://www.tschofenig.priv.at</uri>
      </address>
    </author>
    <author initials="R." surname="Gellens" fullname="Randall Gellens">
      <address>
            <email>rg+ietf@randy.pensive.org</email>
      </address>
    </author>
    <date year="2016"/>
    <area>ART</area>
    <workgroup>ECRIT</workgroup>
    <keyword>Internet-Draft</keyword>
    <keyword>CAP</keyword>
    <keyword>Common Alerting Protocol</keyword>
    <keyword>Data-Only Emergency calls</keyword>

    <abstract>
			<t>RFC 6443 'Framework for Emergency Calling Using Internet Multimedia' describes how devices use the Internet to place
   emergency calls and how Public Safety Answering Points (PSAPs) handle Internet multimedia
   emergency calls natively. The exchange of multimedia traffic for emergency services involves a SIP session establishment starting with a SIP INVITE that negotiates various parameters for that session.</t>
 
  <t>In some cases, however, the transmission of application data is all that is needed. 
   Examples of such environments include alerts issued by a temperature sensor, burglar alarm, or chemical spill sensor. Often these alerts are conveyed as one-shot data transmissions.  These type of interactions are called 'data-only emergency calls'.  This document describes a container for the data based on the Common Alerting Protocol (CAP) and its transmission using the SIP MESSAGE transaction.
  </t>
    </abstract>
  </front>

  <middle>
    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section anchor="introduction" title="Introduction">

		<t>RFC 6443 <xref target="RFC6443"/> describes how devices use the Internet to place
   emergency calls and how Public Safety Answering Points (PSAPs) handle Internet multimedia
   emergency calls natively. The exchange of multimedia traffic for emergency services involves a SIP session establishment starting with a SIP INVITE that negotiates various parameters for that session.</t>
 
  <t>In some cases, however, there is only application data to be conveyed from the end devices to a PSAP or an intermediary.
   Examples of such environments includes sensors issuing alerts, or vehicles sending crash data. These messages may be one-shot alerts to emergency authorities and do not require establishment of a session. These type of interactions are called 'data-only emergency calls'.  In this document, we use the term "call" so that similarities between data-only (non-interactive) alerts and sessions with interactive media are more obvious.
  </t>
  <t>Data-only emergency calls are similar to regular emergency calls in the sense that they
        require the emergency indications, emergency call routing functionality and may even have the same location requirements. 
        However, the communication interaction will not lead
        to the exchange of interactive media, that is, Real-Time Protocol packets, such as voice, video data or real-time text.</t> 
<t>The Common Alerting Protocol (CAP) <xref target="cap"/> is a document format for
   exchanging emergency alerts and public warnings.  CAP is mainly used
   for conveying alerts and warnings between authorities and from
   authorities to citizen/individuals.  This document is concerned with citizen to authority "alerts", where the alert is a call without any interactive media.</t>
   <t>This document describes a method of including a CAP message in a SIP transaction, either by value (the CAP message is in the body of the message, using a CID) or by reference (a URI is included in the message, which when dereferenced returns the CAP message) by defining it as a block of "additional data" as defined in <xref target="I-D.ietf-ecrit-additional-data"/>.  The additional data mechanism is also used to send alert specific data beyond that available in the CAP message.  This document also describes how a SIP MESSAGE <xref target="RFC3428"/> transaction can be used to send a data-only call.</t>

    </section>
    
    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section anchor="terminology" title="Terminology">

      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
        "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in
        RFC 2119 <xref target="RFC2119"/>.</t>
	  
    </section>


    <!-- ////////////////////////////////////////////////////////////////////////////////// -->


    <section anchor="arch" title="Architectural Overview">
	      <t>This section illustrates two envisioned usage modes: targeted and location-based emergency 
      alert routing.</t>
<t><list style="numbers">
  <t>Emergency alerts containing only data are targeted to an 
      intermediary recipient responsible for evaluating the next steps.  These steps
      could include:
     <list style="numbers"> 
         <t>Sending a non-interactive call containing only data toward a Public
            Safety Answering Point (PSAP);
         </t>
         <t>Establishing a third-party initiated emergency call towards a PSAP that could
            include audio, video, and data.
         </t>
    </list>
  </t>
  <t>Emergency alerts may be targeted to a Service URN used for IP-based 
       emergency calls where the recipient is not known to 
       the originator.  In this scenario, the alert may contain
       only data (e.g., a CAP, Geolocation header field and one or more Call-Info header fields
       containing Additional Data <xref target="I-D.ietf-ecrit-additional-data"/> in a SIP MESSAGE).
  </t>
  </list> 
</t>
<t>
<xref target="targeted"/> shows a deployment variant where a sensor 
     is pre-configured (using techniques outside the 
      scope of this document) to issue an alert to an aggregator 
      that processes these messages and performs whatever steps are necessary to appropriately 
      react to the alert. For example, a security firm may use different sensor inputs to 
      dispatch their security staff to a building they protect or to initiate a third-party emergency call.</t>      
      
     <t>
     <figure anchor="targeted" title="Targeted Emergency Alert Routing">
        <artwork xml:space="preserve">
          <![CDATA[
 +------------+              +------------+
 | Sensor     |              | Aggregator |
 |            |              |            | 
 +---+--------+              +------+-----+
     |                              |
  Sensors                           |
  trigger                           |
  emergency                         |
  alert                             |
     |        MESSAGE with CAP      |
     |----------------------------->|
     |                              |
     |                           Aggregator
     |                           processes
     |                           emergency
     |                           alert
     |        200 (OK)              |
     |<-----------------------------|
     |                              |
     |                              |
          ]]></artwork>
      </figure>
</t>      
      <t>
        In <xref target="location"/> a scenario is shown whereby the alert is routed 
        using location information and a Service URN. An emergency services routing 
        proxy (ESRP) may use LoST to determine the next hop proxy to route the alert 
        message to. A possible receiver is a PSAP and the recipient of the alert 
        may be a call taker. In the generic case, there is very likely no prior relationship between 
        the originator and the receiver, e.g., a PSAP. A PSAP, for example, is likely to receive and 
        accept alerts from entities it cannot authorize. This scenario corresponds to the 
        classic emergency services use case and the description in 
        <xref target="RFC6881"/> is applicable.  In this use case, the only difference between an emergency call and an emergency data-only call is that the former uses INVITE, creates a session, and negotiates one or more media streams, while the latter uses MESSAGE, does not create a session, and does not have media.  
      </t>
      <t>
      <figure anchor="location" title="Location-Based Emergency Alert Routing">
        <artwork xml:space="preserve">
          <![CDATA[
                        +-----------+                  +----------+
   +--------+           | ESRP      |                  | PSAP     |
   | Sensor |           |           |                  |          |
   +---+----+           +---+-------+                  +---+------+
       |                    |                              |
    Sensors                 |                              |
    trigger                 |                              |
    emergency               |                              |
    alert                   |                              |
       |                    |                              |
       |                    |                              |
       | MESSAGE with CAP   |                              |
       | (including Service URN,                           |
       | such as urn:service:sos)                          |
       |------------------->|                              |
       |                    |                              |
       |              ESRP performs                        |
       |              emergency alert                      |
       |              routing                              |
       |                    |  MESSAGE with CAP            |
       |                    |  (including identity info)   | 
       |                    |----------------------------->|
       |                    |                              |
       |                    |                           PSAP
       |                    |                           processes
       |                    |                           emergency
       |                    |                           alert
       |                    |        200 (OK)              |
       |                    |<-----------------------------|
       |                    |                              |
       |  200 (OK)          |                              |
       |<-------------------|                              |
       |                    |                              |
       |                    |                              |
]]></artwork>
      </figure>

      </t>
    </section>

    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section title="Protocol Specification">

      <section title="CAP Transport">

        <t>A CAP message may be sent in the initial message of any SIP transaction.  However, this document only addresses sending a CAP message in a SIP INVITE that initiates an emergency call, or in a SIP MESSAGE transaction for a one-shot, data-only emergency call.  Behavior with other transactions is not defined.</t>

<t>The CAP message is included in a SIP message as an additional-data block <xref target="I-D.ietf-ecrit-additional-data"/>.  Accordingly, it is introduced to the SIP message with a Call-Info header field with a purpose of "EmergencyCallData.cap".
The header field may contain a URI that is used by the recipient (or in some cases, an intermediary) to obtain the CAP message.  Alternative, the Call-Info header field may contain a Content Indirect url <xref target="RFC2392"/> and the CAP message included in the body of the message.  In the latter case, the CAP message is located in a MIME block of the type 'application/emergencyCallData.cap+xml'.</t>
        <t>If the SIP server does not support the functionality required to fulfill the
   request then a 501 Not Implemented MUST be returned as specified in RFC 3261 <xref target="RFC3261"/>. This is the appropriate response when a UAS does not
   recognize the request method and is not capable of supporting it for
   any user.</t>
   
        <t>The 415 Unsupported Media Type error MUST be returned as specified in RFC 3261 <xref target="RFC3261"/> 
        if the SIP server is refusing to service the request because the message
   body of the request is in a format not supported by the server for
   the requested method.  The server MUST return a list of acceptable
   formats using the Accept, Accept-Encoding, or Accept-Language header
   fields, depending on the specific problem with the content.</t>
   
      </section>

      <section title="Profiling of the CAP Document Content">
        <t>The usage of CAP MUST conform to the specification provided with <xref target="cap"/>.
          For usage with SIP the following additional requirements are imposed: </t>
        <t><list
            style="hanging">
           <t hangText="sender:">The following restrictions and conditions apply to setting the value of the &lt;sender&gt; element:
           <list style="hanging"> 
              <t hangText="Originator is a SIP entity, Author indication irrelevant:">When the alert was created by a SIP-based originator and it is not useful to be explicit about the author of the alert, then the &lt;sender&gt; element
              MUST be populated with the SIP URI of the user agent.</t>
              <t hangText="Originator is a non-SIP entity, Author indication irrelevant:"> 
              When the alert was created by a non-SIP based 
              entity and the identity of this original sender is to be preserved, then this identity MUST be 
              placed into the &lt;sender&gt; element. In this situation it is not useful to be explicit about the author of the alert. The specific type of identity being used will depend on the technology used by the original originator.</t>
              <t hangText="Author indication relevant:"> When the author is different from the actual originator of the message and this distinction should be preserved, then the &lt;sender&gt; element MUST NOT contain the SIP URI of the user agent.
              </t>
           </list>

          <vspace blankLines="1"/></t>

          <t hangText="incidents:"> The &lt;incidents&gt; element MUST be present.  This 
             incident identifier MUST be chosen in such a way that it is unique for a given 
             &lt;sender, expires, incidents&gt; combination. Note that the &lt;expires&gt; element 
             is optional and may not be present.<vspace blankLines="1"/></t>
            <t hangText="scope:">The value of the &lt;scope&gt; element MAY be set to
              "Private" if the alert is not meant for public consumption. 
              The &lt;addresses&gt; element is, however, not used by this specification since the 
              message routing is performed by SIP and the respective address information is already 
              available in other SIP header fields. Populating information twice into different parts of 
              the message may lead to inconsistency. <vspace blankLines="1"/> </t>
            <t hangText="parameter:">The &lt;parameter&gt; element MAY contain additional
              information specific to the sendor. <vspace blankLines="1"/></t>
            <t hangText="area:">It is RECOMMENDED to omit this element when constructing a message.
            If the CAP message already contains an &lt;area&gt; element, then the specified
            location information SHOULD be copied into the PIDF-LO structure of the 'geolocation' 
            header field.</t>
          </list></t>
      </section>
      <section title="Sending a Data-Only Emergency Call">
     <t>A data-only emergency call is sent using a SIP MESSAGE transaction with a CAP URI or body as described above in a manner similar to how an emergency call with interactive media is sent, as described in <xref target="RFC6881"/>.  The MESSAGE transaction does not create a session nor send media, but otherwise, the header content of the transaction, routing, and processing of data-only calls are the same as those of other emergency calls.</t> 
     </section>
    </section>

    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

<section anchor="error" title="Error Handling"> 

<t>This section defines a new error response code and a header field for additional information.</t>

<section title="425 (Bad Alert Message) Response Code">

<t>This SIP extension creates a new location-specific response code,
   defined as follows:
   <list style="empty"> 
   <t>425 (Bad Alert Message)</t>
   </list> 
</t> 

<t>The 425 response code is a rejection of
   the request due to its included alert content, indicating that it was malformed or not satisfactory for the
   recipient's purpose.</t>

<t>A SIP intermediary can also reject an alert it receives from a
   UA when it understands that the provided alert is malformed.</t>

<t><xref target="error-header"/> describes an AlertMsg-Error header field with
   more details about what was wrong with the alert message in
   the request.  This header field MUST be included in the 425 response.</t>

<t>It is only appropriate to generate a 425 response when the
   responding entity has no other information in 
   the request that is usable by the responder.</t>

<t>A 425 response code MUST NOT be sent in response to a request that lacks an alert message, as the user agent in that case may not
   support this extension. </t>

<t>A 425 response is a final response within
   a transaction, and MUST NOT terminate an existing dialog.</t>
</section> 

<section anchor="error-header" title="The AlertMsg-Error Header Field">

<t>The AlertMsg-Error header field provides additional information about what was wrong with the original request. In some cases the provided information will be used for debugging purposes.</t>
   
<t>The AlertMsg-Error
   header field has the following ABNF <xref target="RFC5234"/>:</t>

<t>
<figure>
          <artwork>
            <![CDATA[  
   message-header   /= AlertMsg-Error
                           ; (message-header from 3261)
   AlertMsg-Error   = "AlertMsg-Error" HCOLON
                           ErrorValue
   ErrorValue       =  error-code
                            *(SEMI error-params)
   error-code       = 1*3DIGIT
   error-params     = error-code-text
                            / generic-param ; from RFC3261
   error-code-text  = "code" EQUAL quoted-string ; from RFC3261
]]></artwork>
        </figure>
      </t>
      
   <t>HCOLON, SEMI, and EQUAL are defined in RFC3261 <xref target="RFC3261"/>. DIGIT is
   defined in RFC5234 <xref target="RFC5234"/>.</t>

   <t>The AlertMsg-Error header field MUST contain only one
   ErrorValue to indicate what was wrong with the alert payload
   the recipient determined was bad.</t>
   
   <t>
   The ErrorValue
   contains a 3-digit error code indicating what was wrong with the
   alert in the request.  This error code has a corresponding quoted
   error text string that is human understandable.  The text string are
   OPTIONAL, but RECOMMENDED for human readability, similar to the
   string phrase used for SIP response codes. That said, the strings
   are complete enough for rendering to the user, if so desired. The
   strings in this document are recommendations, and are not
   standardized -- meaning an operator can change the strings -- but MUST
   NOT change the meaning of the error code. Similar to how RFC 3261
   specifies, there MUST NOT be more than one string per error code.
   </t>
   <t>
   The AlertMsg-Error header field MAY be included in any response
    if an alert message was in the request part of the same transaction.  
    For
   example, a UA includes an alert in an MESSAGE to a PSAP. The PSAP can
   accept this MESSAGE, thus creating a dialog, even though its UA
   determined that the alert message contained in the MESSAGE was bad. 
   The PSAP merely
   includes an AlertMsg-Error header field value in the 200 OK to the
   MESSAGE, thus informing the UA that the MESSAGE was accepted but the alert
   provided was bad.</t>

   <t>If, on the other hand, the PSAP cannot accept the transaction without a
   suitable alert message, a 425 response is sent.</t>

   <t>A SIP intermediary that requires the UA's alert message in order to
   properly process the transaction may also sends a 425 with an
   AlertMsg-Error code.</t>

   <t>This document defines an initial list of AlertMsg-Error values for any
   SIP response, including provisional responses (other than 100
   Trying) and the new 425 response. There MUST be no more than
   one AlertMsg-Error code in a SIP response.</t>

<t>AlertMsg-Error: 100 ; code="Cannot Process the Alert Payload"</t>

<t>AlertMsg-Error: 101 ; code="Alert Payload was not present or could not be found"</t>

<t>AlertMsg-Error: 102 ; code="Not enough information to determine
        the purpose of the alert"</t>

<t>AlertMsg-Error: 103 ; code="Alert Payload was corrupted"</t>

<t>Additionally, if an entity cannot or chooses not to process the alert message
   from a SIP request, a 500 (Server Internal Error) SHOULD be used
   with or without a configurable Retry-After header field.</t>

</section> 


</section> 
    <!-- ////////////////////////////////////////////////////////////////////////////////// -->


 
    <section anchor="callbacks" title="Call Backs">
<t>This document does not describe any method for the recipient to call back the sender of a data-only call.  Usually, these alerts are sent by automata, which do not have a mechanism to receive calls of any kind.  The identifier in the 'From' header field may be useful to obtain more information, but any such mechanism is not defined in this document.  The CAP message may contain related contact information for the sender.</t>
</section>

 
    <section anchor="largedata" title="Handling Large Amounts of Data">
<t>It is not atypical for sensors to have large quantities of data that they may wish 
to send.  Including large amounts of data in a MESSAGE is not advisable, 
because SIP entities are usually not equipped to handle very large messages.  
In such cases, the sender SHOULD make use of the by-reference mechanisms defined 
in <xref target="I-D.ietf-ecrit-additional-data"/>, which involves making the data available via HTTPS (either at the originator or at another entity), placing a URI to the data in the 'Call-Info' header field, and the recipient using 
HTTPS to retrieve the data.  The CAP message itself can be sent by-reference 
using this mechanism, as well as any or all of the Additional Data blocks that may 
contain sensor-specific data.</t>
</section>
        <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section anchor="example" title="Example">

      <t>This example shows a CAP document indicating a BURGLARY alert issued by
        a sensor called 'sensor1@domain.com'. The location of the sensor can be 
        obtained from the attached location information provided via the 'geolocation' header field 
        contained in the SIP MESSAGE structure. Additionally, the sensor provided some
        data along with the alert message, using proprietary information elements intended only to be 
        processed by the receiver, a SIP entity acting as an aggregator.</t>
      <t>
        <figure anchor="warning1" title="Example Message conveying an Alert to an aggregator">
          <artwork>
            <![CDATA[      
   MESSAGE sip:aggregator@domain.com SIP/2.0
   Via: SIP/2.0/TCP sensor1.domain.com;branch=z9hG4bK776sgdkse
   Max-Forwards: 70
   From: sip:sensor1@domain.com;tag=49583
   To: sip:aggregator@domain.com
   Call-ID: asd88asd77a@1.2.3.4
   Geolocation: <cid:abcdef@domain.com>
     ;routing-allowed=yes
   Supported: geolocation
   Accept: application/pidf+xml,application/EmergencyCallData.cap+xml
   CSeq: 1 MESSAGE
   Call-Info: cid:abcdef2@domain.com;purpose=EmergencyCallData.cap
   Content-Type: multipart/mixed; boundary=boundary1
   Content-Length: ...

   --boundary1

   Content-Type: application/EmergencyCallData.cap+xml
   Content-ID: <abcdef2@domain.com>
   Content-Disposition: by-reference;handling=optional
  <?xml version="1.0" encoding="UTF-8"?>

  <alert xmlns="urn:oasis:names:tc:emergency:cap:1.1">
    <identifier>S-1</identifier>
    <sender>sip:sensor1@domain.com</sender>
    <sent>2008-11-19T14:57:00-07:00</sent>
    <status>Actual</status>
    <msgType>Alert</msgType>
    <scope>Private</scope>
    <incidents>abc1234</incidents>
    <info>
        <category>Security</category>
        <event>BURGLARY</event>
        <urgency>Expected</urgency>
        <certainty>Likely</certainty>
        <severity>Moderate</severity>
        <senderName>SENSOR 1</senderName>
        <parameter>
          <valueName>SENSOR-DATA-NAMESPACE1</valueName>
          <value>123</value>
        </parameter>
        <parameter>
          <valueName>SENSOR-DATA-NAMESPACE2</valueName>
          <value>TRUE</value>
        </parameter>  
    </info>
   </alert>

   --boundary1

   Content-Type: application/pidf+xml
   Content-ID: <abcdef2@domain.com>
   Content-Disposition: by-reference;handling=optional
   <?xml version="1.0" encoding="UTF-8"?>
       <presence
          xmlns="urn:ietf:params:xml:ns:pidf"
          xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10"
          xmlns:gbp=
                 "urn:ietf:params:xml:ns:pidf:geopriv10:basicPolicy"
          xmlns:cl="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr"
          xmlns:gml="http://www.opengis.net/gml"
          xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
          entity="pres:alice@atlanta.example.com">
        <dm:device id="sensor">
          <gp:geopriv>
            <gp:location-info>
              <gml:location>
                <gml:Point srsName="urn:ogc:def:crs:EPSG::4326">
                  <gml:pos>32.86726 -97.16054</gml:pos>
                </gml:Point>
             </gml:location>
            </gp:location-info>
            <gp:usage-rules>
              <gbp:retransmission-allowed>false
              </gbp:retransmission-allowed>
              <gbp:retention-expiry>2010-11-14T20:00:00Z
              </gbp:retention-expiry>
            </gp:usage-rules>
            <gp:method>802.11</gp:method>
          </gp:geopriv>
          <dm:timestamp>2010-11-04T20:57:29Z</dm:timestamp>
        </dm:device>
      </presence>
   --boundary1--
          ]]></artwork>
        </figure>
      </t>
      <t>This shows the same CAP document sent as a data-only emergency call towards a PSAP.</t>
      <t>
        <figure anchor="warning2" title="Example Message conveying an Alert to a PSAP">
          <artwork>
            <![CDATA[      
   MESSAGE urn:service:sos SIP/2.0
   Via: SIP/2.0/TCP sip:aggreg.1.example.com;branch=z9hG4bK776abssa
   Max-Forwards: 70
   From: sip:aggregator@example.com;tag=32336
   To: 112
   Call-ID: asdf33443a@example.com
   Route: sip:psap1.example.gov
   Geolocation: <cid:abcdef@example.com>
     ;routing-allowed=yes
   Supported: geolocation
   Accept: application/pidf+xml,application/EmergencyCallData.cap+xml
   Call-info: cid:abcdef2@domain.com;purpose=EmergencyCallData.cap
   CSeq: 1 MESSAGE
   Content-Type: multipart/mixed; boundary=boundary1
   Content-Length: ...

   --boundary1

   Content-Type: application/EmergencyCallData.cap+xml
   Content-ID: <abcdef2@example.com>
  <?xml version="1.0" encoding="UTF-8"?>

  <alert xmlns="urn:oasis:names:tc:emergency:cap:1.1">
    <identifier>S-1</identifier>
    <sender>sip:sensor1@domain.com</sender>
    <sent>2008-11-19T14:57:00-07:00</sent>
    <status>Actual</status>
    <msgType>Alert</msgType>
    <scope>Private</scope>
    <incidents>abc1234</incidents>
    <info>
        <category>Security</category>
        <event>BURGLARY</event>
        <urgency>Expected</urgency>
        <certainty>Likely</certainty>
        <severity>Moderate</severity>
        <senderName>SENSOR 1</senderName>
        <parameter>
          <valueName>SENSOR-DATA-NAMESPACE1</valueName>
          <value>123</value>
        </parameter>
        <parameter>
          <valueName>SENSOR-DATA-NAMESPACE2</valueName>
          <value>TRUE</value>
        </parameter>  
    </info>
   </alert>

   --boundary1

   Content-Type: application/pidf+xml
   Content-ID: <abcdef2@domain.com>
   <?xml version="1.0" encoding="UTF-8"?>
       <presence
          xmlns="urn:ietf:params:xml:ns:pidf"
          xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10"
          xmlns:gbp=
                 "urn:ietf:params:xml:ns:pidf:geopriv10:basicPolicy"
          xmlns:cl="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr"
          xmlns:gml="http://www.opengis.net/gml"
          xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
          entity="pres:alice@atlanta.example.com">
        <dm:device id="sensor">
          <gp:geopriv>
            <gp:location-info>
              <gml:location>
                <gml:Point srsName="urn:ogc:def:crs:EPSG::4326">
                  <gml:pos>32.86726 -97.16054</gml:pos>
                </gml:Point>
             </gml:location>
            </gp:location-info>
            <gp:usage-rules>
              <gbp:retransmission-allowed>false
              </gbp:retransmission-allowed>
              <gbp:retention-expiry>2010-11-14T20:00:00Z
              </gbp:retention-expiry>
            </gp:usage-rules>
            <gp:method>802.11</gp:method>
          </gp:geopriv>
          <dm:timestamp>2010-11-04T20:57:29Z</dm:timestamp>
        </dm:device>
      </presence>
   --boundary1--
          ]]></artwork>
        </figure>
      </t>
      </section>

    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section anchor="sec-cons" title="Security Considerations">
      <t> This section discusses security considerations when SIP user agents issue emergency
        alerts utilizing MESSAGE and CAP. Location specific threats are not unique to this document and are 
        discussed in <xref target="RFC7378"/> and <xref target="RFC6442"/>.</t>
        
        <t>The ECRIT emergency services architecture <xref target="RFC6443"/> considers classic individual-to-authority emergency calling where the identity of the emergency caller does not play a role at the time of the call establishment itself, i.e., a response to the emergency call does not depend on the identity of the caller. In the case of emergency alerts generated by devices such as sensors, the processing may be different in order to reduce the number of falsely generated emergency alerts. Alerts may get triggered based on certain sensor input that may have been caused by factors other than the actual occurrence of an alert relevant event. For example, a sensor may simply be malfunctioning. For this reason, not all alert messages are directly sent to a PSAP, but rather may be pre-processed by a separate entity, potentially under supervision by a human, to filter alerts and potentially correlate received alerts with others to obtain a larger picture of the ongoing situation. </t>
        
<t>In any case, for alerts initiated by sensors, the identity may play an important role in deciding whether to accept or ignore an incoming alert message. With the scenario shown in <xref target="targeted"/> it is very likely that only authorized sensor input will be processed. For this reason, it needs to be possible to refuse to accept alert messages from an unknown origin. Two types of information elements can be used for this purpose: 
<list style="numbers"> 
<t>SIP itself provides security mechanisms that allow the verification of the originator's identity. These mechanisms can be re-used, such as P-Asserted-Identity <xref target="RFC3325"/> or SIP Identity <xref target="RFC4474"/>. The latter provides a cryptographic assurance while the former relies on a chain of trust model.</t> 
<t>CAP provides additional security mechanisms and the ability to carry further information about the sender's identity. Section 3.3.2.1 of <xref target="cap"/> specifies the signing algorithms of CAP
              documents.</t>
</list> 
</t>
<t>In addition to the desire to perform identity-based access control, the classic communication security threats need to be considered, including integrity protection to prevent forgery or replay of alert messages in transit. To deal with replay of alerts, a CAP document contains the mandatory
              &lt;identifier&gt;, &lt;sender&gt;, &lt;sent&gt; elements and
              an optional &lt;expire&gt; element. Together, these elements make the CAP document
              unique for a specific sender and provide time restrictions. An entity that has already
              received a CAP message within the indicated timeframe is able to detect a
              replayed message and, if the content of that message is unchanged, then no additional
              security vulnerability is created. Additionally, it is RECOMMENDED to make use of SIP
              security mechanisms, such as SIP Identity <xref target="RFC4474"/>, to tie the 
              CAP message to the SIP message. To provide protection of the entire SIP message exchange between neighboring SIP entities, the usage of TLS is MANDATORY.</t> 
  
<t>Note that none of the security mechanism in this document protect against a compromised sensor sending crafted alerts.  Privacy provided for any emergency calls, including data-only messages, is subject to local regulations.
</t>

</section> 

    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section title="IANA Considerations">
      <section title="Registration of the 'application/EmergencyCallData.cap+xml' MIME type">
        <t>
          <list style="hanging">
            <t hangText="To:"> ietf-types@iana.org<vspace blankLines="1"/> </t>
            <t hangText="Subject:">Registration of MIME media type application/
              EmergencyCallData.cap+xml<vspace blankLines="1"/></t>
            <t hangText="MIME media type name:"> application <vspace blankLines="1"/></t>

            <t hangText="MIME subtype name:">cap+xml <vspace blankLines="1"/></t>
            <t hangText="Required parameters:"> (none)<vspace blankLines="1"/> </t>
            <t hangText="Optional parameters:"> charset; Indicates the character encoding of
              enclosed XML. Default is UTF-8 <xref target="RFC3629"/>.<vspace blankLines="1"/></t>

            <t hangText="Encoding considerations:"> Uses XML, which can employ 8-bit characters,
              depending on the character encoding used. See RFC 3023 <xref target="RFC3023"/>,
              Section 3.2.<vspace blankLines="1"/></t>
            <t hangText="Security considerations:"> This content type is designed to carry payloads
              of the Common Alerting Protocol (CAP).  RFC XXX [Replace by the RFC number of this
              specification] discusses security considerations for this. <vspace blankLines="1"/></t>
            <t hangText="Interoperability considerations:"> This content type provides a way to
              convey CAP payloads.<vspace blankLines="1"/> </t>

            <t hangText="Published specification:"> RFC XXX [Replace by the RFC number of this
              specification]. <vspace blankLines="1"/></t>
            <t hangText="Applications which use this media type:"> Applications that convey alerts
              and warnings according to the CAP standard.<vspace blankLines="1"/></t>
            <t hangText="Additional information:"> OASIS has published the Common Alerting Protocol
              at http://www.oasis-open.org/committees/documents.php&amp;wg_abbrev=emergency <vspace blankLines="1"/></t>

            <t hangText="Person and email address to contact for further information:"> Hannes
              Tschofenig, hannes.tschofenig@gmx.net <vspace blankLines="1"/></t>
            <t hangText="Intended usage:"> Limited use <vspace blankLines="1"/></t>
            <t hangText="Author/Change controller:"> IETF ECRIT working group <vspace blankLines="1"/></t>
            <t hangText="Other information:"> This media type is a specialization of application/xml
              RFC 3023 <xref target="RFC3023"/>, and many of the considerations described there also
              apply to application/cap+xml. <vspace blankLines="1"/></t>
          </list>
        </t>
      </section>
     <section title="IANA Registration of 'cap' Additional Data Block">
<t>This document registers a new block type in the sub-registry called 'Emergency Call Data
   Types' of the Emergency Call Additional Data Registry defined in <xref target="I-D.ietf-ecrit-additional-data"/>.  The token is "cap", the Data About is "The Call" and the reference is this document.  </t>
</section>     
      <section title="IANA Registration for 425 Response Code">

   <t>In the SIP Response Codes registry, the following is added</t>

<t>Reference: RFC-XXXX (i.e., this document)</t>
<t>Response code: 425 (recommended number to assign)</t>
<t>Default reason phrase: Bad Alert Message</t>

  <t>
        <figure>
          <artwork>
            <![CDATA[
   Registry:
     Response Code                               Reference
     ------------------------------------------  ---------
     Request Failure 4xx
       425 Bad Alert Message                   [this doc]
          ]]></artwork>
        </figure>
      </t>


<t>This SIP Response code is defined in <xref target="error"/>.</t>

</section> 

<section title="IANA Registration of New AlertMsg-Error Header Field">

<t>The SIP AlertMsg-error header field is created by this document,
   with its definition and rules in <xref target="error"/>, to be
   added to the IANA Session Initiation Protocol (SIP) Parameters registry with two actions:
   
<list style="numbers">
  <t>Update the Header Fields registry with
     <vspace blankLines="1"/>
             <figure>
          <artwork>
            <![CDATA[
   Registry:
     Header Name        compact    Reference
     -----------------  -------    ---------
     AlertMsg-Error             [this doc]
          ]]></artwork>
        </figure>
      </t>
  <t>In the portion titled "Header Field Parameters and Parameter
      Values", add
<vspace blankLines="1"/>
        <figure>
          <artwork>
            <![CDATA[
                                            Predefined
   Header Field        Parameter Name       Values      Reference
   -----------------   -------------------  ----------  ---------
   AlertMsg-Error      code                 yes         [this doc]
          ]]></artwork>
        </figure>
      </t>
</list>
</t>
</section>

<section title="IANA Registration for the SIP AlertMsg-Error Codes">

<t>This document creates a new registry for SIP, called
   "AlertMsg-Error Codes". AlertMsg-Error codes provide reasons
   for an error discovered by a recipient, categorized by
   the action to be taken by the error recipient.  The initial values for this
   registry are shown below.</t>

<t>Registry Name: AlertMsg-Error Codes</t>
<t>Reference: [this doc]</t>
<t>Registration Procedures: Specification Required</t>

<t>
        <figure>
          <artwork>
            <![CDATA[
Code Default Reason Phrase                                 Reference
---- ---------------------------------------------------   ---------
100  "Cannot Process the Alert Payload"                    [this doc]

101  "Alert Payload was not present or could not be found" [this doc]

102  "Not enough information to determine
      the purpose of the alert"                            [this doc]

103  "Alert Payload was corrupted"                         [this doc]
          ]]></artwork>
        </figure>
      </t>

<t>Details of these error codes are in <xref target="error"/>.</t>
    </section> 

</section> 

    <!-- ////////////////////////////////////////////////////////////////////////////////// -->

    <section title="Acknowledgments">
      <t>The authors would like to thank the participants of the Early Warning adhoc meeting at
        IETF#69 for their feedback. Additionally, we would like to thank the members of the NENA
        Long Term Direction Working Group for their feedback. </t>
      <t>Additionally, we would like to thank Martin Thomson, James Winterbottom, Shida Schubert, 
        Bernard Aboba, and Marc Linsner for their review comments.</t>
    </section>

    <!-- ////////////////////////////////////////////////////////////////////////////////// -->
  </middle>

  <!-- ////////////////////////////////////////////////////////////////////////////////// -->

  <back>
    <references title="Normative References">
      <reference anchor="RFC2119">
        <front>
          <title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="Scott Bradner" initials="S." surname="Bradner">
            <organization>Harvard University</organization>
          </author>
          <date month="March" year="1997"/>
        </front>
        <format octets="4723" target="ftp://ftp.isi.edu/in-notes/rfc2119.txt" type="TXT"/>
      </reference>
      <reference anchor="cap">
        <front>
          <title>Common Alerting Protocol v. 1.1 </title>
          <author fullname="Elysa Jones" initials="E." surname="Jones">
            <organization>Warning Systems, Inc</organization>
          </author>
          <author fullname="Art Botterell" initials="A." surname="Botterell">
            <organization>Individual</organization>
          </author>
          <date month="October" year="2005"/>
        </front>
        <format
          target="http://www.oasis-open.org/apps/org/workgroup/emergency/download.php/14205/emergency-CAPv1.1-Committee%20Specification.pdf"
          type="PDF"/>
      </reference> 
&RFC2392;
&RFC3261;
&RFC3428;
&RFC5234;
&RFC3023;
&RFC3629;
&RFC6442;
&RFC6881;

	  &I-D.ietf-ecrit-additional-data; 

       </references>

    <references title="Informative References">  &RFC7378;
    &RFC4474; &RFC3325; &RFC6443; </references>
  </back>
</rfc>

