 |
Events
| Number | Event ID (name,vendor,version) | Fired | Fired with |
| Out of dialog requests - same as JAIN SIP 1.1 RA type |
| 1 | javax.sip.message.Request.INVITE, javax.sip, 1.1 | When received and dialog activity does not exists and does not have any sbbs attached to its AC | - |
| 2 | javax.sip.message.Request.ACK, javax.sip, 1.1 | Look event #1 | - |
| 3 | javax.sip.message.Request.CANCEL, javax.sip, 1.1 | When received | - |
| 4 | javax.sip.message.Request.BYE, javax.sip, 1.1 | Look event #1 | - |
| 5 | javax.sip.message.Request.REGISTER, javax.sip, 1.1 | Look event #1 | - |
| 6 | javax.sip.message.Request.OPTIONS, javax.sip, 1.1 | Look event #1 | - |
| 7 | javax.sip.message.Request.PRACK, javax.sip, 1.1 | Look event #1 | - |
| 8 | javax.sip.message.Request.INFO, javax.sip, 1.1 | Look event #1 | - |
| 9 | javax.sip.message.Request.UPDATE, javax.sip, 1.1 | Look event #1 | - |
| 10 | javax.sip.message.Request.REFER, javax.sip, 1.1 | Look event #1 | - |
| 11 | javax.sip.message.Request.SUBSCRIBE, javax.sip, 1.1 | Look event #1 | - |
| 12 | javax.sip.message.Request.NOTIFY, javax.sip, 1.1 | Look event #1 | - |
| 13 | javax.sip.message.Request.MESSAGE, javax.sip, 1.1 | Look event #1 | - |
| 14 | javax.sip.message.Request.SIP_EXTENSION, javax.sip, 1.1 | Look event #1 plus method is different than listed in events # 1-13 | - |
| In-dialog requests - new for 1.2 RA Type |
| 15 | javax.sip.dialog.Request.INVITE, Java.net, 1.2 | When received and this request is associated with dialog which has attached sbbs to its AC, otherwise event #1 | - |
| 16 | javax.sip.dialog.Request.ACK, Java.net, 1.2 | When received and this request is associated with dialog which has attached sbbs to its AC, otherwise event #2 | - |
| 17 | javax.sip.dialog.Request.BYE, Java.net, 1.2 | When received and this request is associated with dialog which has attached sbbs to its AC, otherwise event #4 | - |
| 18 | javax.sip.dialog.Request.REGISTER, Java.net, 1.2 | When received and this request is associated with dialog which has attached sbbs to its AC, otherwise event #5 | - |
| 19 | javax.sip.dialog.Request.OPTIONS, Java.net, 1.2 | When received and this request is associated with dialog which has attached sbbs to its AC, otherwise event #6 | - |
| 20 | javax.sip.dialog.Request.PRACK, Java.net, 1.2 | When received and this request is associated with dialog which has attached sbbs to its AC, otherwise event #7 | - |
| 21 | javax.sip.dialog.Request.INFO, Java.net, 1.2 | When received and this request is associated with dialog which has attached sbbs to its AC, otherwise event #8 | - |
| 22 | javax.sip.dialog.Request.UPDATE, Java.net, 1.2 | When received and this request is associated with dialog which has attached sbbs to its AC, otherwise event #9 | - |
| 23 | javax.sip.dialog.Request.REFER, Java.net, 1.2 | When received and this request is associated with dialog which has attached sbbs to its AC, otherwise event #10 | - |
| 24 | javax.sip.dialog.Request.SUBSCRIBE, Java.net, 1.2 | When received and this request is associated with dialog which has attached sbbs to its AC, otherwise event #11 | - |
| 25 | javax.sip.dialog.Request.NOTIFY, Java.net, 1.2 | When received and this request is associated with dialog which has attached sbbs to its AC, otherwise event #12 | - |
| 26 | javax.sip.dialog.Request.MESSAGE, Java.net, 1.2 | When received and this request is associated with dialog which has attached sbbs to its AC, otherwise event #13 | - |
| 27 | javax.sip.dialog.Request.SIP_EXTENSION, Java.net, 1.2 | When received and this request is associated with dialog which has attached sbbs to its AC, look event #14 | - |
| Responses - same as JAIN SIP 1.1 RA Type |
| 28 | javax.sip.message.Response.TRYING, javax.sip, 1.1 | When response with status code 100 is received | - |
| 29 | javax.sip.message.Response.INFORMATIONAL, javax.sip, 1.1 | When response with "101 < statusCode && statusCode < 200" is received | - |
| 30 | javax.sip.message.Response.SUCCESS, javax.sip, 1.1 | When response with "200 <= statusCode && statusCode < 300" is received | - |
| 31 | javax.sip.message.Response.REDIRECTION, javax.sip, 1.1 | When response with "300 <= statusCode && statusCode < 400" is received | - |
| 32 | javax.sip.message.Response.CLIENT_ERROR, javax.sip, 1.1 | When response with "400 <= statusCode && statusCode < 500" is received | - |
| 33 | javax.sip.message.Response.SERVER_ERROR, javax.sip, 1.1 | When response with "500 <= statusCode && statusCode < 600" is received | - |
| 34 | javax.sip.message.Response.GLOBAL_FALIURE, javax.sip, 1.1 | When response with "600 <= statusCode && statusCode < 700" is received | - |
| Timeouts |
| 35 | javax.sip.Timeout.TRANSACTION, javax.sip, 1.1 | When underlying transaction object timeouts - does not receive final response | #40 |
| 36 | javax.sip.Timeout.DIALOG, java.net, 1.2 | NEVER - redundant event? | |
| Dialog State events - new for 1.2 RA Type |
| 37 | javax.sip.dialog.SetupEarly, Java.net, 1.2 | When response with code 1xx-199 and ToTag is sent and dialog enters DialogState._EARLY state | |
| 38 | javax.sip.dialog.SetupConfirmed, Java.net, 1.2 | When final response with code 2xx-299 is received ( with ToTag ) and dialog enters DialogState._CONFIRMED | |
| 39 | javax.sip.dialog.SetupFailed, Java.net, 1.2 | When underlying dialog activity was not in DialogState._CONFIRMED before it was terminated/timedout | #40 |
| 40 | javax.sip.dialog.SetupTimedOut, Java.net, 1.2 | When dialog activity exists, has attached sbbs to its AC, it did not receive final response and INVITE transaction timeouts - its state was not equal to DialogState._CONFIRMED | #35 |
| 41 | javax.sip.dialog.Terminated, Java.net, 1.2 | When dialog acctivity is beeying terminated, for instance BYE was received, INVITE Tx has been terminated/timedout before it received final response | - |
| New events for 1.2 RA Type |
| 42 | javax.sip.transaction.Terminated, Java.net, 1.2 | When underlying transaction object is beeing terminated - | - |
| 43 | javax.sip.dialog.TerminationRequest, Java.net, 1.2 | When BYE terminating dialog is received. | - |
Events 41 and 40 can be fired independently, meaning if INVITE Tx timeouts we will atleast event 40 and if dialog assosiacted with INVITE Tx was in DialogState._EARLY state we should receive event 41.
Events 37-39 are fired independently from events 40 and 41, as a group, meaning we can receive only one of them at a time, but we can receie one event from (37,38,39 ) with one of mentioned above ( 40 or 41 )
Event 37-39 are always fired after sending response or receiving one. This response has to change dialog state to one of following ( DialogState._EARLY -> SetupEarly,DialogState._CONFIRMED -> SetupConfirmed and DialogState._TERMINATED -> if state of dialog was not determined ( it shouldnt happen, but someone can implement something wrong at his end so... ) or it was DialogState._EARLY - SetupFailed
a Scenarios with dialog activity
Here are example scenarios and RA behaviour covering those casses:
Receiving INVITE, sending provisional response with tag
- <--- INVITE
- Sbb creates dialog, dialog ACI and attaches to it, now all subsequent request will be delivered to dialog ACI.
- ----> 100-199 response to request with ToTag
- Fire localy to dialog aci javax.sip.dialog.SetupEarly
- ----> OK(200) response to INVITE
- Depending on stack impl here we can receive STx termination event
- Fire localy javax.sip.dialog.SetupConfirmed
- Dialog ACI <--- Request
100-199 response is not required, it could be ommited, but OK response has to have both tags set - one by us, other by another enpoint.
Receiving INVITE, sending provisional response without tag
- <--- INVITE
- Sbb creates dialog, dialog ACI and attaches to it, now all subsequent request will be delivered to dialog ACI.
- ----> 100-199 response to request without ToTag
- ----> OK(200) response to INVITE with ToTag
- Depending on stack impl here we can receive STx termination event
- Fire localy javax.sip.dialog.SetupConfirmed
- Dialog ACI <--- Request
100-199 response is not required, it could be ommited, but OK response has to have both tags set - one by us, other by another enpoint.
Sending INVITE, receiving provisional response with tag
- Sbb attached to dialog ACI & client transaction ACI
- Client transaction & dialog activitiy started
- INVITE --->
- <--- 100-199 response with FromTag on client activity
- <--- javax.sip.dialog.SetupEarly on dialog activity
- <--- OK(200) response on client activity 1 ACK --->
- <--- javax.sip.dialog.SetupConfirmed on dialog activity
- <--- Here we can receive Transaction Terminated event - depends on stack impl, we could receive it before javax.sip.dialog.SetupConfirmed -> Client transaction activity ended
- Dialog activity continues to exists, here subsequent mid-dialog requests can occur within this activity
- Client transaction activity started
- BYE ---> (Which should be sent via the javax.sip.Dialog.sendRequest method)
- <--- OK on client activity
- <--- javax.sip.dialog.Terminated on dialog activity, <--- javax.sip.transaction.Terminated on clint activity
100-199 response is not required, it could be ommited, but OK response has to have both tags set - one by us, other by another enpoint.
Sending INVITE, receiving provisional response without tag
- Sbb attached to dialog ACI & client transaction ACI
- Client transaction & dialog activitiy started
- INVITE --->
- <--- 100-199 response without FromTag on client activity
- <--- OK(200) response on client activity with FromTag 1 ACK --->
- <--- javax.sip.dialog.SetupConfirmed on dialog activity
- <--- Here we can receive Transaction Terminated event - depends on stack impl, we could receive it before javax.sip.dialog.SetupConfirmed -> Client transaction activity ended
- Dialog activity continues to exists, here subsequent mid-dialog requests can occur within this activity
- Client transaction activity started
- BYE ---> (Which should be sent via the javax.sip.Dialog.sendRequest method)
- <--- OK on client activity
- <--- javax.sip.dialog.Terminated on dialog activity, <--- javax.sip.transaction.Terminated on clint activity
100-199 response is not required, it could be ommited, but OK response has to have both tags set - one by us, other by another enpoint.
Receiving INVITE followed by cancel ( with provisional response with tag )
- <--- INVITE
- Sbb creates dialog, dialog ACI and attaches to it, now all subsequent request will be delivered to dialog ACI.
- ----> 100-199 response to request with ToTag ->
it has to be sent in order to make CANCEL valid request.
- <--- to dialog aci javax.sip.dialog.SetupEarly
- <--- CANCEL
on server activity despite dialog activity exists
- ---> OK
- <--- javax.sip.dialog.SetupFialed, javax.sip.dialog.DialogTerminated (should be sent since dialog is in DialogState._EARLY which is valid dialgo state) on dialog aci and <--- javax.sip.transaction.Terminated for both INVITE and CANCEL Tx
Receiving INVITE followed by cancel ( with provisional response without tag )
- <--- INVITE
- Sbb creates dialog, dialog ACI and attaches to it, now all subsequent request will be delivered to dialog ACI.
- ----> 100-199 response to request without ToTag ->
it has to be sent in order to make CANCEL valid request.
- <--- CANCEL
on server activity despite dialog activity exists
- ---> OK
- <--- javax.sip.dialog.SetupFialed, javax.sip.dialog.DialogTerminated (depends on stack, since dialog doesnt exists until it has state, and here without tag it has pseudo state of
null) on dialog aci and <--- javax.sip.transaction.Terminated for both INVITE and CANCEL Tx
CANCELing previous INVITE with provisional response with tag
- Sbb creates INVITE, client aci, dialog aci and attaches to them.
- ---> INVITE
- <--- 100-199 response with ToTag
it has to be received in order to make CANCEL request valid.
- <--- javax.sip.dialog.SetupEarly on dialog aci
- Sbb creates CANCEL request, client aci for it and attaches to it
- ---> CANCEL
- <--- OK
- <--- javax.sip.dialog.SetupFailed, javax.sip.dialog.DialogTerminated (should be sent since dialog is in DialogState._EARLY which is valid dialgo state) on dialog aci and <--- javax.sip.transaction.Terminated for both INVITE and CANCEL Tx
CANCELing previous INVITE with provisional response without tag
- Sbb creates INVITE, client aci, dialog aci and attaches to them.
- ---> INVITE
- <--- 100-199 response without ToTag
it has to be received in order to make CANCEL request valid.
- Sbb creates CANCEL request, client aci for it and attaches to it
- ---> CANCEL
- <--- OK
- <--- javax.sip.dialog.SetupFailed, javax.sip.dialog.DialogTerminated (depends on stack, since dialog doesnt exists until it has state, and here without tag it has pseudo state of
null) on dialog aci and <--- javax.sip.transaction.Terminated for both INVITE and CANCEL Tx
Timing out Tx - INVITE case
This one looks almost the same when we act as server or client.
- <--- INVITE
- create dialog aci and attach to it (
if we dont attach, javax.sip.dialog.SetupTimedOut event wont be fired, this is only differenc )
- ---> 100-199 response (
this is not nessesary, with 100-199 response with tag sent we will receive SetupEarly dialog event, and for sure we should receive DialogTerminatedEvent as Dialog enters EARLY state )
- no activity
- <--- javax.sip.Timeout.TRANSACTION on server activity if dialog aci exists and it has someone attached to it and state of dialog was different than confirmed <--- javax.sip.dialog.SetupTimedOut on dialog aci
- <--- javax.sip.dialog.DialogTerminated (
depends on stack - if state was different than pseudo state null it should always be fired, otherwise its stack decision)
Terminating dialog with BYE
- Sbb attached to dialog ACI & client transaction ACI
- Client transaction & dialog activitiy started
- INVITE --->
- <--- 100-199 response with FromTag on client activity
- <--- javax.sip.dialog.SetupEarly on dialog activity
- <--- OK(200) response on client activity 1 ACK --->
- <--- javax.sip.dialog.SetupConfirmed on dialog activity
- <--- Here we can receive Transaction Terminated event - depends on stack impl, we could receive it before javax.sip.dialog.SetupConfirmed -> Client transaction activity ended
- Dialog activity continues to exists, here subsequent mid-dialog requests can occur within this activity
- Client transaction activity started
- <--- Stack receives BYE, RA determines that this BYE will terminate Dialog and fires javax.sip.dialog.TerminationRequest (Which should be sent via the javax.sip.Dialog.sendRequest method)
- ---> OK
- <--- javax.sip.dialog.Terminated on dialog activity, <--- javax.sip.transaction.Terminated on clint activity
b Scenarios without dialog activity ( without attaching to dialog aci)
-- Main.baranowb - 18 Aug 2006
|