• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/classes/general/vi_config.php
  • Класс: CVoxImplantConfig
  • Вызов: CVoxImplantConfig::GetMelody
static function GetMelody($name, $lang = 'EN', $fileId = 0)
{
	$fileId = intval($fileId);

	$result = '';
	if ($fileId > 0)
	{
		$res = CFile::GetFileArray($fileId);
		if ($res && $res['MODULE_ID'] == 'voximplant')
		{
			if (mb_substr($res['SRC'], 0, 4) == 'http' || mb_substr($res['SRC'], 0, 2) == '//')
			{
				$result = $res['SRC'];
			}
			else
			{
				$result = CVoxImplantHttp::GetServerAddress().$res['SRC'];
			}
		}
	}

	if ($result == '')
	{
		$default = CVoxImplantConfig::GetDefaultMelodies($lang);
		$result = isset($default[$name])? $default[$name]: '';
	}

	return $result;
}