Re: [reSIProcate-users] Querying for a registered party?
On Mon, Aug 24, 2009 at 2:42 PM, Adam Roach
<adam@xxxxxxxxxxx> wrote:
You didn't quite answer Scott's question about whether you're using DUM or doing something else. I'll assume that you're using DUM.
Yes, you are right, I realised that a few moments after I sent the mail and planned to do a follow up. Sorry about that.
I am indeed using DUM.
Keep in mind that the SIP registration operation isn't simply registering a device -- it's associating a device with a user's Address of Record (AOR). The AOR is, in rough terms, the SIP address someone would put on their business card.
If you're using DUM and want to act as a registrar, you set up a ServerRegistrationHandler using setServerRegistrationHandler, and then add a RegistrationPersistenceManager with setRegistrationPersistenceManager.
But if you're using DUM and have registrations working, then you're already doing that. Dig through the example code you used, and find the setRegistrationPersistenceManager call.
Yes, I found the examples and worked out how that fitted together.
You need to keep a pointer to the RegistrationPersistenceManager you've created (probably an InMemoryRegistrationDatabase if you're following example code you found somewhere) for your application to query later.
And this is the point I missed. I forgot in the mix of things that I (the application) own the registrar, not the stack or the DUM. I can of course just query it. Doh.
Also take note that the InMemoryRegistrationDatabase is really more appropriate for testing and small-scale use. It's not designed for use in commercial-grade products. Among other things, it doesn't delete expired contacts for an AOR until the next time that AOR is accessed (the behavior is correct, but the memory remains in use).
Yes, I did notice that, (although I might not have if not for the warning comment at the top of the header). Thanks for the heads up!
P.S. The SIP/digital radio bridge application sounds really neat! If you have more information on your project, we'd love to hear about it.
To be honest I am not sure how much I am allowed to say about the project. I have put through a query and when given the all clear I will post some info. No-one has said I cant say anything, I am just covering my tosh. :)
Thank you for the reply, that is what I get for being too focused on one part of the application. :)
Cheers,
Stuart