<?xml version='1.0' encoding='utf-8'?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.nl" -->
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" xml:lang="en" consensus="true" obsoletes="" updates="" submissionType="IETF" tocInclude="true" symRefs="true" sortRefs="true" version="3" category="std" docName="draft-ietf-asap-sip-auto-peer-25">
  <!-- xml2rfc v2v3 conversion 3.8.0 -->
  <front>
    <title abbrev="SIP Auto Peer">Automatic Peering for SIP Trunks</title>
    <author initials="K." surname="Inamdar" fullname="Kaustubh Inamdar">
      <organization>Unaffiliated</organization>
      <address>
        <postal>
          <street/>
        </postal>
        <email>kaustubh.ietf@gmail.com</email>
      </address>
    </author>
    <author initials="S." surname="Narayanan" fullname="Sreekanth Narayanan">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street/>
        </postal>
        <email>sreenara@cisco.com</email>
      </address>
    </author>
    <author initials="C." surname="Jennings" fullname="Cullen Jennings">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street/>
        </postal>
        <email>fluffy@iii.ca</email>
      </address>
    </author>
    <date/>
    <area>Internet</area>
    <workgroup>ASAP</workgroup>
    <keyword>SIP</keyword>
    <keyword>YANG</keyword>
    <abstract>
      <t>
This document specifies a framework that enables enterprise telephony Session Initiation Protocol (SIP) networks to solicit and obtain a capability set document from a SIP service provider. The capability set document encodes a set of characteristics that enable easy peering between enterprise and service provider SIP networks.
</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
The deployment of a Session Initiation Protocol <xref target="RFC3261" /> (SIP)-based
infrastructure in enterprise and service provider communication networks
is increasing at a rapid pace. Consequently, direct IP peering between
enterprise and service provider networks is quickly replacing
conventional methods of interconnection between enterprise and service
provider networks.

Currently published standards provide a strong foundation over which
direct IP peering can be realized. However, given the sheer number of
these standards, it is often not clear which behavioral subsets,
extensions to baseline protocols and operating principles ought to be
implemented by service provider and enterprise networks to ensure
successful peering.</t>
      <t>The SIP Connect technical recommendations  <xref target="SIP-Connect-TR" /> aim to solve this problem by
providing a central reference that promotes seamless peering between
enterprise and service provider SIP networks. However, despite the
extensive set of implementation rules and operating guidelines,
interoperability issues between service provider and enterprise networks
persist. This is in large part because service providers and equipment
manufacturers aren't required to enforce the guidelines of the technical
specifications and have a fair degree of freedom to deviate from them.
Consequently, enterprise administrators usually undertake a fairly
rigorous regimen of testing, analysis and troubleshooting to arrive at a
configuration block that ensures seamless service provider peering. However,
this workflow complements the SIP Connect technical recommendations, in
that both endeavours aim to promote/achieve interoperability between the
enterprise and service provider.
</t>
      <t>
Another set of interoperability problems arise when enterprise
administrators are required to translate a set of technical
recommendations from service providers to configuration blocks across
one or more devices in the enterprise network, which is usually an error prone
exercise. Additionally, such technical recommendations might not be
nuanced enough to intuitively allow the generation of specific
configuration blocks.
</t>
      <t>
This draft introduces a mechanism using which an enterprise network can
solicit a detailed capability set from a SIP service provider; the
detailed capability set can subsequently be used by automation or an
administrator to generate configuration blocks across one or more
devices within the enterprise network to ensure successful service provider
peering.


</t>
    </section>
    <section anchor="overview-of-operations" numbered="true" toc="default">
      <name>Overview of Operations</name>
      <t>This section provides a reference architecture against which the SIP Auto Peer framework may be implemented. Additionally, terms that are commonly used in the context of the document are defined. Lastly, considerations for the choice of network transport between enterprise and service provider telephony networks are discussed.</t>
      <section anchor="reference-architecture" numbered="true" toc="default">
        <name>Reference Architecture</name>
        <t>
