[Serusers] what makes a transaction?

Greg Fausak lgfausak at august.net
Thu Feb 27 17:20:10 CET 2003

I'm trying to understand stateful vs. stateless transactions.

A stateless 'transaction' simply lasts as long as it takes to process
the current sip request.  It is then forgotten.

However, a stateful transaction I'm having a little problem grasping.
For instance, if I t_relay() an INVITE, logically the transaction is
started....so when the response comes it isn't delivered to the main
route {} block, but instead it is delivered to the awaiting stateful
t_relay(), probably keyed by callid.  So, for instance:

401 Unauthorized ->

Is this entire sequence a transaction?  Right after this the UA sends
an ACK, this is a transaction unto itself?

ACK <-

The UA then sends :

100 Trying ->
180 Ringing ->
200 OK ->

All of these messages are a 'transaction' handled by t_relay()?  The next
transaction is:

ACK <-

Finally, the last transaction would be (as an example):

BYE <-
200 OK ->

So the ser route{} block would need to recognize and handle


in this context.  Is that correct?  If I was running 'statelessly'
I would need to handle and send every single message listed?


More information about the sr-users mailing list