Subject: [Sip] Transactions and Dialogs... Don't understand their relationship!

From: "Patrick Lam" <[email-masked]>
Date: Thu, 10 Apr 2003 09:33:26 +0800

Dear all:

Is transaction related to dialog at all?  Or should they be seen as related?

It seems to me that transactions are identified by branch parameter, and
dialogs are identified by Call-ID (plus To/From tags).  But can I say that
an INVITE + ACK transactions create a dialog?  And does a dialog end with
its associated transaction, and vice versa?

To me, I see that transactions are just logical components of SIP elements
(like client transaction and server transaction).  They just have to be
implemented for the SIP elements to work.  However, according to RFC 3261,
p.24 and 25:

SIP Transaction: A SIP transaction occurs between a client and a server and
comprises all messages from the first request sent         from the client
to the server up to a final (non-1xx) response sent from the server to the
client.  If the request is INVITE         and the final response is a
non-2xx, the transaction also includes an ACK to the response.  The ACK for
a 2xx response to an INVITE request is a separate transaction.

It sounds like a transaction is indeed a "physical" relationship between
requests and responses.  Therefore, it sounds quite similar to the concept
of dialogs.

What I do not understand is that if we already have a concept of dialog, who
do we still need the concept of transaction?

I guess I am seriously misunderstanding the concepts here.  Can someone
please explain to me the relationship and difference between transactions
and dialogs?

Thanks very much in advance.

Patrick Lam

---

From: Shazia Irfan <[email-masked]>
Date: Wed, 9 Apr 2003 22:19:32 -0700 (PDT)

SIP Transactions are actually composed of request corresponding responses. SIP send request to initiate particular action, i.e. INVITE request send to establish call, REGISTER request is send for registartion purposes.
On other hand Dialog represents a peer-to-peer SIP relationship between two user agents that persists for some time. The dialog facilitates sequencing of
messages between the user agents and proper routing of requests
between both of them.( as mention in RFC 3261).
The concept can be explained as, when UA when to establish call with other UA, it send INVITE request, when it receives response (provisional or final), a dialog establish. Transaction ends after receiving final response e.g. 200 OK, but dialog do not end. All mid session requests (re-INVITES, REFER etc.) are composed with the help of dialog
Now UA wants to terminate call, it send BYE request to other UA and this BYE request and its response terminate dialogs at both end.
Regards,
Shazia
 Patrick Lam <[email-masked]> wrote:Dear all:

Patrick Lam

> ATTACHMENT part 2 application/ms-tnef name=winmail.dat 

---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more

---

From: "Patrick Lam" <[email-masked]>
Date: Thu, 10 Apr 2003 14:32:54 +0800

Shazia:

Thanks for your explanation.  However, I still have some further
questions.

Now I understand the difference between dialog and transaction (at least
in terms of how they end).  But it seems like the only relationship
between the two is that - transaction creates (as in INVITE) or changes
(as in re-INVITE and REFER) a dialog.  Am I right?

Also, according to my understanding, the transaction that you are
talking about (created by INVITE and ended by a final response) is
different than the "Client/Server Transactions" mentioned in Section 17
of RFC 3261 (where I see them as more like logical components inside SIP
elements).  Is this correct?

Furthermore, do mid-session requests (re-INVITE, REFER, etc.) create new
transactions (i.e. use a new branch parameter)?

In addition, I do not see the clear purpose of the concept of
transaction (vs. the concept of dialog).  To me, dialog is a signaling
relationship between 2 or more SIP UAs.  It already includes the concept
of a transaction, doesn't it?  In terms of describing SIP signaling or
features in general, I do not see the role of transactions in the big
picture.  Am I missing something?

Thanks again.

Regards,

Patrick Lam

-----Original Message-----
From: Shazia Irfan [mailto:[email-masked]] 
Sent: Thursday, April 10, 2003 1:20 PM
To: Patrick Lam; [email-masked]
Subject: Re: [Sip] Transactions and Dialogs... Don't understand their
relationship!

SIP Transactions are actually composed of request corresponding
responses. SIP send request to initiate particular action, i.e. INVITE
request send to establish call, REGISTER request is send for
registartion purposes. 

On other hand Dialog represents a peer-to-peer SIP relationship between
two user agents that persists for some time. The dialog facilitates
sequencing of
messages between the user agents and proper routing of requests
between both of them.( as mention in RFC 3261). 

The concept can be explained as, when UA when to establish call with
other UA, it send INVITE request, when it receives response (provisional
or final), a dialog establish. Transaction ends after receiving final
response e.g. 200 OK, but dialog do not end. All mid session requests
(re-INVITES, REFER etc.) are composed with the help of dialog 

Now UA wants to terminate call, it send BYE request to other UA and this
BYE request and its response terminate dialogs at both end. 

Regards, 

Shazia 

 Patrick Lam <[email-masked]> wrote: 

