<?xml version='1.0'?>
<!DOCTYPE rfc SYSTEM 'rfcXXXX.dtd'>
<?rfc strict="yes" ?>
<?rfc toc="yes" ?>
<rfc ipr="trust200902" category="bcp" docName="draft-worley-sipcore-b2bua-passthru-00">

<front>
<title abbrev="Application Servers and Call Control">
Interoperation of "Application Server" B2BUAs with SIP Call Control
</title>
<author initials='D. R.' surname='Worley' fullname='Dale R. Worley'>
       <organization abbrev="Avaya">
       Avaya Inc.
       </organization>
   <address>
       <postal>
           <street>600 Technology Park Dr.</street>
           <city>Billerica</city>
           <region>MA</region>
           <code>01821</code>
           <country>US</country>
       </postal>
       <phone>+1 978 288 5505</phone>
       <email>dworley@avaya.com</email>
       <uri>http://www.avaya.com</uri>
   </address>
</author>
<date day="23" month="January" year="2010" />
<area>Transport</area>
<workgroup>SIPCORE</workgroup>
<keyword></keyword>
<abstract>
<t>
Some SIP architectures use "application servers", B2BUAs that are
inserted between two user agents during a conversation, to provide
additional processing.
Since B2BUAs do not follow the rules for SIP proxies, they do not by
default interoperate with SIP call control operations.
Augmenting application servers with suitable behaviors for handling
SIP call control operations mitigates these problems, and in many
cases, allows standard user agents to use SIP call control features without
modification.
</t>
</abstract>
</front>

<middle>

<section title="Background" anchor="background">

<t>
A number of SIP architectures, for example the IP Multimedia
System (IMS), provide various features and services to users by
inserting B2BUAs, called "application servers", into the path between
two UAs.
Each application server implements one feature to the users
participating in the conversation.
This leads to a generic call structure as follows:
</t>

<figure align='left'>
<artwork align='center'><![CDATA[
                +----+     +----+     +----+        
UA1 <---------->|App1|<--->|App2|<--->|App3|<----------> UA2
                +----+     +----+     +----+
]]></artwork>
</figure>

<t>
Since the application servers are B2BUAs, the figure contains four
dialogs (each represented by an arrow), forming a "dialog chain" which
carries the conversation between UA1 and UA2.
(The application servers may set up other dialogs to assist their
functions for the dialog chain, but in this document we will only
consider the dialog chain which carries the conversation between the
two primary UAs.)
</t>

<t>
(Note that proxies may be transiently or permanently ("Record-Routed")
inserted into each of the dialogs.
Since proxies are transparent for the purposes of SIP call control
operations, they need not be discussed in this document.)
</t>

<t>
In some cases, application servers can be implemented as proxies.
Since proxies are transparent for the purposes of SIP call control
operations, these application servers need not be considered in this
document.
</t>

<t>
The structures of application servers that will be considered in this
document  are set up only to service a conversation between two UAs,
and are to be dissolved when the dialog chain is terminated.
(This is in contrast to "session border controllers", which usually
are to remain in the dialog chain regardless of call control
operations executed by either UA.)
Typically a dialog chain is created by one or more proxies functioning
as a "sequencing engine", which successively route the INVITEs that
create the dialog chain to a series of application servers.
The sequencing engine and the application servers are usually
administered by the service provider that immediately manages either
the originating or destination UA.
</t>

<t>
The route of the initial INVITEs creating the dialog chain is
typically like this:
</t>

<figure align='left'>
<artwork align='center'><![CDATA[
       (1)    +---------------------+    (8)
SIP --------->| Sequencing Engine   |-----------> SIP
              +---------------------+
               | ^      | ^      | ^
            (2)| |   (4)| |   (6)| |
               | |(3)   | |(5)   | |(7)
               v |      v |      v |
             +----+   +----+   +----+
             |App1|   |App2|   |App3|
             +----+   +----+   +----+
]]></artwork>
</figure>

<t>
The first dialog contains messages 1 and 2, the second dialog contains
messages 3 and 4, the third dialog contains messages 5 and 6, and the
fourth dialog contains messages 7 and 8.
</t>

<t>
Of course, application servers could be inserted by both the
originating UA's service provider and the destination UA's service
provider, and also by any intermediate service providers.
However, the techniques described in this document are insensitive to
the manner in which the chain of application servers is established,
so such details will not be discussed.
</t>

