SET AUTOCOMMIT=0;
USE provisioning;

SELECT id INTO @mode_id FROM voip_preferences WHERE attribute = 'dialogic_mode';
DELETE FROM voip_preferences_enum WHERE
	preference_id = @mode_id AND value = 'sipss7';

DELETE FROM voip_preferences WHERE attribute = 'dialogic_ss7_opc';
DELETE FROM voip_preferences WHERE attribute = 'dialogic_ss7_apc';
DELETE FROM voip_preferences WHERE attribute = 'dialogic_ss7_dpc';

COMMIT;