Figure 1 illustrates a reference architecture that may be deployed to
support the mechanism described in this document. The enterprise network
consists of a SIP-PBX, media endpoints (M.E.) and a Session Border Controller <xref target="RFC7092" />.
It may also include additional components such as application servers
for voicemail, recording, fax etc. At a high level, the service provider
consists of a SIP signaling entity (SP-SSE), a media entity for handling media streams of calls setup by the SP-SSE and a
HTTPS <xref target="RFC9110" /> server.
</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[

    +-----------------------------------------------------+
    | +---------------+         +-----------------------+ |
    | |               |         |                       | |
    | | +----------+  |         |   +-------+           | |
    | | |   Cap    |  | HTTPS   |   |       |           | |
    | | |  Server  |--|---------|-->|       |           | |
    | | |          |<-|---------|---|       |   +-----+ | |
    | | +----------+  |         |   |       |-->| SIP | | |
    | |               |         |   |       |<--| PBX | | |
    | |               |         |   |       |   +-----+ | |
    | | +----------+  |         |   |  SBC  |           | |
    | | |          |  |   SIP   |   |       |           | |
    | | | SP - SSE |--|---------|-->|       |   +-----+ | |
    | | |          |<-|---------|---|       |-->| M.E.| | |
    | | +----------+  |         |   |       |<--|     | | |
    | |               |         |   |       |   +-----+ | |
    | | +----------+  | (S)RTP  |   |       |           | |
    | | |  Media   |--|---------|-->|       |           | |
    | | |          |<-|---------|---|       |           | |
    | | +----------+  |         |   +-------+           | |
    | +---------------+         +-----------------------+ |
    |                                                     |
    +-----------------------------------------------------+

    Figure 1: Reference Architecture

]]></artwork>
        <t>This draft makes use of the following terminology:</t>
        <ul spacing="normal">
          <li>Enterprise Network: A communications network infrastructure deployed by an enterprise which interconnects with the service provider network over SIP. The enterprise network could include devices such as application servers, endpoints, call agents and edge devices, among others.</li>
          <li>Edge Device: A device that is the last hop in the enterprise network and that is the transit point for traffic entering and leaving the enterprise. An edge device is typically a back-to-back user agent (B2BUA) <xref target = "RFC7092" /> such as a Session Border Controller (SBC).</li>
          <li>Service Provider Network: A communications network infrastructure deployed by service providers. In the context of this draft, the service provider network is accessible over SIP for the establishment, modification and termination of calls and accessible over HTTPS for the transfer of the capability set document. The service provider network is also referred to as a SIP Service Provider (SSP) or Internet Telephony Service Provider (ITSP) network.</li>
          <li>Call Control: Call Control within a telephony networks refers to software that is responsible for delivering its core functionality. Call control not only provides the basic functionality of setting up, sustaining and terminating calls, but also provides the necessary control and logic required for additional services within the telephony network, such as, registration of endpoints, integration with application servers (voicemail, instant messaging, presence), among others.</li>
          <li>Capability Server: A server hosted in the service provider network, such that this server is the target for capability set document requests from the enterprise network.</li>
          <li>Capability Set: The term capability set (or capability set document) refers collectively to a set of characteristics within the service provider network, which when communicated to the enterprise network, provides the enterprise network the information required to interconnect with the service provider network. The various parameters that constitute the capability set relate to characteristics that are specific to signalling, media, transport and security. Certain aspects of interconnecting with service providers are out of scope of the capability set; for example, the access technology used to interconnect with service provider networks.</li>
        </ul>
      </section>
      <section anchor="configuration-workflow" numbered="true" toc="default">
        <name>Configuration Workflow</name>
        <t>A workflow that facilitates an enterprise network to solicit the capability set of a SIP service provider ought to take into account the following considerations:</t>
        <ul spacing="normal">
          <li>The configuration workflow must be based on a protocol or a set of protocols commonly used between enterprise and service provider telephony networks.</li>
          <li>
            <t>The configuration workflow must be flexible enough to allow the service provider network to dynamically offload different capability sets to different enterprise networks based on the identity of the enterprise network.</t>
            <t/>
          </li>
          <li>Capability set documents obtained as a result of the configuration workflow must be conducive to easy parsing by automation. Subsequently, automation may be used for the generation of appropriate configuration blocks on the edge element or across one or more elements in the enterprise network.</li>
        </ul>
        <t>Taking the above considerations into account, this document proposes a Hypertext Transfer Protocol (HTTP)-based workflow using which the enterprise network can solicit and ultimately obtain the service provider capability set. The enterprise network creates a well formed HTTP GET request to solicit the service provider capability set. Subsequently, the HTTPS response from the SIP service provider includes the capability set. The capability set is encoded in JSON, thus ensuring that the response can be easily parsed by automation.</t>
        <t>There are alternative mechanisms using which the SIP service provider can offload its capability set. For example, the Session Initiation Protocol (SIP) can be extended to define a new event package <xref target = "RFC6665" />, such that the enterprise network can establish a SIP subscription with the service provider for its capability set; the SIP service provider can subsequently use the SIP NOTIFY request to communicate its capability set or any state deltas to its baseline capability set.</t>
        <t>This mechanism is likely to result in a barrier to adoption for SIP service providers and enterprise networks as equipment manufacturers would have to first add support for such a SIP extension. A HTTPS-based approach would be relatively easier to adopt as most edge devices deployed in enterprise networks today already support HTTPS; from the perspective of service provider networks, all that is required is for them to deploy HTTPS servers that function as capability servers. Additionally, most SIP service providers require enterprise networks to register with them (using a SIP REGISTER message) before any other SIP methods that initiate subscriptions (SIP SUBSCRIBE) or calls (SIP INVITE) are processed. As a result, a SIP-based framework to obtain a capability set would require operational changes on the part of service provider networks.</t>
        <t>Yet another example of an alternative mechanism would be for service providers and enterprise equipment manufacturers to agree on YANG models <xref target = "RFC6020" /> that enable configuration to be pushed over NETCONF <xref target = "RFC6241" /> to enterprise networks from a centralised source hosted in service provider networks. The presence of proprietary software logic for call and media handling in enterprise devices would preclude the generation of a "one-size-fits-all" YANG model. Additionally, service provider networks pushing configuration to enterprises devices might lead to the loss of implementation autonomy on the part of the enterprise network.</t>
      </section>
      <section anchor="transport" numbered="true" toc="default">
        <name>Transport</name>
        <t>To solicit the capability set of a SIP service provider, the edge element in an enterprise network generates a well-formed HTTP GET request. There are two reasons why it makes sense for the enterprise edge element to generate the HTTPS request:</t>
        <ol spacing="normal" type="1"><li>Edge elements are devices that normalise any mismatches between the enterprise and service provider networks in the media and signaling planes. As a result, when the capability set is received from the SIP service provider network, the edge element can generate appropriate configuration blocks (possibly across multiple devices) to enable interconnection.</li>
          <li>Given that edge elements are configured to "talk" to networks external to the enterprise, the complexity in terms of NAT traversal and firewall configuration would be minimal.</li>
        </ol>
        <t>The HTTP GET request is targeted at a capability server that is managed by the SIP service provider such that this server processes, and on successfully processing the request, includes the capability set document in the response. The capability set document is constructed according the guidelines of the YANG model described in this draft. The capability set document included in a successful response is formatted in JSON. More details about the formatting of the HTTP request and response are provided in Section 4.</t>
        <t>There could be situations wherein an enterprise telephony network interconnects with its SIP service provider such that traffic between the two networks traverses an intermediary SIP service provider network. This could be a result of interconnect agreements between the terminating and transit SIP service provider networks. In such situations, the capability set provided to the enterprise network by its SIP service provider must account for the characteristics of the transit SIP service provider network from a signalling and media perspective. For example, if the terminating SIP service provider network supports the G.729 codec and the transit SIP service provider network does not, G.729 must not be advertised in the capability set. As another example, if the transit SIP service provider network doesn't support a SIP extension, for instance, the SIP extension for Reliable Provisional Responses as defined in RFC 3262, the terminating SIP service provider network must not advertise support for this extension in the capability set provided to the enterprise network. How a terminating SIP service provider obtains the characteristics of the intermediary SIP service provider network is out of the scope of this document; however, one method could be for the terminating SIP service provider to obtain the characteristics of the intermediary SIP service provider by leveraging the YANG model introduced in this document.</t>
      </section>
    </section>
    <section anchor="conventions-and-terminology" numbered="true" toc="default">
      <name>Conventions and Terminology</name>
      <t>
        The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
        NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
        "MAY", and "OPTIONAL" in this document are to be interpreted as
        described in BCP 14 <xref target = "RFC2119" /> <xref target = "RFC8174" /> when, and only when, they
        appear in all capitals, as shown here.
      </t>
    </section>
    <section anchor="http-transport" numbered="true" toc="default">
      <name>HTTP Transport</name>
      <t>This section describes the use of HTTPS as a transport protocol for the peering workflow. This workflow is based on HTTP/1.1, and as such is compatible with any future version of HTTP that is backward compatible with HTTP/1.1 including HTTP/3 <xref target="RFC9114" />.</t>
      <section anchor="http-methods" numbered="true" toc="default">
        <name>HTTP Methods</name>
        <t>The workflow defined in this document leverages the HTTP GET method and its corresponding response(s) to request for and subsequently obtain the service provider capability set document.</t>
      </section>
      <section anchor="integrity-and-confidentiality" numbered="true" toc="default">
        <name>Integrity and Confidentiality</name>
        <t>Peering requests and responses are defined over HTTP <xref target = "RFC9110" />. However, due to the sensitive nature of information transmitted between client and server, it is required to secure HTTP communications using Transport Layer Security (TLS) <xref target="RFC8446" />; therefore the enterprise edge element and the capability server MUST support TLS. When HTTP/3 is used, TLS is incorporated within QUIC. Additionally, the enterprise edge element and capability server MUST support the use of the HTTPS URI scheme as defined in <xref target="RFC9110" />.</t>
      </section>
      <section anchor="authenticated-client-identity" numbered="true" toc="default">
        <name>Authenticated Client Identity</name>
        <t>HTTP usually adopts asymmetric methods of authentication. For example, clients typically use certificate based authentication to verify the server they are talking to, whereas, servers typically use methods such as HTTP digest authentication or OAuth 2.0 <xref target="RFC6749" /> to authenticate clients. Though OAuth 2.0 is not an authentication protocol, it nonetheless allows for client authentication to be carried out with the use of OAuth tokens.  </t>
        <t>In the context of the SIP Auto Peer framework, OAuth 2.0 MUST be used to carry out client authentication. Enterprise edge elements could use the various grant types outlined in the OAuth 2.0 specification and supported by the service provider in order to obtain the capability set document. This draft does not mandate a specific grant type. The implementation of OAuth 2.0 to obtain the capability set are beyond the scope of this document. However, it provides an example of how an enterprise SBC could leverage the "Authorization Code Grant" (<xref target="RFC6749" sectionFormat="of" section="4.1" />) flow to acquire the capability set document from the service provider in Figure 2.</t> 
        <t>Using the "Resource Owner Password Credentials" grant type (<xref target="RFC6749" sectionFormat="of" section="1.3.3" />) requires the existence of a trust relationship between the resource owner (in this context, the administrator/enterprise network) and the client (in this context, an edge element such as an SBC). In SIP trunking deployments between enterprise and service provider networks, such a trust relationship between the administrator/resource owner/enterprise network and the client (edge element) already exists, as SIP trunk registration (and refreshing registrations) require credentials - typically a username and password, that are configured on the edge element by the administrator. However, it is important for the enterprise network administrator and service provider to factor in security issues associated with this grant type.</t>

        <artwork name="" type="" align="left" alt=""><![CDATA[

     +---------------+
     |   Resource    |
     |     Owner     |
     |  (Enterprise) |
     +---------------+
          ^
          |
         (B)
     +----|-----+          Client Identifier      +---------------+
     |         -+----(A)-- & Redirection URI ---->|    Service    |
     |  User-   |                                 |    Provider   |
     |  Agent  -+----(B)-- User authenticates --->| Authorization |
     |          |                                 |     Server    |
     |         -+----(C)-- Authorization Code ---<|               |
     +-|----|---+                                 +---------------+
       |    |                                         ^      v
      (A)  (C)                                        |      |
       |    |                                         |      |
       ^    v                                         |      |
     +---------+                                      |      |
     |         |>---(D)-- Authorization Code ---------'      |
     |  Client |          & Redirection URI                  |
     |  (SBC)  |                                             |
     |         |<---(E)----- Access Token -------------------'
     +---------+       (w/ Optional Refresh Token)
         ^   v
         |   |
         |   |                                     +--------------+
         |   -------(F)---- Access Token --------->|  Capability  |
         -----------(G)---- Capability set -------<|    Server    |
                                                   +--------------+

    Figure 2: Client Authentication Mechanism

]]></artwork>
      <t>The flow illustrated in Figure 2 includes the following steps:</t>
          <ol spacing="normal" type="A">
          <li>The enterprise SBC (client) initiates the flow by directing the resource owner's (enterprise network administrator) user-agent to the authorization endpoint. The SBC includes its client identifier, requested scope, local state, and a redirection URI to which the authorization server will send the user-agent back once access is granted (or denied). As a precursor to the flow, the enterprise network administrator has already obtained a unique client identifier for their network and provided a redirection URI populated with a target within their network to obtain the authorization code.</li>
          <li>The authorization server within the service provider network authenticates the network administrator (via the user-agent) and establishes whether the network administrator grants or denies the client's access request.</li>
          <li>Assuming the network administrator grants access, the authorization server redirects the user-agent back to the enterprise SBC using the redirection URI provided earlier (in the request or during client registration).  The redirection URI includes an authorization code and any local state provided by the client earlier.</li>
          <li>The enterprise SBC requests an access token from the authorization server's token endpoint by including the authorization code received in the previous step. When making the request, the enterprise SBC authenticates with the authorization server and includes the redirection URI used to obtain the authorization code for verification. </li>
          <li>The authorization server authenticates the enterprise SBC, validates the authorization code, and ensures that the redirection URI received matches the URI used to redirect the SBC in step (C).  If valid, the authorization server responds back with an access token and, optionally, a refresh token.</li>
          <li>The enterprise SBC then contacts the capability server located in the service provider network with an HTTP GET request along with the access token to retrieve the capability set document.</li>
          <li>The capability server checks for a valid access token and returns the capability set document to the enterprise SBC. The service provider will host a unique document for each enterprise network that will peer with it.</li>
          </ol>
      </section>
      <section anchor="encoding-the-request" numbered="true" toc="default">
        <name>Encoding the Request</name>
        <t>The edge element in the enterprise network generates a HTTP GET request such that the request-target is obtained using the procedure outlined in section 4.5. This document does not specify any content negotiation. The server MUST set the response content type header to the application/json media type.</t>
      </section>
      <section anchor="identifying-the-request-target" numbered="true" toc="default">
        <name>Identifying the Request Target</name>
        <t>HTTP GET requests from enterprise edge elements MUST carry a valid request-target. The enterprise edge element might obtain the URL of the resource hosted on the capability server in one of two ways:</t>
        <ol spacing="normal" type="1"><li>Manual Configuration</li>
          <li>Discovery using the Webfinger Protocol</li>
        </ol>
        <t>