</section>

<section title="Problem Statement" anchor="problem">

<t>
The design of SIP call control operations assumes that each UA is
aware of the dialog identifiers (Call-Id, from-tag, and to-tag) of the
dialog as seen by the other UA, and of the target URI of the other UA
(carried by the Contact header in the SIP messages it sends).
Of course, these conditionsare true if a single dialog connects the two UAs, but
it is not true if application server B2BUAs are inserted.
In the latter case, if the UA attempts to carry out a call control
operation, it will (by default) fail, as the operation will operate
upon the first B2BUA inserted rather than on the other UA.
</t>

<t>
As a typical example, let us consider a "consultative transfer"
operation.<xref target="service-examples"/>
UA1 has established a dialog chain with UA2.
After putting that dialog on hold, UA1 establishes a dialog chain with
UA3:
</t>

<figure align='left'>
<artwork align='center'><![CDATA[
     Call-Id:X  +----+     +----+     +----+        
UA1 <---------->|App1|<--->|App2|<--->|App3|<----------> UA2
 ^              +----+     +----+     +----+
 |
 |   Call-Id:Y  +----+     +----+     +----+        
 +------------->|App4|<--->|App5|<--->|App6|<----------> UA3
                +----+     +----+     +----+
]]></artwork>
</figure>

<t>
UA1 then desires to connect UA2 with UA3, removing itself from
communication.
UA1 does this by sending a REFER to UA2 within the established dialog,
with the REFER's Refer-To URI specifying the target address of UA3, with a
Replaces header-specification describing the dialog from UA2 to UA3.
Unless some additional processing is done, 
the REFER will arrive at UA2, with the Refer-To URI "App4&amp;Replaces=X".
(Here omitting the to-tag and from-tag, as tag processing is exactly
parallel to Call-Id processing.)
UA2 will then send an INVITE/Replaces to the target of App4 within
dialog Y, and the new dialog will replace dialog Y:
</t>

<figure align='left'>
<artwork align='center'><![CDATA[
                +----+     +----+     +----+        
UA1             |App1|     |App2|     |App3|             UA2
                +----+     +----+     +----+              ^
                                                          |
 +--------------------------------------------------------+
 |
 |   Call-Id:Z  +----+     +----+     +----+        
 +------------->|App4|<--->|App5|<--->|App6|<----------> UA3
                +----+     +----+     +----+
]]></artwork>
</figure>

<t>
(In addition, the sequencing engine(s) may have added application servers on the
path of the new dialog Z.)
The problem is that the application servers App4, App5, and
App6 remain in the path of the new dialog chain from UA2 to UA3,
whereas they should be skipped; the stimulated INVITE from UA2 should
have been directed to the target URI of UA3.
</t>

</section>

<section title="Requirements" anchor="requirements">

<t>
<list style="symbols">
<t>
REQ-1 - A SIP User Agent is able to direct a within-dialog request
to reach the target URI of the remote UA.
</t>
<t>
REQ-2 - A SIP User Agent is able to direct an out-of-dialog request to
reach the target URI of the remote UA.
</t>
<t>
REQ-3 - A SIP User Agent can, within a request, effectively specify
the dialog identifiers that a remote UA sees within a dialog chain
that the SIP User Agent is participating in.
Specifically, this can be done in the
Replaces<xref target="replaces"/> and Join<xref target="join"/> headers of
INVITE requests and the Target-Dialog<xref target="target-dialog"/>
header of REFER requests.
</t>
</list>
</t>

</section>

<section title="Behavior" anchor="behavior">

<t>
This section describes behaviors to be adopted by application servers
to satisfy the requirements to support SIP call control operations.
These behaviors allow the user agents to perform call control without
consideration for the presence of the applciation servers.
By displacing the burden of adaptation from the user agents (which are
likely to be generic products) and placing it on the application
servers (which are likely to be heavily customized for the context in
which they operation), this strategy maximizes the liklihood of
achieving interoperation in practical SIP envrionments of this kind.
</t>

<t>
Because no new protocol elements are introduced by this document, we
call these behaviors by the name B2BUA (or application server) "passthru"
behavior.
</t>

<section title="In-dialog REFER" anchor="in-dialog-refer">

