Merge branch 'master' of https://github.com/danog/MadelineProto
This commit is contained in:
commit
47f60e77b9
@ -88,17 +88,17 @@ trait AuthKeyHandler
|
||||
|
||||
$this->calls[$params['id']] = ['status' => self::READY, 'key' => $key, 'admin' => true, 'user_id' => $params['participant_id'], 'InputPhoneCall' => ['id' => $params['id'], 'access_hash' => $params['access_hash'], '_' => 'inputPhoneCall'], 'in_seq_no_x' => 0, 'out_seq_no_x' => 1, 'layer' => $this->settings['tl_schema']['layer'], 'updated' => time(), 'incoming' => [], 'outgoing' => [], 'created' => time(), 'protocol' => $params['protocol'], 'callbacks' => $this->calls[$params['id']]['callbacks']];
|
||||
$this->calls[$params['id']]['controller'] = new \danog\MadelineProto\VoIP($this->calls[$params['id']]['callbacks']['set_state'], $this->calls[$params['id']]['callbacks']['incoming'], $this->calls[$params['id']]['callbacks']['outgoing'], $this, $this->calls[$params['id']]['InputPhoneCall']);
|
||||
var_dump("key");
|
||||
var_dump('key');
|
||||
$this->calls[$params['id']]['controller']->setEncryptionKey($key['auth_key'], true);
|
||||
var_dump("network");
|
||||
var_dump('network');
|
||||
$this->calls[$params['id']]['controller']->setNetworkType($this->settings['calls']['network_type']);
|
||||
var_dump("config");
|
||||
var_dump('config');
|
||||
$this->calls[$params['id']]['controller']->setConfig($this->config['call_receive_timeout_ms'] / 1000, $this->config['call_connect_timeout_ms'] / 1000, true, true, true, $this->settings['calls']['log_file_path'], $this->settings['calls']['stats_dump_file_path']);
|
||||
var_dump("shared config");
|
||||
var_dump('shared config');
|
||||
$this->calls[$params['id']]['controller']->setSharedConfig($this->method_call('phone.getCallConfig', [], ['datacenter' => $this->datacenter->curdc]));
|
||||
var_dump("endpoints");
|
||||
var_dump('endpoints');
|
||||
$this->calls[$params['id']]['controller']->setRemoteEndpoints(array_merge([$res['connection']], $res['alternative_connections']), $this->settings['calls']['allow_p2p']);
|
||||
var_dump("start");
|
||||
var_dump('start');
|
||||
$this->calls[$params['id']]['controller']->start();
|
||||
|
||||
$this->handle_pending_updates();
|
||||
@ -136,7 +136,6 @@ var_dump("start");
|
||||
$this->calls[$params['id']]['controller']->setSharedConfig($this->method_call('phone.getCallConfig', [], ['datacenter' => $this->datacenter->curdc]));
|
||||
$this->calls[$params['id']]['controller']->setRemoteEndpoints(array_merge([$params['connection']], $params['alternative_connections']), $this->settings['calls']['allow_p2p']);
|
||||
$this->calls[$params['id']]['controller']->start();
|
||||
|
||||
}
|
||||
|
||||
public function call_status($id)
|
||||
|
@ -70,7 +70,6 @@ if ($MadelineProto === false) {
|
||||
}
|
||||
$message = (getenv('TRAVIS_COMMIT') == '') ? 'I iz works always (io laborare sembre) (yo lavorar siempre) (mi labori ĉiam) (я всегда работать) (Ik werkuh altijd) (Ngimbonga ngaso sonke isikhathi ukusebenza)' : ('Travis ci tests in progress: commit '.getenv('TRAVIS_COMMIT').', job '.getenv('TRAVIS_JOB_NUMBER').', PHP version: '.getenv('TRAVIS_PHP_VERSION'));
|
||||
|
||||
|
||||
echo 'Serializing MadelineProto to session.madeline...'.PHP_EOL; echo 'Wrote
|
||||
'.\danog\MadelineProto\Serialization::serialize('session.madeline', $MadelineProto).' bytes'.PHP_EOL;
|
||||
|
||||
@ -80,10 +79,10 @@ var_dump($id = $MadelineProto->request_call('@danogentili', [
|
||||
},
|
||||
'incoming' => [
|
||||
'start' => function ($call) {
|
||||
var_dump("PLEASE START RECEIVING DATA");
|
||||
var_dump('PLEASE START RECEIVING DATA');
|
||||
},
|
||||
'stop' => function ($call) {
|
||||
var_dump("PLEASE STOP RECEIVING DATA");
|
||||
var_dump('PLEASE STOP RECEIVING DATA');
|
||||
},
|
||||
'configure' => function ($call, $sampleRate, $bitsPerSample, $channels) {
|
||||
var_dump("incoming sampleRate: $sampleRate, bitsPerSample: $bitsPerSample, channels: $channels");
|
||||
@ -91,17 +90,17 @@ var_dump($id = $MadelineProto->request_call('@danogentili', [
|
||||
],
|
||||
'outgoing' => [
|
||||
'start' => function ($call) {
|
||||
var_dump("PLEASE START SENDING DATA");
|
||||
var_dump('PLEASE START SENDING DATA');
|
||||
},
|
||||
'stop' => function ($call) {
|
||||
var_dump("PLEASE STOP SENDING DATA");
|
||||
var_dump('PLEASE STOP SENDING DATA');
|
||||
},
|
||||
'configure' => function ($call, $sampleRate, $bitsPerSample, $channels) {
|
||||
var_dump("outgoing sampleRate: $sampleRate, bitsPerSample: $bitsPerSample, channels: $channels");
|
||||
},
|
||||
'get_level' => function ($call) {
|
||||
return 1;
|
||||
}
|
||||
},
|
||||
|
||||
],
|
||||
]));
|
||||
|
Loading…
Reference in New Issue
Block a user