The complete HTTPS URLs to be used when authenticating the enterprise edge element (optional) and obtaining the SIP service provider capability set can be obtained from the SIP service provider beforehand and entered into the edge element manually via some interface - for example, a CLI or GUI.</t>
        <t>However, if the resource URL is unknown to the administrator (and, by extension, to the edge element), the WebFinger protocol <xref target="RFC7033" /> and the 'sipTrunkingCapability' <xref target="RFC9409" /> link relation type may be leveraged assuming that the service SIP service provider has implemented WebFinger within their network and hosts the capability set at the respective location.</t>
        <t>If an enterprise edge element attempts to discover the URL of the endpoints hosted in the ssp1.example.com domain, it issues the following request (line wraps are for display purposes only).</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
        GET /.well-known/webfinger?
            resource=http%3A%2F%2Fssp1.example.com
            rel=sipTrunkingCapability
            HTTP/1.1
        Host: ssp1.example.com


        HTTP/1.1 200 OK
        Access-Control-Allow-Origin: *
        Content-Type: application/jrd+json

        {
          "subject" : "http://ssp1.example.com",
          "links" :
          [
            {
              "rel" : "sipTrunkingCapability",
              "href" :
                  "https://capserver.ssp1.com/capserver/capdoc.json"
            }
          ]
        }
]]></artwork>
        <t>Once the target URI is obtained by an enterprise telephony network, the URI may be dereferenced to obtain a unique capability set document that is specific to that given enterprise telephony network. The ITSP may use credentials to determine the identity of the enterprise telephony network and provide the appropriate capability set document.</t>
      </section>
      <section anchor="generating-the-response" numbered="true" toc="default">
        <name>Generating the response</name>
        <t>Capability servers include the capability set documents in the body of a successful response. Capability set documents MUST be formatted in JSON. For requests that are incorrectly formatted, an example being an incorrect query parameter in the URI, the capability server must generate a "400 Bad Request" response for the incorrect request. If requests contain an invalid token, the capability server must generate a "403 Forbidden" response clearly indicating that this token does not have the permission to view the capability set document.</t>
        <t>The capability server can respond to client requests with redirect responses, specifically, the server can respond with the following redirect responses:</t>
        <ol spacing="normal" type="1"><li>301 Moved Temporarily</li>
          <li>302 Found</li>
          <li>307 Temporary Redirect</li>
        </ol>
        <t>The server SHOULD include the Location header field in such responses. If the Location header isn't included in the response,
        this can lead to the client being unable to find the capability set document, leading to a failure in the peering process or 
        requiring manual intervention by an administrator.</t>
      </section>
    </section>
    <section anchor="state-deltas" numbered="true" toc="default">
      <name>State Deltas</name>
      <t>Given that the service provider capability set is largely expected to remain static, the work needed to implement an asynchronous push mechanism to encode minor changes in the capability set document (state deltas) is not commensurate with the benefits. Rather, enterprise edge elements can poll capability servers at pre-defined intervals to obtain the full capability set document. It is recommended that capability servers are polled every 24 hours.</t>
    </section>
    <section anchor="encoding-the-service-provider-capability-set" numbered="true" toc="default">
      <name>Encoding the Service Provider Capability Set</name>
      <t>In the context of this draft, the capability set of a service provider refers collectively to a set of characteristics which when communicated to an enterprise network, provides it with sufficient information to directly peer with the service provider network. The capability set document is not designed to encode extremely granular details of all features, services, and protocol extensions that are supported by the service provider network. For example, it is sufficient to encode that the service provider uses T.38 relay for faxing, it is not required to know the value of the "T38FaxFillBitRemoval" parameter.</t>
      <t>The parameters within the capability set document represent a wide array of characteristics, such that these characteristics collectively disseminate sufficient information to enable direct IP peering between enterprise and service provider networks. The various parameters represented in the capability set are chosen based on existing practises and common problem sets typically seen between enterprise and service provider SIP networks.</t>
    </section>
    <section anchor="data-model-for-capability-set" numbered="true" toc="default">
      <name>Data Model for Capability Set</name>
      <t>This section defines a YANG module <xref target="RFC7950" /> for encoding the service provider capability set. Section 7.1 provides the tree diagram, which is followed by a description of the various nodes within the module defined in this draft.</t>
      <section anchor="tree-diagram" numbered="true" toc="default">
        <name>Tree Diagram</name>
        <t>This section provides a tree diagram <xref target = "RFC8340" /> for the "ietf-sip-auto-peering" module. The interpretation of the symbols appearing in the tree diagram is as follows:</t>
        <ul spacing="normal">
          <li>Brackets "[" and "]" enclose list keys.</li>
          <li>Abbreviations before data node names: "rw" means configuration (read-write), and "ro" means state data (read-only).</li>
          <li>Symbols after data node names: "?" means an optional node, "!" means a presence container, and "*" denotes a list and leaf-list.</li>
          <li>Parentheses enclose choice and case nodes, and case nodes are also marked with a colon (":").</li>
          <li>Ellipsis ("...") stands for contents of subtrees that are not shown.</li>
        </ul>
        <t>The data model for the peering capability document has the following structure:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
