Thanks for your question Jake, and thanks Nagu for helping out! Apologies for 
the delay in getting back to you.

There are a few different datastores that clearwater uses:

  *   Ellis stores which numbers are available for use, and which ones have 
been given out to a user, in its MySQL database.
  *   When a number is given out to a user, it is configured in homestead-prov, 
which stores it in the Cassandra database.
  *   When a phone registers, this gets stored in the memcached database used 
by homestead and sprout.


It’s this last bullet that you care about. The easiest way to get the 
information is to query homestead’s REST API for the subscriber’s registration 
data. You can do this by using cURL to do a GET to the resource defined here: 
https://github.com/Metaswitch/homestead/blob/release-130/docs/homestead_api.md#impu---persistent-registration-state.
 I’ve not tried running this command, but something like this should do the 
trick:

    curl http://<IP >:8888/impu/<IMPU>/reg-data

<IP> is the IP address of your dime node. Note that 127.0.0.1/localhost will 
not work (even if you are on the dime node).
<IMPU> is the SIP URI of the subscriber you are interested in. You have to URL 
escape this. Eg. instead of sip:[email protected] you would use 
sip%3A123456789%40example.com

Hope this helps,
Alex.

From: Clearwater [mailto:[email protected]] On 
Behalf Of Nagendra Kumar
Sent: 08 April 2018 14:53
To: 
[email protected]<mailto:[email protected]>;
 DCC LLC - Jake Brown
Subject: Re: [Project Clearwater] check registered state of user

Hi Jake,
I am not sure about any other ways of checking registration status.

@Experts ??

Thanks
-Nagu


On Sunday, 8 April, 2018, 6:53:10 PM IST, Jake Brown 
<[email protected]<mailto:[email protected]>> wrote:


Nagu,

Would this mean that the only way to check registration status would be to use 
a Ellis node. Currently we don't use one due to the lacking of browser support 
to modify the call forwarding features.

Thanks

Jake



Sent via the Samsung Galaxy S8+, an AT&T 4G LTE smartphone


-------- Original message --------
From: Nagendra Kumar <[email protected]<mailto:[email protected]>>
Date: 4/8/18 4:44 AM (GMT-06:00)
To: 
[email protected]<mailto:[email protected]>,
 Jake Brown <[email protected]<mailto:[email protected]>>
Subject: Re: [Project Clearwater] check registered state of user

Hi Jake,
You can also check the registered user at ellis :

sudo mysql
use ellis;
SELECT * FROM numbers ;

You can also check the data bases using the command: SHOW DATABASES;
You can check selective users by command: SELECT * FROM numbers WHERE number = 
'sip:[email protected]';

Thanks
-Nagu



On Friday, 6 April, 2018, 7:32:54 PM IST, Jake Brown 
<[email protected]<mailto:[email protected]>> wrote:



I must have something wrong in the shared_config. I would expect to see 
something in vellum in the homestead_cache/impu table that indicates registered 
in the is_registered column. Is this not the correct place to check to see if a 
subscriber is registered? Thank you for your guidance.



Jake
_______________________________________________
Clearwater mailing list
[email protected]<mailto:[email protected]>
http://lists.projectclearwater.org/mailman/listinfo/clearwater_lists.projectclearwater.org
_______________________________________________
Clearwater mailing list
[email protected]
http://lists.projectclearwater.org/mailman/listinfo/clearwater_lists.projectclearwater.org

Reply via email to