MadelineProtoDocs/docs/requestCall.md
2020-01-05 17:55:38 +01:00

1010 B

title description redirect_from
requestCall requestCall parameters, return type and example /requestCall.html

Method: requestCall

Parameters:

Name Type
id A username, a bot API chat id, a tg-cli chat id, a User, an InputPeer, an InputUser, a Peer

Return type: \danog\MadelineProto\VoIP object

Returns the call

Example:

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();


if (!file_exists('input.raw')) {
    echo 'Downloading example song'.PHP_EOL;
    copy('https://github.com/danog/MadelineProto/raw/master/input.raw', 'input.raw');
}
$call = $MadelineProto->requestCall('@danogentili');
$call->play('input.raw')->then('input.raw')->playOnHold(['input.raw'])->setOutputFile('output.raw');