Link Search Menu Expand Document


Back to index

Author: Daniil Gentili

This update represents a VoIP Telegram call.


  • $callID: int Phone call ID
  • $outgoing: bool Whether the call is an outgoing call
  • $otherID: int ID of the other user in the call
  • $date: int When was the call created

Method list:


accept(): self

Accept call.

discard(\danog\MadelineProto\VoIP\DiscardReason $reason = \danog\MadelineProto\VoIP\DiscardReason::HANGUP, int<1, 5> $rating = NULL, string $comment = NULL): self

Discard call.


  • $reason: \danog\MadelineProto\VoIP\DiscardReason
  • $rating: int<1, 5> Call rating in stars
  • $comment: string Additional comment on call quality.

See also:

getVisualization(): ?list{string, string, string, string}

Get call emojis (will return null if the call is not inited yet).

play(\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream $file): self

Play file.


  • $file: \danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream

See also:

setOutput(\danog\MadelineProto\LocalFile|\Amp\ByteStream\WritableStream $file): self

Set output file or stream for incoming OPUS audio packets.

Will write an OGG OPUS stream to the specified file or stream.


  • $file: \danog\MadelineProto\LocalFile|\Amp\ByteStream\WritableStream

See also:

then(\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream $file): self

Play file.


  • $file: \danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream

See also:

skip(): self

When called, skips to the next file in the playlist.

stop(): self

Stops playing all files, clears the main and the hold playlist.

pause(): self

Pauses the currently playing file.

isPaused(): boolean

Whether the currently playing file is paused.

resume(): self

Resumes the currently playing file.

playOnHold(\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream ...$files): self

Files to play on hold.


  • ...$files: \danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream

See also:

getCurrent(): \danog\MadelineProto\RemoteUrl|\danog\MadelineProto\LocalFile|string|null

Get the file that is currently being played.

Will return a string with the object ID of the stream if we’re currently playing a stream, otherwise returns the related LocalFile or RemoteUrl.

See also:

getCallState(): \danog\MadelineProto\VoIP\CallState

Get call state.

See also:

Generated by danog/phpdoc