module: ietf-sip-auto-peering
  +--rw peering-info* [index]
     +--rw index             uint16
     +--rw variant           enumeration
     +--rw revision
     |  +--rw not-before    uint32
     |  +--rw location      uri
     +--rw transport-info
     |  +--rw transport*        enumeration
     |  +--rw registrar* [host port]
     |  |  +--rw host    union
     |  |  +--rw port    inet:port-number
     |  +--rw realms* [name]
     |  |  +--rw name        string
     |  |  +--rw username?   string
     |  |  +--rw password?   ianach:crypt-hash
     |  +--rw call-control* [host port]
     |  |  +--rw host    union
     |  |  +--rw port    inet:port-number
     |  +--rw dns*              inet:ip-address
     |  +--rw outbound-proxy* [host port]
     |     +--rw host    union
     |     +--rw port    inet:port-number
     +--rw call-specs
     |  +--rw early-media?         boolean
     |  +--rw signaling-forking?   boolean
     |  +--rw supported-methods*   enumeration
     |  +--rw caller-id
     |  |  +--rw e164-format?        boolean
     |  |  +--rw preferred-method?   enumeration
     |  +--rw num-ranges* [index]
     |     +--rw index    uint16
     |     +--rw type?    enumeration
     |     +--rw count?   uint16
     |     +--rw value*   string
     +--rw media
     |  +--rw media-type-audio* [media-format]
     |  |  +--rw media-format    enumeration
     |  |  +--rw rate?           uint8
     |  |  +--rw ptime?          uint8
     |  |  +--rw param?          string
     |  +--rw fax
     |  |  +--rw protocol*   enumeration
     |  +--rw rtp
     |  |  +--rw rtp-trigger?     boolean
     |  |  +--rw symmetric-rtp?   boolean
     |  +--rw rtcp
     |     +--rw symmetric-rtcp?   boolean
     |     +--rw rtcp-feedback?    boolean
     +--rw dtmf
     |  +--rw payload-number?   uint8
     |  +--rw iteration?        boolean
     +--rw security
     |  +--rw signaling
     |  |  +--rw secure?    boolean
     |  |  +--rw version*   enumeration
     |  +--rw media-security
     |  |  +--rw dtls-key-management?   boolean
     |  +--rw cert-location?               string
     |  +--rw secure-telephony-identity
     |     +--rw stir-compliance?   boolean
     |     +--rw cert-delegation?   boolean
     |     +--rw acme-directory?    uri
     +--rw extensions*       string
]]></artwork>
      </section>
      <section anchor="yang-model" numbered="true" toc="default">
        <name>YANG Model</name>
        <t>
