JSLEE Discussions
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Events routing ...
Forum Index » Rhino SLEE Discussions
Author Message
meditel@gmail.com


Joined: 26/06/2008 01:12:31
Messages: 15
Offline

Hi, i have an SBB 'A' that handls the Event 'X' and the Event 'Y'. And
an SBB 'B' that handls only the Event 'X'.
The priority of 'A' is higher than the priority of 'B'.
So 'A' will be the first informed by the Slee for a fired Event 'X'.
My question is if i have in the code of 'A' this :

onEventX()
{
//do some treatments that fires the event 'Y'

}

onEventY()
{
//here i want to decide to make the SBB 'B' ignore or not the Event
'X'

}

Is this feasible ? and how ?
I will appreciate a solution without touching the code of SBB 'B' like
some how 'A' will tell the slee to do not deliver the event 'X' to 'B'

Best Regards
Atif
[Email]
stevena


Joined: 27/03/2008 13:43:16
Messages: 274
Location: Cambridge, UK
Offline

Hi Atif,

No this is not feasible, for two reasons:
1. Event X will be delivered to an instance of SBB B before event Y is delivered to the instance of SBB A (assuming event Y is fired on the same activity as event X was delivered to SBB A)
2. An SBB entity cannot ask the SLEE to suppress delivery of an event to another SBB entity. An SBB can only decide for itself what events it wants to receive or fliter via its event mask.

Regards,
Steve

Steven Adams
Senior Software Engineer
OpenCloud
stevena


Joined: 27/03/2008 13:43:16
Messages: 274
Location: Cambridge, UK
Offline

Just to add, if you are wanting to communicate between SBBs, the SBB local interface is the way to do it.

For example, if SBB B is a child of SBB A, you could do something like this:
1. SBB A receives event X
2. SBB A creates an instance of SBB B, and attaches it to the activity.
3. SBB A invokes a local interface method on SBB B in which SBB B masks receipt of event X, therefore suppressing receipt of the event.

Another local interface method could be used to ask SBB B to unmask the event so it could be received again in future.

Unfortunately it's not clear from your message whether SBBs A and B are in the same of different services. I also don't understand what you're trying to achieve by firing event Y rather than just deciding whether or not SBB B should receive event X in the event X event handler method of SBB A. If you provide some more detail perhaps I could help more.

Steven Adams
Senior Software Engineer
OpenCloud
meditel@gmail.com


Joined: 26/06/2008 01:12:31
Messages: 15
Offline

Hi Steven,
What i want to do is to charge the Presence Service using Sh+Rf interfaces ... then using Sh+Ro interfaces ... now i'll talk only about Sh+Rf ...

I have MySBB witch handls SUBSCRIBE, UDA

Here's the Scenario :

1-UA sends SUBSCRIBE to the AS

2-MySBB looks if the UA is authorized to use the presence service by sending an UDR to the HSS simulator like this:


3-MySBB receives an UDA response :


---------------------------------
What i have done is the make the presence service as a child of MySBB, and i'm using a local interface method called childMethod ... and all works fine
But i think your idea is better (using mask) but i didnt try it ...

Regards
Atif
[Email]
stevena


Joined: 27/03/2008 13:43:16
Messages: 274
Location: Cambridge, UK
Offline

Ok I understand now what you're trying to do. In this case, event masking won't help you. Instead, you need to use the Event Context to suspend processing of the SUBSCRIBE event while doing the charging request.

For example:


The reason why this works is that the UDR/UDA occurs on a different activity to the SUBSCRIBE event, so your SBB can process the charging response while the SIP transaction activity is suspended. Your SBB makes a decision what more to do with the SUBSCRIBE event after it has received the charging response.

Hope this helps.

Steven Adams
Senior Software Engineer
OpenCloud
meditel@gmail.com


Joined: 26/06/2008 01:12:31
Messages: 15
Offline

Yes Steven, this will do exactly what i want and without changing the Presence Service Code : )

