The Source for Java Technology Collaboration


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. -

ALERT! 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.

ALERT! 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 )

ALERT! 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

  1. <--- INVITE
  2. Sbb creates dialog, dialog ACI and attaches to it, now all subsequent request will be delivered to dialog ACI.
  3. ----> 100-199 response to request with ToTag
  4. Fire localy to dialog aci javax.sip.dialog.SetupEarly
  5. ----> OK(200) response to INVITE
  6. Depending on stack impl here we can receive STx termination event
  7. Fire localy javax.sip.dialog.SetupConfirmed
  8. Dialog ACI <--- Request

TIP 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

  1. <--- INVITE
  2. Sbb creates dialog, dialog ACI and attaches to it, now all subsequent request will be delivered to dialog ACI.
  3. ----> 100-199 response to request without ToTag
  4. ----> OK(200) response to INVITE with ToTag
  5. Depending on stack impl here we can receive STx termination event
  6. Fire localy javax.sip.dialog.SetupConfirmed
  7. Dialog ACI <--- Request

TIP 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

  1. Sbb attached to dialog ACI & client transaction ACI
  2. Client transaction & dialog activitiy started
  3. INVITE --->
  4. <--- 100-199 response with FromTag on client activity
  5. <--- javax.sip.dialog.SetupEarly on dialog activity
  6. <--- OK(200) response on client activity 1 ACK --->
  7. <--- javax.sip.dialog.SetupConfirmed on dialog activity
  8. <--- Here we can receive Transaction Terminated event - depends on stack impl, we could receive it before javax.sip.dialog.SetupConfirmed -> Client transaction activity ended
  9. Dialog activity continues to exists, here subsequent mid-dialog requests can occur within this activity
  10. Client transaction activity started
  11. BYE ---> (Which should be sent via the javax.sip.Dialog.sendRequest method)
  12. <--- OK on client activity
  13. <--- javax.sip.dialog.Terminated on dialog activity, <--- javax.sip.transaction.Terminated on clint activity

TIP 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

  1. Sbb attached to dialog ACI & client transaction ACI
  2. Client transaction & dialog activitiy started
  3. INVITE --->
  4. <--- 100-199 response without FromTag on client activity
  5. <--- OK(200) response on client activity with FromTag 1 ACK --->
  6. <--- javax.sip.dialog.SetupConfirmed on dialog activity
  7. <--- Here we can receive Transaction Terminated event - depends on stack impl, we could receive it before javax.sip.dialog.SetupConfirmed -> Client transaction activity ended
  8. Dialog activity continues to exists, here subsequent mid-dialog requests can occur within this activity
  9. Client transaction activity started
  10. BYE ---> (Which should be sent via the javax.sip.Dialog.sendRequest method)
  11. <--- OK on client activity
  12. <--- javax.sip.dialog.Terminated on dialog activity, <--- javax.sip.transaction.Terminated on clint activity

TIP 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 )

  1. <--- INVITE
  2. Sbb creates dialog, dialog ACI and attaches to it, now all subsequent request will be delivered to dialog ACI.
  3. ----> 100-199 response to request with ToTag -> ALERT! it has to be sent in order to make CANCEL valid request.
  4. <--- to dialog aci javax.sip.dialog.SetupEarly
  5. <--- CANCEL ALERT! on server activity despite dialog activity exists
  6. ---> OK
  7. <--- 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 )

  1. <--- INVITE
  2. Sbb creates dialog, dialog ACI and attaches to it, now all subsequent request will be delivered to dialog ACI.
  3. ----> 100-199 response to request without ToTag -> ALERT! it has to be sent in order to make CANCEL valid request.
  4. <--- CANCEL ALERT! on server activity despite dialog activity exists
  5. ---> OK
  6. <--- 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

  1. Sbb creates INVITE, client aci, dialog aci and attaches to them.
  2. ---> INVITE
  3. <--- 100-199 response with ToTag ALERT! it has to be received in order to make CANCEL request valid.
  4. <--- javax.sip.dialog.SetupEarly on dialog aci
  5. Sbb creates CANCEL request, client aci for it and attaches to it
  6. ---> CANCEL
  7. <--- OK
  8. <--- 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

  1. Sbb creates INVITE, client aci, dialog aci and attaches to them.
  2. ---> INVITE
  3. <--- 100-199 response without ToTag ALERT! it has to be received in order to make CANCEL request valid.
  4. Sbb creates CANCEL request, client aci for it and attaches to it
  5. ---> CANCEL
  6. <--- OK
  7. <--- 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.
  1. <--- INVITE
  2. create dialog aci and attach to it ( TIP if we dont attach, javax.sip.dialog.SetupTimedOut event wont be fired, this is only differenc )
  3. ---> 100-199 response ( TIP 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 )
  4. no activity
  5. <--- 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
  6. <--- javax.sip.dialog.DialogTerminated ( TIP depends on stack - if state was different than pseudo state null it should always be fired, otherwise its stack decision)

Terminating dialog with BYE

  1. Sbb attached to dialog ACI & client transaction ACI
  2. Client transaction & dialog activitiy started
  3. INVITE --->
  4. <--- 100-199 response with FromTag on client activity
  5. <--- javax.sip.dialog.SetupEarly on dialog activity
  6. <--- OK(200) response on client activity 1 ACK --->
  7. <--- javax.sip.dialog.SetupConfirmed on dialog activity
  8. <--- Here we can receive Transaction Terminated event - depends on stack impl, we could receive it before javax.sip.dialog.SetupConfirmed -> Client transaction activity ended
  9. Dialog activity continues to exists, here subsequent mid-dialog requests can occur within this activity
  10. Client transaction activity started
  11. <--- 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)
  12. ---> OK
  13. <--- 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

Topic DialogEventsScenarios . { Edit | Ref-By | Printable | Diffs r4 < r3 < r2 < r1 | More }
 XML java.net RSS

Revision r4 - 03 Sep 2006 - 20:28:15 - Main.baranowb
Parents: WebHome > MobicentsOpenSLEE > MobicentsSIPRA