This section defines the YANG module for the peering capability set
document. This module depends on existing YANG modules that provide common YANG data types <xref target="RFC6991" /> and system management <xref target="RFC7317" />.</t>
    <sourcecode name="ietf-sip-auto-peering@2025-03-19.yang"
      markers="true">
    <![CDATA[
module ietf-sip-auto-peering {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-sip-auto-peering";
  prefix "peering";

  import ietf-inet-types {
    prefix "inet";
    reference
      "RFC 6991: Common YANG Data Types";
  }

  import iana-crypt-hash {
    prefix "ianach";
    reference
      "RFC 7317:  A YANG Data Model for System Management";
  }

  organization
    "IETF ASAP (Automatic SIP trunking And Peering) Working Group";

  contact
    "WG Web: <https://datatracker.ietf.org/wg/asap/>
    WG List: <mailto:asap@ietf.org>

    Editor: Kaustubh Inamdar
    <mailto:kaustubh.ietf@gmail.com>

    Editor: Sreekanth Narayanan
    <mailto:sreenara@cisco.com>

    Editor: Cullen Jennings
    <mailto:fluffy@iii.ca>";

  description
    "Data model for encoding SIP Service Provider Capability Set

    Copyright (c) 2025 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Revised BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

    This version of this YANG module is part of RFC XXXX
     (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
     for full legal notices.
    
    The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
     'MAY', and 'OPTIONAL' in this document are to be interpreted as
     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.";

  revision 2025-03-19 {
    description "Initial version";
    reference
      "NOTE TO RFC EDITOR: Please replace 'RFC XXXX' with the actual
      RFC number of this document when published, and delete this
      sentence. Also replace the revision with the date of publication
      of this document.
      RFC XXXX: Automatic Peering for SIP Trunks";
  }

  typedef uri {
    type string;
    description "Type for a Uniform Resource Identifier";
    reference
      "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax";
  }

  grouping entity {
    description "Grouping that provides a reusable list named
      'entity', with each entry containing a host and a port.";

    leaf host {
      type union {
        type inet:ip-address;
        type inet:domain-name; 
      }
      description "IP Address or host name of the entity";
    }

    leaf port {
      type inet:port-number;
      description "Entity's port number (e.g. 5060).";
    }
  }

  list peering-info {
    key index;
    max-elements 1;
    description "A list containing a single container; the
      peering-info node is akin to the root element of a JSON
      document.";

    leaf index {
      type uint16;
      description "Index for the peering-info document.";
    }

    leaf variant {
      type enumeration {
        enum v1_0 {
          description "Variant 1.0 of the capability set document is
            defined in this draft";
        }
      }
      mandatory true;
      description "A node that identifies the version number of the
        capability set document. This draft defines the parameters
        for variant 1.0; future specifications might define a richer
        parameter set, in which case the variant must be changed to
        2.0, 3.0 and so on. Future extensions to the capability set
        document MUST also ensure that the corresponding YANG module
        is defined.";
    }

    container revision {
      description "A container that encapsulates information
        regarding the availability of a new version of the
        capability set document for the enterprise.";

      leaf not-before {
        type uint32;
        mandatory true;
        description "A node that identifies the epoch time at
          which the parameters in this capability set document are
          activated or considered valid. This node has been set to
          mandatory as it is the service provider's 
          responsibility to inform when new peering settings take
          effect. Without being aware of a start time, the
          enterprise network will experience failures.";
      }

      leaf location {
        type uri;
        mandatory true;
        description "A node that identifies the URL of a new
          revision of the service provider capability set document.
          Without this URL, an enterprise network wouldn't be aware
          of changes that have occurred in the service provider
          network.";
      }
    }

    container transport-info {
      description "A container that encapsulates transport
        characteristics of SIP sessions between enterprise and
        service provider networks.";

      leaf-list transport {
        type enumeration {
          enum tcp {
            description "Transmission Control Protocol";
          }
          enum tls {
            description "Transport Layer Security (over TCP)";
          }
          enum udp {
            description "User Datagram Protocol";
          }
        }
        min-elements 1;
        description "A list that enumerates the different Transport
          Layer protocols supported by the SIP service provider.
          Valid transport layer protocols include: UDP, TCP and TLS";
      }

      list registrar {
        key "host port";
        uses entity;
        max-elements 3;
        description "A list that specifies the transport address of
          one or more registrar servers in the service provider
          network. The transport address of the registrar can be
          provided using a combination of a valid IP address and
          port number, or a subdomain of the SIP service provider
          network, or the fully qualified domain name (FQDN) of the
          SIP service provider network. If the transport address of
          a registrar is specified using either a subdomain or a
          fully qualified domain name, the DNS element must be
          populated with one or more valid DNS server IP
          addresses.";
      }

      list realms {
        key "name";
        description "A container that encapsulates the set of realms
          or protection domains the SIP service provider is
          responsible for.";

        leaf name {
          type string;
          mandatory true;
          description "A node specifying the SIP service provider
            realm or protection domain. This node is encoded as a
            string; the value of this node must be identical to the
            value of the 'realm' parameter in a WWW-Authenticate
            header field that the SIP service provider might send in
            response to requests that do not contain a valid
            Authorisation header field.";
        }

        leaf username {
          type string;
          description "A node that encodes the username for the
            given realm. The username is one of many inputs used by
            the enterprise network in generating the response
            parameter of the Authorization header field.";
        }

        leaf password {
          type ianach:crypt-hash;
          description "A node that encodes the password for the
            given realm. The password is one of many inputs used by
            the enterprise network in generating the response
            parameter of the Authorization header field. The
            password is stored as a cryptographic hash.";
        }
      }

      list call-control {
        key "host port";
        uses entity;
        max-elements 3;
        description "A list that specifies the transport address of
          the call server(s) in the service provider network. The
          enterprise network must use an applicable transport
          protocol in conjunction with the call control server(s)
          transport address when transmitting call setup requests.
          The transport address specified in this list can also
          serve as the target for non-call requests such as SIP
          OPTIONS.";
      }

      leaf-list dns {
        type inet:ip-address;
        max-elements 2;
        description "A list that encodes the IP address of one or
          more DNS servers hosted by the SIP service provider. If
          the enterprise network is unaware of the IP address, port
          number, and transport protocol of servers within the
          service provider network (for example, the registrar and
          call control server), it must use DNS NAPTR and SRV.
          Alternatively, if the enterprise network has the fully
          qualified domain name of the SIP service provider network,
          it must use DNS to resolve the said FQDN to an IP address.
          The dns element encodes the IP address of one or more DNS
          servers hosted in the service provider network. If however,
          either the registrar or call-control lists or both are
          populated with a valid IP address and port pair, the dns
          element must be set to ::/0.";
      }

      list outbound-proxy {
        key "host port";
        uses entity;
        description "A list that specifies the transport address of
          one or more outbound proxies. The transport address can be
          specified by using a combination of an IP address and a
          port number, a subdomain of the SIP service provider
          network, or a fully qualified domain name and port number
          of the SIP service provider network. If the outbound-proxy
          list is populated with a valid transport address, it
          represents the default destination for all outbound SIP
          requests and therefore, the registrar and call-control
          lists must be populated with the quadruple octet of
          0.0.0.0";
      }
    }

    container call-specs {
      description "A container that encapsulates information about
        call specifications, restrictions and additional handling
        criteria for SIP calls between the enterprise and service
        provider network.";

      leaf early-media {
        type boolean;
        description "A node that specifies whether the service
          provider network is expected to deliver in-band
          announcements/tones before call connect. A value of true
          signifies that the service provider is capable of early
          media, whereas false signifies otherwise.";
      }

      leaf signaling-forking {
        type boolean;
        description "A node that specifies whether outbound call
          requests from the enterprise might be forked on the
          service provider network that may lead to multiple early
          dialogs. A value of true indicates the service provider
          network can potentially fork outbound call requests,
          whereas false indicates it will not.";
      }

      leaf-list supported-methods {
        type enumeration {
          enum INVITE {
            description "Initiate a dialog or session.";
          }
          enum ACK {
            description "Acknowledge final response to INVITE.";
          }
          enum BYE {
            description "Terminate a dialog or session.";
          }
          enum CANCEL {
            description "Cancel a pending request.";
          }
          enum REGISTER {
            description "Register contact information.";
          }
          enum OPTIONS {
            description "Query capabilities of a server.";
          }
          enum PRACK {
            description "Provisional acknowledgement.";
          }
          enum SUBSCRIBE {
            description "Subscribe to an event.";
          }
          enum NOTIFY {
            description "Notify subscriber of an event.";
          }
          enum PUBLISH {
            description "Publish an event state.";
          }
          enum INFO {
            description "Send mid-session information.";
          }
          enum REFER {
            description "Refer recipient to a third party.";
          }
          enum MESSAGE {
            description "Instant message transport.";
          }
          enum UPDATE {
            description "Update session parameters within a dialog.";
          }
        }
        description "A list that specifies the various SIP methods
          supported by the SIP service provider.";
      }

      container caller-id {
        description "A container that encodes the preferences of
          SIP Service Providers in terms of calling number
          presentation by the enterprise network.";

        leaf e164-format {
          type boolean;
          description "A value of true indicates that the enterprise
            should format the calling number in E.164 format, while
            false indicates that there are no restrictions on 
            formatting of the calling number.";
        }

        leaf preferred-method {
          type enumeration {
            enum P_ASSERTED_IDENTITY {
              description "Use the 'P-Asserted-Identity' header to
                determine remote party identity.";
            }
            enum FROM {
              description "Use the 'From' header to determine remote
                party identity.";
            }
          }
          description "A node that specifies which SIP header MUST
            be used by the enterprise network to communicate caller
            information.";
        }
      }

      list num-ranges {
        key index;
        description "A list that specifies the Direct Inward Dial
          (DID) number range allocated to the enterprise network by
          the SIP service provider.";

        leaf index {
          type uint16;
          description "Index for the number ranges.";
        }

        leaf type {
          type enumeration {
            enum range {
              description "Numbers specified as a range.";
            }
            enum collection {
              description "Numbers specified in the form of a 
                collection.";
            }
            enum reference {
              description "Number range available at a URL.";
            }
          }
          description "Indicates whether the DID range is
            communicated by value or by reference.";
        }

        leaf count {
          when "../type = 'range' or ../type = 'collection'";
          type uint16;
          description "Indicates the size of the DID number range.
            This leaf MUST NOT be included when using the
            'reference' type.";
        }

        leaf-list value {
          type string;
          description "A list that encapsulates the DID number range
            allocated to the enterprise.";
        }
      }
    }

    container media {
      description "A container used to encapsulate the
        characteristics of UDP-based audio streams and basic
        RTP/RTCP information.";

      list media-type-audio {
        key "media-format";
        description "A list of media types and
          parameters necessary to set up media between the
          enterprise and service provider.";

        leaf media-format {
          type enumeration {
            enum PCMU {
              description "PCMU format.";
            }
            enum G722 {
              description "G722 format.";
            }
          }
          description "The audio media format.";
        }

        leaf rate {
          type uint8;
          description "Sampling rate in Hz.";
        }

        leaf ptime {
          type uint8;
          description "Packetization time in milliseconds.";
        }

        leaf param {
          type string;
          description "Optional parameter for additional media
            details.";
        }
      }

      container fax {
        description "Encapsulates the fax protocol(s) supported by
          the SIP service provider.";

        leaf-list protocol {
          type enumeration {
            enum pass_through {
              description "Protocol-based fax passthrough.";
            }
            enum t38 {
              description "T38 relay.";
            }
          }
          max-elements 2;
          description "List indicating the different fax protocols
            supported by the service provider.";
        }
      }

      container rtp {
        description "Encapsulates generic characteristics of RTP
          sessions.";

        leaf rtp-trigger {
          type boolean;
          description "A value of true indicates that the service
            provider expects the enterprise network to send the
            first RTP packet after media establishment. A value
            of false indicates no such requirement from the service
            provider.";
        }

        leaf symmetric-rtp {
          type boolean;
          description "A value of true indicates that the service
            provider expects the enterprise network to use the same
            port for sending and receiving RTP. A value of false
            indicates no such requirement from the service
            provider (RFC 4961).";
        }
      }

      container rtcp {
        description "Encapsulates generic characteristics of RTCP
          sessions.";

        leaf symmetric-rtcp {
          type boolean;
          description "A value of true indicates that the service
            provider expects the enterprise network to use the same
            port for sending and receiving RTCP. A value of false
            indicates no such requirement from the service
            provider (RFC 4961).";
        }

        leaf rtcp-feedback {
          type boolean;
          description "A value of true indicates that the service
            provider supports the transmission of RTCP feedback
            packets that aid in congestion control and other
            features. A value of false indicates that the service
            provider does not support RTCP feedback (RFC 8888).";
        }
      }
    }

    container dtmf {
      description "Describes various aspects of DTMF relay via RTP
        Named Telephony Events.";

      leaf payload-number {
        type uint8 {
          range "96..127";
        }
        description "Indicates the payload type number.";
      }

      leaf iteration {
        type boolean;
        description "A value of true indicates that the service
          provider supports RFC4733 while a value of false indicates
          that the service provider prefers RFC2833";
      }
    }

    container security {
      description "Encapsulates characteristics about encrypting
        signalling streams.";

      container signaling {
        description "Encapsulates the security protocol for SIP
          signalling.";

        leaf secure {
          type boolean;
          description "A value of true indicates that the service
            provider supports the use of TLS for SIP signalling
            while a vlue of false indicates no support.";
        }

        leaf-list version {
          type enumeration {
            enum 1.2 {
              description "TLS version 1.2.";
            }
            enum 1.3 {
              description "TLS version 1.3.";
            }
          }
          description "Specifies the TLS version(s) supported. If
            TLS is not supported, this list should be set to
            'NULL'.";
        }
      }

      container media-security {
        description "Describes characteristics of securing media
          streams.";

        leaf dtls-key-management {
          type boolean;
          description "Specifies whether DTLS is supported for SRTP
            key management (RFC 5764). A value of true indicates
            that the service provider supports key management over
            DTLS and a value of false indicates that key management
            for SRTP must be done externally.";
        }
      }

      leaf cert-location {
        type string;
        description "If required, contains the URL from which the
          service provider's certificate(s) can be retrieved.";
      }

      container secure-telephony-identity {
        description "Encapsulates Secure Telephony Identity (STIR)
          characteristics.";

        leaf stir-compliance {
          type boolean;
          description "A value of true indicates that the service
            provider is STIR compliant while a value of false
            indicates no support for STIR.";
        }

        leaf cert-delegation {
          type boolean;
          description "A value of true indicates that the service
            provider is willing to delegate authority over allocated
            number ranges while a value of false indicates no such
            support.";
        }

        leaf acme-directory {
          when "../cert-delegation = 'true'";
          type uri;
          description "Provides the URL of the ACME directory for
            delegate certificates.";
        }
      }
    }

    leaf-list extensions {
      type string;
      description "A list of all possible SIP option tags supported
        by the service provider network.";
    }
  }
}
    ]]></sourcecode>
      </section>
      <section anchor="extending-the-capability-set" numbered="true" toc="default">
        <name>Extending the Capability Set</name>
        <t>
There are situations in which equipment manufactures or service
providers would benefit from extending the YANG module defined in this
draft. For example, service providers could extend the YANG module to
include information that further simplifies direct IP peering. Such
information could include: trunk group identifiers, customer/enterprise
account numbers, service provider support numbers, among others.

Extension of the module can be achieved by importing the module defined
in this draft. An example is provided below:

Consider a new YANG module "vendorA" specified for VendorA's enterprise
SBC. The "vendorA-config" YANG module is configured as follows:

</t>
    <artwork name="" type="" align="left" alt=""><![CDATA[
    module vendorA-config {
      namespace "urn:ietf:params:xml:ns:yang:vendorA-config";
      prefix "vendorA";

      description
      "Data model for configuring VendorA Enterprise SBC";

      revision 2020-05-06 {
        description "Initial revision of VendorA Enterprise SBC
        configuration data model";
      }

      import ietf-peering {
        prefix "peering";
      }

      augment "/peering:peering-info" {
        container vendorAConfig {
          leaf vendorAConfigParam1 {
            type int32;
            description "vendorA configuration parameter 1
            (SBC Device ID)";
          }

          leaf vendorAConfigParam2 {
            type string;
              description "vendorA configuration parameter 2
              (SBC Device name)";
          }
          description "Container for vendorA SBC configuration";
        }
      }
    }
]]></artwork>
        <t>

In the example above, a custom module named "vendorA-config" uses the
"augment" statement as defined in Section 4.2.8 of <xref target = "RFC7950" /> to extend
the module defined in this draft.

</t>
      </section>
    </section>
    <section anchor="processing-the-response" numbered="true" toc="default">
      <name>Processing the Capability Set Response</name>
      <t>This section provides a non-normative description of the procedures that could be carried out by the enterprise network after obtaining the SIP service provider capability set. On obtaining the capability set, the enterprise edge element can parse the various fields within the capability set and generate configuration blocks. For example, the configuration required to successfully register a SIP trunk with the SIP registrar hosted in the service provider network, the configuration required to ensure that fax calls are handled appropriately, the configuration required to advertise only audio codecs supported by the SIP service provider, among many other configuration blocks. A configuration block generated for an almost identical SIP service provider capability set document is likely going to differ drastically from one vendor to the next. </t>
      <t>Enterprise edge elements are usually capable of normalising mismatches in the signalling and media planes between the enterprise and service provider SIP networks. As a result, most, if not all of the configuration blocks required to enable successful SIP service provider peering might need to be added on the edge element. In situations wherein configuration blocks need to be distributed across multiple devices, some mechanism, that is out of scope of this document might be used to communicate the specific fields of capacity set and their corresponding value. Alternatively, a human administrator could go through the capability set document and configure the edge element (and if required, other devices in the enterprise network appropriately.</t>
    </section>
    <section anchor="examples" numbered="true" toc="default">
      <name>Examples</name>
      <t>
This section provides examples of how capability set documents that
leverage the YANG module defined in this document can be encoded over
JSON as well as the exchange of messages between the enterprise
edge element and the service provider to acquire the capability set
document. The service provider will create a unique document for each enterprise
network that will peer with it.
</t>
  <section anchor="json-capability-set-document" 
    numbered="true" toc="default">
    <name>JSON Capability Set Document</name>
    <sourcecode name="asap-example.json" type="json" markers="true">
        <![CDATA[
        {
{
    "ietf-sip-auto-peering:peering-info": [
        {
            "variant": "1.0",
            "revision": {
                "notBefore": 1742330340,
                "location": 
                    "https://capserver.example.org/capserver/capdoc.json"
            },
            "transport-info": {
                "transport": [
                    "tcp",
                    "tls",
                    "udp"
                ],
                "registrar": [
                    {
                        "host": "registrar1.voip.example.com",
                        "port": 5060
                    },
                    {
                        "host": "registrar2.voip.example.com",
                        "port": 5060
                    }
                ],
                "realms": [
                    {
                        "name": "voip.example.com",
                        "username": "voip",
                        "password": "TYnsdfji@312=="
                    }
                ],
                "call-control": [
                    {
                        "host": "callServer1.voip.example.com",
                        "port": 5060
                    },
                    {
                        "host": "192.0.2.40",
                        "port": 5065
                    }
                ],
                "dns": [
                    "192.0.2.50",
                    "192.0.2.51"
                ],
                "outbound-proxy": {
                    "host": "192.0.2.35",
                    "port": 5060
                }
            },
            "call-specs": {
                "early-media": true,
                "signaling-forking": false,
                "supported-methods": [
                    "INVITE",
                    "OPTIONS",
                    "BYE",
                    "CANCEL",
                    "ACK",
                    "PRACK",
                    "SUBSCRIBE",
                    "NOTIFY",
                    "REGISTER"
                ],
                "caller-id": {
                    "e164-format": true,
                    "preferred-method": "FROM"
                },
                "num-ranges": [
                    {
                        "index": 0,
                        "type": "range",
                        "count": 20,
                        "value": [
                            "19725455000"
                        ]
                    },
                    {
                        "index": 1,
                        "type": "collection",
                        "count": 2,
                        "value": [
                            "19725455000",
                            "19725455001"
                        ]
                    }
                ]
            },
            "media": {
                "media-type-audio": [
                    {
                        "media-format": "PCMU",
                        "rate": 8000,
                        "ptime": 20
                    },
                    {
                        "media-format": "G729",
                        "rate": 8000,
                        "ptime": 20,
                        "param": "annexb"
                    }
                ],
                "fax": {
                    "protocol": [
                        "t38",
                        "pass-through"
                    ]
                },
                "rtp": {
                    "rtp-trigger": true,
                    "symmetric-rtp": true
                },
                "rtcp": {
                    "symmetric-rtcp": true,
                    "rtcp-feedback": true
                }
            },
            "dtmf": {
                "payload-number": 101,
                "iteration": false
            },
            "security": {
                "signaling": {
                    "secure": true,
                    "version": ["1.0", "1.2", "1.3"]
                },
                "media-security": {
                    "dtls-key-management": true
                },
                "cert-location": 
                    "https://sipserviceprovider.com/certificateList.pem",
                "secure-telephony-identity": {
                    "stir-compliance": true,
                    "cert-delegation": true,
                    "acme-directory": "https://sipserviceprovider.com/acme.html"
                }
            },
            "extensions": [
                "timer",
                "rel100",
                "gin",
                "path"
            ]
        }
    ]
}
    ]]>
      </sourcecode>
      </section>
      <section anchor="example-exchange" numbered="true" toc="default">
        <name>Example Exchange</name>
        <t>
This section is an informational example depicting the configuration flow that
ultimately results in the enterprise edge element obtaining the
capability set document from the SIP service provider.

Assuming the enterprise edge element has been pre-configured with the
request target for the capability set document or has dynamically
found the request target, the edge element generates a HTTP GET request.
This request can be challenged by the service provider to authenticate
the enterprise.

</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
    GET /capdoc?trunkid=trunkent1456 HTTP/1.1
    Host: capserver.ssp1.com
    Authorization: Bearer <clientToken>
]]></artwork>
        <t>

The capability set document is obtained in the body of the response and
is encoded in JSON.

</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
    HTTP/1.1 200 OK
    Content-Type: application/json
    Content-Length: nnn

    {
        "peering-info": ...
    }
]]></artwork>
      </section>
    </section>
    <section anchor="iana-considerations" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
    <section anchor="security-considerations" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
