USE provisioning;
SET autocommit=0;


SELECT id INTO @vpid FROM voip_preferences
    WHERE attribute = 'outbound_from_user';

DELETE FROM voip_preferences_enum
    WHERE preference_id=@vpid and value = 'pbx_extension';


SELECT id INTO @vpid FROM voip_preferences
    WHERE attribute = 'outbound_from_display';

DELETE FROM voip_preferences_enum
    WHERE preference_id=@vpid and value = 'pbx_extension';

DELETE FROM voip_preferences_enum
    WHERE preference_id=@vpid and value = 'pbx_extension/np_display';


COMMIT;
