[Sony Xperia XZ1 Compact Questions & Answers] pbarrette:
The bits in the OEM partition that enable T-Mobile VoLTE are exactly this:

1]

/modem-config/408/modem.conf

file containing the text "tmobile_us_ims" to select the proper modem binary.

2]

/overlay/android-res-305.apk

which adds ~40 "T-Mobile IMS" and "T-Mobile US MMS VoWiFi" APN settings:

<apn carrier="T-Mobile IMS" apn="ims" mcc="310" mnc="260" type="ims" protocol="IPV6" roaming_protocol="IP" />
<apn carrier="T-Mobile IMS" apn="ims" mcc="310" mnc="160" type="ims" protocol="IPV6" roaming_protocol="IP" />
<apn carrier="T-Mobile IMS" apn="ims" mcc="310" mnc="200" type="ims" protocol="IPV6" roaming_protocol="IP" />
<apn carrier="T-Mobile IMS" apn="ims" mcc="310" mnc="210" type="ims" protocol="IPV6" roaming_protocol="IP" />
...... lots more .....
<apn carrier="T-Mobile US LTE Test" apn="fast.t-mobile.com" mmsc="http://mms.msg.eng.t-mobile.com/mms/wapenc" mcc="001" mnc="01" type="default,mms,supl,ut" protocol="IPV6" roaming_protocol="IP" />
<apn carrier="T-Mobile US MMS VoWiFi" apn="tmus" mmsc="http://mms.msg.eng.t-mobile.com/mms/wapenc" mcc="310" mnc="260" type="mms" protocol="IP" roaming_protocol="IP" bearer="18" />
<apn carrier="T-Mobile US MMS VoWiFi" apn="tmus" mmsc="http://mms.msg.eng.t-mobile.com/mms/wapenc" mcc="001" mnc="01" type="mms" protocol="IP" roaming_protocol="IP" bearer="18" />
<apn carrier="T-Mobile US MMS VoWiFi" apn="tmus" mmsc="http://mms.msg.eng.t-mobile.com/mms/wapenc" mcc="310" mnc="160" type="mms" protocol="IP" roaming_protocol="IP" bearer="18" />

3]

/overlay/com.sonymobile.customizationselector-res-305.apk

which associates "configuration config_id" to "408" for various "sim_config_id" values:

<configuration config_id="408">
<sim_config_id>S264.1</sim_config_id>
<sim_config_id>S264.2</sim_config_id>
<sim_config_id>S264.3</sim_config_id>
<sim_config_id>S264.4</sim_config_id>
<sim_config_id>S264.5</sim_config_id>
<sim_config_id>S264.6</sim_config_id>
<sim_config_id>S264.7</sim_config_id>
<sim_config_id>S264.8</sim_config_id>
<sim_config_id>S264.9</sim_config_id>
<sim_config_id>S264.10</sim_config_id>
<sim_config_id>S264.11</sim_config_id>
<sim_config_id>S264.12</sim_config_id>
<sim_config_id>S264.13</sim_config_id>
<sim_config_id>S264.14</sim_config_id>
<sim_config_id>S264.15</sim_config_id>
<sim_config_id>S264.16</sim_config_id>
<sim_config_id>S264.17</sim_config_id>
<sim_config_id>S264.18</sim_config_id>
<sim_config_id>S8663.1</sim_config_id>
</configuration>

4]

/overlay-306-408us/android-res.apk

which sets:

<bool name="config_enable_hos_apn_for_mms_type_vowifi">true</bool>
<bool name="config_feature_iwlan_enabled">true</bool>
<bool name="config_enable_volte_default_value">true</bool>

5]

/overlay-306-408us/com.android.carrierconfig-res.apk

which sets:

<boolean name="carrier_volte_available_bool" value="true" />
<boolean name="carrier_wfc_ims_available_bool" value="true" />
<boolean name="carrier_default_wfc_ims_enabled_bool" value="true" />
<boolean name="carrier_vt_available_bool" value="false" />
<int name="carrier_default_wfc_ims_mode_int" value="2" />
<int name="carrier_default_wfc_ims_roaming_mode_int" value="2" />
<boolean name="support_pause_ims_video_calls_bool" value="false" />

6]

/overlay-306-408us/com.android.phone-res.apk

which sets:

<bool name="enable_ss_over_ut_when_roaming">true</bool>
<bool name="enable_ss_over_ut_only_when_ims_registered">true</bool>
<bool name="enable_ss_over_ut_when_data_off">true</bool>
<bool name="enable_ut_interface_policy_manager">true</bool>

7]

/system-properties/408/config.prop

which sets:

persist.radio.calls.on.ims=1
persist.data.iwlan.enable=true

Note Item #1] This is used to select a modem "mbn" file that lives in the "system" SIN at

/etc/customization/modem/

and has a file name of

amss_fsg_lilac_tmobile_us_ims_tar.mbn

. So if the X Compact doesn't have a modem file with "tmobile_us_ims" in the name, it probably won't work. Interestingly, there is a "tmobile_us_ims" mbn file present on the XZ1 (full-size) and on the XZP.

Note Item #6] I'm not sure about exactly what these do, but ims is mentioned. IMS is the "IP Multimedia Subsystem" and is used as the framework for telephony over IP based data connections. That's essentially what VoLTE is: VOIP for mobile phones.

Also note that the OEM sin changes other values (12hr time display vs 24hr, LTE vs 4G icons, that NFC icon we can't disable, etc), but I've tried to limit it to what I reasonably expect are the items that enable VoLTE on T-Mobile.