Jump to content

Re-using Device/User/Callflow/ect IDs


Rick Guyton

Recommended Posts

I've got a client that purchased a whole bunch of companies and brought into our phone system. They are now divesting of a bunch of them and so we are having to move these phones/users/VMs/callflows into their own separate account. I'm thinking about simply GETing the JSON objects our of the source account and POSTing them into the new account. Does anyone know if I can simply keep the existing IDs? It'd hugely de-complicate this if I can keep the IDs.

Link to comment
Share on other sites

I did this when moving some customers from another Kazoo server to our cluster. Or I didn't use GET and POST, but https://github.com/2600hz/couchdb-dump-php to dump the database to JSON files instead (including attachments like sound files etc).

However I found that it would be rather much work to use the old ID's, so i did a search and replace in the JSON files instead (created the new account first, then replaced the old IDs in the JSON files to the new ID).

I also remember that it seems to be a bug in the couch-dump-php that exports '{}' as '[]' instead, so it wasn't straight forward at all!
I highly recommend to consider a manual move instead.

Or, maybe keep them as it is... Why do yo really need to split them? Do you want to separate the call charges? Otherwise it isn't a big problem running multiple companies inside the same account, we do that with a few...

Link to comment
Share on other sites

The customer specifically requested they be split. So.. yea, can't do that. Wish I could.

 

So, update, the APIs will at least allow me to upload a device with it's ID included. I 1/2 expected it to kick that back. I'm feeling pretty confident now. I'll be deleting the old devices from the old account shortly and the devices seem to be coming online ok...

 

EDIT:

So, basically, I had a three questions here...

 

Q1: Will Kazoo allow you to use an ID from one account and PUT it into another?

A1: Yes, it allows this.

Q2: Even on the same cluster??

A2: Yup.

Q3: Will the fact that there's is an  identicalobject with an identical ID in another account cause any call routing issues. Obviously, it's not best to keep objects in both accounts long term. But, there is some benefit to being able to fall back to the old account if needed.

A3: No, devices/callflows/ect seem to work fine even with an identical object with an identical ID in a different account.

Edited by Rick Guyton (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...