Skip to main content

CMP-Fields

8 replies [Last post]
Anonymous

Hi,
I’m doing an example that stores a long variable in a cmp field.
I’m storing it on a method that receives an Invite, by doing setTime(long aux). In this same method if I access this value (getTime) it gives me the correct one.
But if I access that field in another method, for example when I receive a bye event, it gives me zero.
How do I get the initial value? Because, it’s creating another instance of the sbb to treat the new event and I don’t have relation between the first value stored.

BR
Marco

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
atif_ma
Offline
Joined: 2008-07-29
Points: 0

Hi mmonteiro, can i have the exact link to your example please ..

Regards
Atif

Anonymous

Hi,
It's been a long time since I've done this :)
http://wiki.java.net/bin/view/Communications/MobicentsHowToMeasureSIPCal...

Hope this helps,
Marco

mranga
Offline
Joined: 2003-06-06
Points: 0

Hi Marco,

You may want to set up your custom convergence name method to return the dialog ID of the Invite. The BYE will go to the same dialog and hence it will wind up invoking the same sbb instance. The CMP fields will thus be preserved. When you have this worked out, please post a small code snippet ( with deployment descriptors ) to mobicents best practices.

Ranga.

Anonymous

Hi all,
I've managed to get the value of the cmp field. (Thanks Ranga :-)
I'll post this to mobicents best practices next week.

BR,
Marco

Anonymous

Hi,
Done, it's in the mobicents best practices;

http://wiki.java.net/bin/view/Communications/MobicentsBestPractices#A_si...

If there's anything wrong just say it. Feedback is appreciated :-)

Regards,
Marco

ivelin
Offline
Joined: 2003-07-13
Points: 0

Marco,

Incredibly useful example. Good writing style too. Can you include a link to a ZIP file with the DU binary and source code. What would be the best way to do this; Attach in the files&documents section or a CVS sub-project?

Ivelin

Anonymous

Hi,
This new code is appended in the examples of Open Cloud that cam with mobicents.

Marco

nijie8
Offline
Joined: 2005-06-09
Points: 0

it seems very good. but only thing i wonder is that the SBB entity has already been removed when bye event comes. Because all activities it atached go to end. i look at source code and found activityend event will be fired when siptransaction complete.