The capability set document contains sensitive information that must be protected
from attackers. A capability set document leak can inflict considerable damage to
both the enterprise as well as the service provider. An attacker that gains access
to the capability set document can cause problems in multiple ways.</t>
<t>There are multiple attack points in the ASAP workflow. The sections below deal with
the different points at which the workflow is vulnerable to attackers.</t>
<section anchor="security-considerations-authentication" numbered="true" toc="default">
<name>OAuth Credentials</name>
<t>In scenarios wherein client authentication is carried out using OAuth resource owner credentials, it is required to ensure that these credentials cannot be acquired by any unauthorized third-party. If acquired by an unauthorized third-party, these credentials may be used to obtain the capability set document from the SIP service provider and subsequently use the information in such a document to make unauthorized calls while posing as an enterprise telephony network that has legitimately paid for calling services from a SIP service provider.</t>
</section>
<section anchor="security-considerations-transmission" numbered="true" toc="default">
  <name>Client-Server Communication</name>
  <t>All communication used by the edge element to obtain the capability set document from the capability server MUST be secured using HTTPS. Failure to do so, results in the capability set document being transmitted over clear text, thus exposing sensitive information such as targets for trunks registration, targets for outbound calling requests and credentials used in building the Authorisation header field provided in response to authentication challenges. </t>
