Importing Follow-Me info

mdoupe

New Member
Mar 21, 2023
8
0
1
43
Hi all,

When I export an extension, the follow me is just a "follow_me_uuid", I assume for somewhere else in the db. Is there a way to import/export follow-me entries? I don't see anything in member documentation.
 

whut

Active Member
Dec 23, 2022
245
25
28
Not for follow me and the follow me destinations. That requires 2 more tables. You can import and export extensions/destinations for call forward, on busy, no answer, and not registered.
 

mdoupe

New Member
Mar 21, 2023
8
0
1
43
Following up on this, I think I am going to have to run some manual db queries for follow me. I've written a query to add a follow me and update the extension, but when I run it, the extension doesn't show up as "Enabled (1)" in the Follow Me app. If I click on the extension, and then click save (all of the info from the query is entered and correct already) it shows up correctly. Does anyone know what else I have to update in the db to have it display correctly?

WITH ins1 AS ( INSERT INTO v_follow_me(domain_uuid, follow_me_uuid, follow_me_enabled, follow_me_ignore_busy) VALUES ((select domain_uuid from v_domains where domain_name = 'ourdomain'), gen_random_uuid(), true, false) ON CONFLICT DO NOTHING RETURNING follow_me_uuid ) , ins2 AS ( INSERT INTO v_follow_me_destinations(domain_uuid, follow_me_uuid, follow_me_destination_uuid, follow_me_destination) VALUES((select domain_uuid from v_domains where domain_name = 'ourdomain'), (SELECT follow_me_uuid from ins1), gen_random_uuid(), '123456789') ) UPDATE v_extensions SET follow_me_uuid = (SELECT follow_me_uuid from ins1) WHERE extension = '3333';
 

whut

Active Member
Dec 23, 2022
245
25
28
The first item I see as an issue in your sql is the last line where you update extension 3333. Add a where clause of domain_uuid = . You do not want to update all extensions 3333