USE provisioning;
SET autocommit=0;

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

INSERT INTO voip_preferences_enum
(preference_id, label, value, usr_pref, prof_pref, dom_pref, peer_pref, contract_pref, contract_location_pref, dev_pref, devprof_pref, default_val)
VALUES (
    @vpid, 'intra-PBX extension or UPN',
    'pbx_extension',
    1, 0, 1, 1, 0, 0, 0, 0, NULL
);

COMMIT;