<t>
The first required behavior is one that is implemented in most
application server B2BUAs already:
A REFER request received within a dialog from one UA is passed through largely without
change.
This is in contrast to how a "session border controller" (SBC) B2BUA
would behave; an SBC would "shortstop" a REFER by having its UA
component that receives the REFER act on the REFER within its
containing dialog (which keeps the SBC within the dialog chain).
</t>

<figure align='left'>
<artwork align='center'><![CDATA[
UA1             App1              UA2
 |                |                |
 |  REFER C1      |                |
 |  Call-Id: D1   |                |
 |--------------->|                |
 |                |  REFER C2      |
 |                |  Call-Id: D2   |
 |                |--------------->|
 |                |  200           |
 |                |  Call-Id: D2   |
 |                |<---------------|
 |  200           |                |
 |  Call-Id: D1   |                |
 |<---------------|                |
 |                |                |
]]></artwork>
</figure>

<t>
Of course, the second REFER has the Call-Id and tags of the dialog
from App1 to UA2 rather than those in the first REFER.
The Refer-To URI of the REFER request is not modified.
</t>

</section>

<section title="INVITE/Replaces" anchor="invite-replaces">

<t>
The next needed behavior is to allow a UA to generate an
INVITE/Replaces that effectively refers to the target URI and dialog
identifiers of a remote UA, despite that the UA does not know them.
This is implemented by requiring that an application server, when it
receives an INVITE/Replaces at one of its target URIs, to:

<list style="numbers">
<t>
determine that the Replaces header describes a dialog D-IN terminating at
that target URI (and respond 481 if it does not),
</t>
<t>
determine the dialog D-OUT that is the "other side" of the dialog
chain containing D-IN at this application server,
</t>
<t>
proxy the INVITE/Replaces
</t>
<t>
setting the request-URI to the remote target of D-OUT
</t>
<t>
changing the value of the Replaces header to the dialog identifiers of
D-OUT.
</t>
</list>

If the application servers in a dialog chain implement this behavior,
an INVITE/Replaces will pass through the application servers in
sequence and will arrive at the intended user agent with a Replaces
header that describes the dialog as seen by the intended user agent.
</t>

<t>
The consultative transfer example now operates in this way:
</t>

<figure align='left'>
<artwork align='center'><![CDATA[
UA1             App1              UA2             UA3
 |                |                |               |
 |  INVITE App1   |                |               |
 |  Call-Id: D1   |                |               |
 |--------------->|                |               |
 |                |  INVITE App2   |               |
 |                |  Call-Id: D2   |               |
 |                |--------------->|               |
 |                |   200          |               |
 |                |   Contact: C2  |               |
 |                |<---------------|               |
 |   200          |                |               |
 |   Contact: C1  |                |               |
 |<---------------|                |               |
 |                |                |               |
[Set up of dialog chain frm UA1 to UA3 omitted.]
 |                |                |               |
[UA1 sends "REFER/Refer-To: C1&Replaces=D1" through application
 server chain to UA3.]
 |                |                |               |
 |                |  INVITE C1     |               |
 |                |  Call-Id: D5   |               |
 |                |  Replaces: D1  |               |
 |                |<-------------------------------|
 |                |  INVITE C2     |               |
 |                |  Call-Id: D5   |               |
 |                |  Replaces: D2  |               |
 |                |--------------->|               |
 |                |  200           |               |
 |                |  Call-Id: D5   |               |
 |                |  Contact: C2   |               |
 |                |<---------------|               |
 |                |  200           |               |
 |                |  Call-Id: D5   |               |
 |                |  Contact: C1a  |               |
 |                |------------------------------->|
 |                |                |               |
]]></artwork>
</figure>

</section>

<section title="INVITE/Join" anchor="invite-join">

<t>
The B2BUA behavior needed to allow INVITE/Join to operate is exactly
the same as that used for INVITE/Replaces.
</t>

</section>

<section title="REFER/Target-Dialog" anchor="refer-target-dialog">

<t>
The processing for an out-of-dialog REFER with a Target-Dialog header
is analogous to that for INVITE/Replaces, with the Target-Dialog
header providing the dialog identifiers that need to be rewritten,
rather than the Replaces header.
</t>

</section>

</section>

<section title='Security Considerations' anchor='security'>

<t>
There are no known security implications of these behaviors.
</t>

</section>

<section title="Revision History" anchor="revision">

