Skip to main content

A question about the second argument in onXXXEvent()

1 reply [Last post]
fantao
Offline
Joined: 2005-03-07

In a service logic, an INVITE request need to be handled, so an InviteEvent should be defined in sbb-jar.xml, and in the abstract sbb class, an onInviteEvent(RequestEvent event, ActivityContextInterface aci) method will be defined.
However, for JAIN SIP, a ClientTransaction or ServerTransaction is an Activity (defined in SIP RA), so we can get the activiy in two ways:
event.getServerTransaction()
or
(ServerTransaction)aci.getActivity()

what is the difference?
If the first is chosen, what's the argument aci used for?
Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
torosvi
Offline
Joined: 2005-07-20

For example, you might need to attach a Child SBB to the AC on which the XXXEvent was fired. (aci.attach(Child))

Regards,

Victor