</section>
<!-- <section anchor="security-considerations-capability-set" numbered="true" toc="default">
  <name>Capability Set</name>
<ul spacing="normal">
	<li>The attacker can use the "registrar" field in the "transport-info" section of the capability
	set to register a single or a series of endpoints with the service provider
	while pretending to be the enterprise. The "callControl" field provides a list of destinations
	that the attacker could make calls to. The attacker can also rack up considerable
	bills for the enterprise by making outgoing calls to expensive destinations via the service
	provider network such as international calls. The attacker also has information of hosts within the
	service provider network. This opens avenues such as network and vulnerability scanning, targeted
	as well as DDoS attacks on servers in the service provider network.</li>
	<li>The "call-specs" and "media" sections of the document provide information on the capabilities
	supported by the service provider network as well as valid phone numbers belonging to the enterprise.
	The attacker can leverage this information to craft SIP and SDP signaling messages in order to place
	calls towards the destinations mentioned above.</li>
	<li>The attacker will also be able to place secure calls over TLS and SRTP with the information in
	the "security" section of the capability set document.</li>

</ul>
</section> -->
<!-- <section anchor="security-considerations-storage" numbered="true" toc="default">
<name>Storage</name>
<t>The service provider MUST encrypt the capability set documents in their respective capability
 servers if they generate the documents for their customers before-hand. In a scenario where a
 capability server in the service provider network is compromised, an attacker will not be able
 to steal capability set documents and use them for malicious purposes.</t>
 <t>One method to avoid having to encrypt files is for the service provider to generate the
  capability set documents on-demand by leveraging automation. When the capability server
  receives a request to download the capability set from an enterprise, a script can generate
  the capability set document for the respective enterprise. The capability server can then
  return this document to the enterprise over a secure channel.</t>