<section title="draft-worley-sipcore-b2bua-passthru-00" anchor="00">

<t>
Initial version.
</t>

</section>

</section>

</middle>

<back>
<references title='Normative References'>

<reference anchor='sip'>
<!-- RFC 3261 -->
    <front>
	<title>SIP: Session Initiation Protocol</title>
        <author initials='J.' surname='Rosenberg'><organization/></author>
        <author initials='H.' surname='Schulzrinne'><organization/></author>
        <author initials='G.' surname='Camarillo'><organization/></author>
        <author initials='A.' surname='Johnston'><organization/></author>
        <author initials='J.' surname='Peterson'><organization/></author>
        <author initials='R.' surname='Sparks'><organization/></author>
        <author initials='M.' surname='Handley'><organization/></author>
        <author initials='E.' surname='Schooler'><organization/></author>
	<date month='June' year='2002'/>
    </front>
    <seriesInfo name='RFC' value='3261' />
    <format type='TXT'
            target='ftp://ftp.isi.edu/in-notes/rfc3261.txt' />
</reference>

</references>

<references title="Informative References">

<reference anchor="endpoint-view">
<!-- draft-boulton-sip-endpoint-view-00 -->
    <front>
	<title> An Extension to the Session Initiation Protocol (SIP)
	for Endpoint Session View</title>
	<author initials="C." surname="Boulton"><organization/></author>
	<author initials="I." surname="Evans"><organization/></author>
	<author initials="G." surname="Liddell"><organization/></author>
	<author initials="D." surname="Shutt"><organization/></author>
	<author initials="P." surname="Barrett"><organization/></author>
	<date month="September" year="2009"/>
    </front>
    <seriesInfo name='I-D' value="draft-boulton-sip-endpoint-view-00" />
    <format type='TXT'
            target="http://tools.ietf.org/html/draft-boulton-sip-endpoint-view-00" />
    <format type='TXT'
            target="http://www.ietf.org/rfc/rfc5359.txt" />
</reference>

<reference anchor="service-examples">
<!-- RFC 5359 -->
    <front>
	<title>Session Initiation Protocol Service Examples</title>
        <author initials='A.' surname="Johnston"><organization/></author>
        <author initials='R.' surname="Sparks"><organization/></author>
        <author initials='C.' surname="Cunningham"><organization/></author>
        <author initials='S.' surname="Donovan"><organization/></author>
        <author initials='K.' surname="Summers"><organization/></author>
	<date month="October" year="2008"/>
    </front>
    <seriesInfo name='RFC' value="5359" />
    <format type='TXT'
            target='ftp://ftp.isi.edu/in-notes/rfc5359.txt' />
</reference>

<reference anchor='replaces'>
<!-- RFC 3891 -->
    <front>
	<title>The Session Initiation Protocol (SIP) "Replaces" Header</title>
	<author initials='R.' surname='Mahy'><organization/></author>
	<author initials='B.' surname='Biggs'><organization/></author>
	<author initials='R.' surname='Dean'><organization/></author>
	<date month='September' year='2004'/>
    </front>
    <seriesInfo name='RFC' value='3891'/>
    <format type='TXT'
            target='ftp://ftp.isi.edu/in-notes/rfc3891.txt' />
</reference>

<reference anchor="join">
<!-- RFC 3911 -->
    <front>
	<title>The Session Initiation Protocol (SIP) "Join" Header</title>
	<author initials='R.' surname='Mahy'><organization/></author>
	<author initials='D.' surname="Petrie"><organization/></author>
	<date month="October" year='2004'/>
    </front>
    <seriesInfo name='RFC' value="3911"/>
    <format type='TXT'
            target='ftp://ftp.isi.edu/in-notes/rfc3911.txt' />
</reference>

<reference anchor="target-dialog">
<!-- RFC 5589 -->
    <front>
	<title>Session Initiation Protocol (SIP) Call Control - Transfer</title>
	<author initials='R.' surname="Sparks"><organization/></author>
	<author initials='A.' surname="Johnston"><organization/></author>
	<author initials='D.' surname="Petrie"><organization/></author>
	<date month="June" year="2009"/>
    </front>
    <seriesInfo name='RFC' value="5589"/>
    <format type='TXT'
            target='ftp://ftp.isi.edu/in-notes/rfc5589.txt' />
</reference>

</references>
</back>

</rfc>

