public static function SendMessageToChat($userId, $phoneNumber, $incomingType, $message) { $ViMain = new CVoxImplantMain($userId); $dialogInfo = $ViMain->GetDialogInfo($phoneNumber, "", false); $ViMain->SendChatMessage($dialogInfo['DIALOG_ID'], $incomingType, $message); return true; }