Try this:
#@Description “Voice VLAN name”
if (!$match($EVENT.NAME,DEVICE-DETECT)) && if (!$match($EVENT.DEVICE_MANUFACTURER_NAME,MITEL)) then
set var voicevlan XXXX
create log entry ***Starting_LLDP_Config***
#Link Layer Discovery Protocol-Media Endpoint Discover
create log entry ***Config_LLDP_Parameters***
configure lldp port $EVENT.USER_PORT advertise vendor-specific med capabilities
configure lldp port $EVENT.USER_PORT advertise vendor-specific dot1 vlan-name vlan $voicevlan
configure lldp port $EVENT.USER_PORT advertise vendor-specific med policy application voice vlan $voicevlan dscp 46
create log entry ***Completed_LLDP_Parameters***
endif
.
Assuming the variable is, indeed, MITEL. You should check that.