Dear all:

Is transaction related to dialog at all? Or should they be seen as
related?

It seems to me that transactions are identified by branch parameter, and
dialogs are identified by Call-ID (plus To/From tags). But can I say
that
an INVITE + ACK transactions create a dialog? And does a dialog end with
its associated transaction, and vice versa?

To me, I see that transactions are just logical components of SIP
elements
(like client transaction and server transaction). They just have to be
implemented for the SIP elements to work. However, according to RFC
3261,
p.24 and 25:

SIP Transaction: A SIP transaction occurs between a client and a server
and
comprises all messages from the first request sent from the client
to the server up to a final (non-1xx) response sent from the server to
the
client. If the request is INVITE and the final response is a
non-2xx, the transaction also includes an ACK to the response. The ACK
for
a 2xx response to an INVITE request is a separate transaction.

It sounds like a transaction is indeed a "physical" relationship between
requests and responses. Therefore, it sounds quite similar to the
concept
of dialogs.

What I do not understand is that if we already have a concept of dialog,
who
do we still need the concept of transaction?

I guess I am seriously misunderstanding the concepts here. Can someone
please explain to me the relationship and difference between
transactions
and dialogs?

Patrick Lam

> ATTACHMENT part 2 application/ms-tnef name=winmail.dat 

  _____  

Do you Yahoo!?
Yahoo! <http://us.rd.yahoo.com/finance/mailsig/*http:/tax.yahoo.com>
Tax Center - File online, calculators, forms, and more

---

From: Shazia Irfan <[email-masked]>
Date: Thu, 10 Apr 2003 03:31:09 -0700 (PDT)

>Now I understand the difference between dialog and transaction (at least in terms of >how they end).  But it seems like the only relationship between the two is that – >transaction creates (as in INVITE) or changes (as in re-INVITE and REFER) a dialog.  >Am I right?

Transaction creates, terminate dialog + can be used for changing media session information e.g. re-INVITE transaction can be used to hold the call between two calling parties, so this transaction do not change dialog but change session information. As according to RFC 3261 pp71

A 2xx response to an INVITE establishes a session, and it also creates a dialog between the UA that issued the INVITE and the UA that generated the 2xx response.

So session created by INVITE transaction can be change by further re-INVITE transactions.

>Also, according to my understanding, the transaction that you are talking about (created >by INVITE and ended by a final response) is different than the “Client/Server >Transactions” mentioned in Section 17 of RFC 3261 (where I see them as more like >logical components inside SIP elements).  Is this correct?

I think transaction are objects within SIP (if talk in OO terms) created by sending/receiving a request. Maintain states and handle retransmission of request or response. They are deleted after going to TERMINATED State.

>Furthermore, do mid-session requests (re-INVITE, REFER, etc.) create new transactions >(i.e. use a new branch parameter)?

Yes.

>In addition, I do not see the clear purpose of the concept of transaction (vs. the concept >of dialog).  To me, dialog is a signaling relationship between 2 or more SIP UAs.  It >already includes the concept of a transaction, doesn’t it?  In terms of describing SIP >signaling or features in general, I do not see the role of transactions in the big picture.  >Am I missing something?

No, dialog keep informtion of sequencing of message (through CSeq), and routing of messages (through From, To, Route and Contact fields). They have no link with media sessions, while Transaction have link with session, also Transaction take care of request/reponse retransmissions, timer management. Dialog and Transaction are actually two different entities. May be this explanation works!!. For further explanation pls. read sections 12 & 17.

Regards,

Shazia

Thanks for your explanation.  However, I still have some further questions.

Now I understand the difference between dialog and transaction (at least in terms of how they end).  But it seems like the only relationship between the two is that – transaction creates (as in INVITE) or changes (as in re-INVITE and REFER) a dialog.  Am I right?

Also, according to my understanding, the transaction that you are talking about (created by INVITE and ended by a final response) is different than the “Client/Server Transactions” mentioned in Section 17 of RFC 3261 (where I see them as more like logical components inside SIP elements).  Is this correct?

Furthermore, do mid-session requests (re-INVITE, REFER, etc.) create new transactions (i.e. use a new branch parameter)?

In addition, I do not see the clear purpose of the concept of transaction (vs. the concept of dialog).  To me, dialog is a signaling relationship between 2 or more SIP UAs.  It already includes the concept of a transaction, doesn’t it?  In terms of describing SIP signaling or features in general, I do not see the role of transactions in the big picture.  Am I missing something?

Thanks again.

Regards,

Patrick Lam

-----Original Message-----
From: Shazia Irfan [mailto:[email-masked]] 
Sent: Thursday, April 10, 2003 1:20 PM
To: Patrick Lam; [email-masked]
Subject: Re: [Sip] Transactions and Dialogs... Don't understand their relationship!

Regards, 

Shazia 

Dear all:

Patrick Lam

Do you Yahoo!?