$providers = CRM_Core_PseudoConstant::getConstants('CRM_Core_BAO_IMProvider', 'provider_id');
$providerName = CRM_Core_PseudoConstant::getLabel('CRM_Core_BAO_IMProvider', $providerId);
$isEnabled = CRM_Core_BAO_IMProvider::isEnabled($providerId);This will return a boolean value indicating whether the instant messaging provider associated with the given provider ID is enabled. Overall, the CRM_Core_PseudoConstant IMProvider is a useful tool for managing instant messaging providers within a CiviCRM installation. Its functions make it easy to retrieve information about available instant messaging providers and determine their status.