One other thing about onSUBSCRIBE(..., EventContext eventContext) ... what i have is onSubscribeEvent(RequestEvent event, ActivityContextInterface aci)
so that i can do this :


I'll use the uri with the UDR request to see if the user is authorized to use the service or not ...

But i don't see how to do this if i use the EventContext ...

Regards
Atif
[Email]
davidf


Joined: 30/01/2008 17:59:09
Messages: 492
Location: Wellington, New Zealand
Offline

EventContext has:

public void Object getEvent();

So you can use that to get the SIP message .. then type cast it ... and go ahead using it as per normal.

Just remember to resume the Event Context when you are done with it in all cases !

David Ferry
Lead Architect VoLTE TAS
Metaswitch
stevena


Joined: 27/03/2008 13:43:16
Messages: 274
Location: Cambridge, UK
Offline

davidf wrote:Just remember to resume the Event Context when you are done with it in all cases !


Opps, yes, the previous code should have looked like this:


Steven Adams
Senior Software Engineer
OpenCloud
meditel@gmail.com


Joined: 26/06/2008 01:12:31
Messages: 15
Offline

Should i deactivate the Presence service before ?
[Email]
bsd

[Avatar]

Joined: 22/03/2008 00:37:15
Messages: 355
Location: Cambridge, UK
Offline

With the suggested design, the Presence SBB is a child SBB of your new Service and not a service itself. Having said that, if you have another presence service activated, then you should deactivate it.

Bruno Duarte
Technical Consultant
OpenCloud
[Email] [WWW]
kzz


Joined: 16/09/2008 00:01:56
Messages: 35
Offline

Hi all,

can anybody please tell me how an event can be passed from the root Sbb to the child sbb? I am using the OnInitialDP method ( CAP) in the root and the event the root receives has to be processed by the child. How do i do it without having a local interface method in child that takes an event type argument??
davidf


Joined: 30/01/2008 17:59:09
Messages: 492
Location: Wellington, New Zealand
Offline

If you want to do it without a local interface being declared on the child SBB ... you can do it such that the parent attaches the child when it (the parent) receives the IDP.

The SLEE does a priority delivery within an SBB entity tree heirarchy, so if two SBBs are of "equal" priority .. and both want to receive an event of type X, the SBB entity higher in the tree gets it first.

This was done so a parent can do something like:

1) receive an event
2) create a child SBB and attach it to the ACI that the event is being delivered on, then return

and the SLEE will then invoke

3) pass the event to the next interested SBB entity (the child)

David Ferry
Lead Architect VoLTE TAS
Metaswitch
kzz


Joined: 16/09/2008 00:01:56
Messages: 35
Offline

hi! Thanks for your reply.
I'm now doing it as follows..
public void onInitialDPInd(com.opencloud.slee.resources.incc.operation.InitialDPInd event, ActivityContextInterface aci) {

ChildSbbLocalObject obj= (ChildSbbLocalObject) getChildSbb().create();
aci.attach(obj);
}

Have i understood you right? Will this help in getting the event processed by the child?
Should i also have onInitialDP method in child SBB? how will i receive the event in the child... and how to revert to the root Sbb from the child? Please let me know?

Thanks and regards,
Kzz
meditel@gmail.com


Joined: 26/06/2008 01:12:31
Messages: 15
Offline

Hi, i think you should do this as follow


Should i also have onInitialDP method in child SBB

Yes, so that the Child can handles this event

Regads
Atif
[Email]
bsd

[Avatar]

Joined: 22/03/2008 00:37:15
Messages: 355
Location: Cambridge, UK
Offline

Thanks for the help Atif.

Kzz, you should also add the event definition of the IDP to the child SBB descriptor to tell the SLEE that the SBB wants to receive that event.

To do a callback from the child to the parent, store the SbbLocalObject of the parent in the child (eg, immediately after you create the child).

Bruno Duarte
Technical Consultant
OpenCloud
[Email] [WWW]
 
Forum Index » Rhino SLEE Discussions
Go to:   
Powered by JForum 2.1.8 © JForum Team