MadelineProtoDocs/docs/requestCall.md

35 lines
1010 B
Markdown
Raw Normal View History

2018-04-01 13:19:25 +02:00
---
2020-01-05 17:55:38 +01:00
title: requestCall
description: requestCall parameters, return type and example
redirect_from: /requestCall.html
2018-04-01 13:19:25 +02:00
---
2020-01-05 17:55:38 +01:00
## Method: requestCall
2018-04-01 13:19:25 +02:00
### Parameters:
| Name | Type |
|----------|---------------|
|id| A username, a bot API chat id, a tg-cli chat id, a [User](API_docs/types/User.md), an [InputPeer](API_docs/types/InputPeer.md), an [InputUser](API_docs/types/InputUser.md), a [Peer](API_docs/types/Peer.md)|
### Return type: [\danog\MadelineProto\VoIP object](https://docs.madelineproto.xyz/API_docs/types/PhoneCall.html)
Returns the call
### Example:
```php
2019-06-01 17:42:45 +02:00
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
2018-04-01 13:19:25 +02:00
$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');
}
2019-10-29 22:23:35 +01:00
$call = $MadelineProto->requestCall('@danogentili');
2018-04-01 13:19:25 +02:00
$call->play('input.raw')->then('input.raw')->playOnHold(['input.raw'])->setOutputFile('output.raw');
```