</section> -->

  </section>
  <!-- <section anchor="references" numbered="true" toc="default">
    <name>References</name>
    <section anchor="normative-references" numbered="true" toc="default">
      <name>Normative References</name>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8555.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7092.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6665.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9110.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4855.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7362.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7033.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5764.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4568.xml"/>
      <reference anchor="SIP-Connect-TR"
      target="https://www.sipforum.org/download/sipconnect-technical-recommendation-version-2-0/?wpdmdl=2818">
  	 	<front>
    		<title>SIP Connect Technical Recommendation</title>
    		<author/>
    		<date/>
  		</front>
    </section>
    <section anchor="informative-references" numbered="true" toc="default">
      <name>Informative References</name>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2833.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4585.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3261.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4733.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4961.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9409.xml"/>
    </section>
  </section> -->
  <section anchor="acknowledgments" numbered="true" toc="default">
        <name>Acknowledgments</name>
        <t>We would like to thank those who provided detailed and thoughtful comments on this draft, especially
    Marc Petit-Huguenin, Paul Jones, Ram Mohan R, Nicola Serafini, Jonathan Rosenberg, Jon Peterson, Chris Wendt and Henning Schulzrinne.
    Additional thanks to Murray Kucherawy, Joel Halpern, Dan Harkins, Éric Vyncke, Joerg Ott, Mahesh Jethanandani, Orie Steele and Harald Alvestrand for their reviews and feedback.</t>
  </section>
  </middle>
  <back>
    <references>
      <name>Informative References</name>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2833.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3261.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4585.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4733.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4961.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5764.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9409.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7033.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7092.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7362.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8555.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9114.xml"/>
      <reference anchor="SIP-Connect-TR"
        target="https://www.sipforum.org/download/sipconnect-technical-recommendation-version-2-0/?wpdmdl=2818">
        <front>
          <title>SIP Connect Technical Recommendation</title>
          <author/>
          <date/>
        </front>
	    </reference>
    </references>
    <references>
      <name>Normative References</name>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6665.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6749.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6991.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7317.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9110.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4855.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4568.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
    </references>
	</back>
</rfc>