SET AUTOCOMMIT=0;

USE provisioning;

SELECT id INTO @pgid FROM voip_preference_groups WHERE name = 'Number Manipulations';

INSERT INTO voip_preferences
    (voip_preference_groups_id, attribute, label, type, max_occur,
     usr_pref, prof_pref, dom_pref, peer_pref, contract_pref, contract_location_pref,
     modify_timestamp, internal, expose_to_customer, data_type, read_only,
     description)
    VALUES
    (@pgid, 'skip_upn_check_on_diversion', 'Skip UPN check on Diversion', 1, 1,
     1, 0, 1, 0, 0, 0,
     now(), 0, 0, 'boolean', 0,
     'If set, the UPN of the calling party is not checked against the allowed CLIs provisioned for this subscriber if a Diversion or History-Info header is provided in an incoming call. This can be used to allow diversion on the subscriber device and transporting the originally calling party number on the second leg. Use with caution as it might allow for number spoofing.');

COMMIT;
