PHP Класс PAGI\Client\AbstractClient

PHP Version 5
Автор: Marcelo Gornstein ([email protected])
Наследование: implements PAGI\Client\IClient
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$arguments string[] Initial arguments given by the user in the dialplan.
$cdrInstance
$channelVariablesInstance
$clidInstance
$logger Logger PSR-3 logger.
$variables string[] Initial channel variables given by asterisk at start.

Открытые методы

Метод Описание
amd ( $options = [] ) (non-PHPdoc)
answer ( ) (non-PHPdoc)
channelStatus ( $channel = '' ) (non-PHPdoc)
consoleLog ( $msg, $level = 1 ) (non-PHPdoc)
createNode ( $name ) (non-PHPdoc)
createNodeController ( $name ) (non-PHPdoc)
databaseDel ( $family, $key ) (non-PHPdoc)
databaseDeltree ( $family, $key = false ) (non-PHPdoc)
databaseGet ( $family, $key ) (non-PHPdoc)
databasePut ( $family, $key, $value ) (non-PHPdoc)
dial ( $channel, array $options = [] ) (non-PHPdoc)
exec ( $application, array $options = [] ) (non-PHPdoc)
faxReceive ( $tiffFile ) (non-PHPdoc)
faxSend ( $tiffFile ) (non-PHPdoc)
getAsteriskLogger ( ) (non-PHPdoc)
getCDR ( ) (non-PHPdoc)
getCallerId ( ) (non-PHPdoc)
getChannelVariables ( ) (non-PHPdoc)
getData ( $file, $maxTime, $maxDigits ) (non-PHPdoc)
getFullVariable ( $name, $channel = false ) (non-PHPdoc)
getOption ( $file, $escapeDigits, $maxTime ) (non-PHPdoc)
getVariable ( $name ) (non-PHPdoc)
hangup ( $channel = false ) (non-PHPdoc)
indicateBusy ( $timeout ) (non-PHPdoc)
indicateCongestion ( $timeout ) (non-PHPdoc)
indicateProgress ( ) (non-PHPdoc)
log ( $msg, $priority = 'NOTICE' ) (non-PHPdoc)
playBusyTone ( ) (non-PHPdoc)
playCongestionTone ( ) (non-PHPdoc)
playCustomTones ( array $frequencies ) (non-PHPdoc)
playDialTone ( ) (non-PHPdoc)
playTone ( $tone ) (non-PHPdoc)
record ( $file, $format, $escapeDigits, $maxRecordTime, $silence = false ) (non-PHPdoc)
sayAlpha ( $what, $escapeDigits = '' ) (non-PHPdoc)
sayDate ( $time, $escapeDigits = '' ) (non-PHPdoc)
sayDateTime ( $time, $format, $escapeDigits = '' ) (non-PHPdoc)
sayDigits ( $digits, $escapeDigits = '' ) (non-PHPdoc)
sayNumber ( $digits, $escapeDigits = '' ) (non-PHPdoc)
sayPhonetic ( $what, $escapeDigits = '' ) (non-PHPdoc)
sayTime ( $time, $escapeDigits = '' ) (non-PHPdoc)
sendImage ( $filename ) (non-PHPdoc)
sendText ( $text ) (non-PHPdoc)
setAutoHangup ( $time ) (non-PHPdoc)
setCallerId ( $name, $number ) (non-PHPdoc)
setContext ( $context ) (non-PHPdoc)
setExtension ( $extension ) (non-PHPdoc)
setLogger ( Psr\Log\LoggerInterface $logger ) : void Sets the logger implementation.
setMusic ( $enable, $class = false ) (non-PHPdoc)
setPriority ( $priority ) (non-PHPdoc)
setVariable ( $name, $value ) (non-PHPdoc)
sipHeaderAdd ( $name, $value ) (non-PHPdoc)
sipHeaderRemove ( $name ) (non-PHPdoc)
stopPlayingTones ( ) (non-PHPdoc)
streamFile ( $file, $escapeDigits = '' ) (non-PHPdoc)
waitDigit ( $timeout ) (non-PHPdoc)

Защищенные методы

Метод Описание
close ( ) : void Closes the connection to agi.
getResultFromResultString ( unknown_type $text ) : Result Returns a result object given a string (the agi result after executing a command).
isEndOfEnvironmentVariables ( string $line ) : boolean Returns true if the current line marks the end of the environment variables.
open ( ) : void Opens connection to agi. Will also read initial channel variables given by asterisk when launching the agi.
readEnvironmentVariable ( string $line ) : void Will read and save an environment variable as either a variable or an argument.
send ( string $text ) : Result Sends a command to asterisk. Returns an array with: [0] => AGI Result (3 digits) [1] => Command result [2] => Result data.

Приватные методы

Метод Описание
playAndRead ( $cmd )

Описание методов

amd() публичный Метод

(non-PHPdoc)
public amd ( $options = [] )

answer() публичный Метод

(non-PHPdoc)
public answer ( )

channelStatus() публичный Метод

(non-PHPdoc)
public channelStatus ( $channel = '' )

close() абстрактный защищенный Метод

Closes the connection to agi.
abstract protected close ( ) : void
Результат void

consoleLog() публичный Метод

(non-PHPdoc)
public consoleLog ( $msg, $level = 1 )

createNode() публичный Метод

(non-PHPdoc)
См. также: IClient::createNode()
public createNode ( $name )

createNodeController() публичный Метод

(non-PHPdoc)
public createNodeController ( $name )

databaseDel() публичный Метод

(non-PHPdoc)
public databaseDel ( $family, $key )

databaseDeltree() публичный Метод

(non-PHPdoc)
public databaseDeltree ( $family, $key = false )

databaseGet() публичный Метод

(non-PHPdoc)
public databaseGet ( $family, $key )

databasePut() публичный Метод

(non-PHPdoc)
public databasePut ( $family, $key, $value )

dial() публичный Метод

(non-PHPdoc)
public dial ( $channel, array $options = [] )
$options array

exec() публичный Метод

(non-PHPdoc)
public exec ( $application, array $options = [] )
$options array

faxReceive() публичный Метод

(non-PHPdoc)
public faxReceive ( $tiffFile )

faxSend() публичный Метод

(non-PHPdoc)
public faxSend ( $tiffFile )

getAsteriskLogger() публичный Метод

(non-PHPdoc)
public getAsteriskLogger ( )

getCDR() публичный Метод

(non-PHPdoc)
public getCDR ( )

getCallerId() публичный Метод

(non-PHPdoc)
public getCallerId ( )

getChannelVariables() публичный Метод

(non-PHPdoc)
public getChannelVariables ( )

getData() публичный Метод

(non-PHPdoc)
public getData ( $file, $maxTime, $maxDigits )

getFullVariable() публичный Метод

(non-PHPdoc)
public getFullVariable ( $name, $channel = false )

getOption() публичный Метод

(non-PHPdoc)
public getOption ( $file, $escapeDigits, $maxTime )

getResultFromResultString() защищенный Метод

Returns a result object given a string (the agi result after executing a command).
protected getResultFromResultString ( unknown_type $text ) : Result
$text unknown_type
Результат PAGI\Client\Result\Result

getVariable() публичный Метод

(non-PHPdoc)
public getVariable ( $name )

hangup() публичный Метод

(non-PHPdoc)
public hangup ( $channel = false )

indicateBusy() публичный Метод

(non-PHPdoc)
См. также: IClient::indicateBusy()
public indicateBusy ( $timeout )

indicateCongestion() публичный Метод

(non-PHPdoc)
См. также: IClient::indicateCongestion()
public indicateCongestion ( $timeout )

indicateProgress() публичный Метод

(non-PHPdoc)
См. также: IClient::indicateProgress()
public indicateProgress ( )

isEndOfEnvironmentVariables() защищенный Метод

Returns true if the current line marks the end of the environment variables.
protected isEndOfEnvironmentVariables ( string $line ) : boolean
$line string
Результат boolean

log() публичный Метод

(non-PHPdoc)
public log ( $msg, $priority = 'NOTICE' )

open() абстрактный защищенный Метод

Opens connection to agi. Will also read initial channel variables given by asterisk when launching the agi.
abstract protected open ( ) : void
Результат void

playBusyTone() публичный Метод

(non-PHPdoc)
См. также: IClient::playBusyTone()
public playBusyTone ( )

playCongestionTone() публичный Метод

(non-PHPdoc)
См. также: IClient::playCongestionTone()
public playCongestionTone ( )

playCustomTones() публичный Метод

(non-PHPdoc)
См. также: IClient::playCustomTones()
public playCustomTones ( array $frequencies )
$frequencies array

playDialTone() публичный Метод

(non-PHPdoc)
См. также: IClient::playDialTone()
public playDialTone ( )

playTone() публичный Метод

(non-PHPdoc)
См. также: IClient::playTone()
public playTone ( $tone )

readEnvironmentVariable() защищенный Метод

Will read and save an environment variable as either a variable or an argument.
protected readEnvironmentVariable ( string $line ) : void
$line string
Результат void

record() публичный Метод

(non-PHPdoc)
public record ( $file, $format, $escapeDigits, $maxRecordTime, $silence = false )

sayAlpha() публичный Метод

(non-PHPdoc)
public sayAlpha ( $what, $escapeDigits = '' )

sayDate() публичный Метод

(non-PHPdoc)
public sayDate ( $time, $escapeDigits = '' )

sayDateTime() публичный Метод

(non-PHPdoc)
public sayDateTime ( $time, $format, $escapeDigits = '' )

sayDigits() публичный Метод

(non-PHPdoc)
public sayDigits ( $digits, $escapeDigits = '' )

sayNumber() публичный Метод

(non-PHPdoc)
public sayNumber ( $digits, $escapeDigits = '' )

sayPhonetic() публичный Метод

(non-PHPdoc)
public sayPhonetic ( $what, $escapeDigits = '' )

sayTime() публичный Метод

(non-PHPdoc)
public sayTime ( $time, $escapeDigits = '' )

send() абстрактный защищенный Метод

Sends a command to asterisk. Returns an array with: [0] => AGI Result (3 digits) [1] => Command result [2] => Result data.
abstract protected send ( string $text ) : Result
$text string Command
Результат PAGI\Client\Result\Result

sendImage() публичный Метод

(non-PHPdoc)
public sendImage ( $filename )

sendText() публичный Метод

(non-PHPdoc)
public sendText ( $text )

setAutoHangup() публичный Метод

(non-PHPdoc)
public setAutoHangup ( $time )

setCallerId() публичный Метод

(non-PHPdoc)
public setCallerId ( $name, $number )

setContext() публичный Метод

(non-PHPdoc)
public setContext ( $context )

setExtension() публичный Метод

(non-PHPdoc)
public setExtension ( $extension )

setLogger() публичный Метод

Sets the logger implementation.
public setLogger ( Psr\Log\LoggerInterface $logger ) : void
$logger Psr\Log\LoggerInterface The PSR3-Logger
Результат void

setMusic() публичный Метод

(non-PHPdoc)
public setMusic ( $enable, $class = false )

setPriority() публичный Метод

(non-PHPdoc)
public setPriority ( $priority )

setVariable() публичный Метод

(non-PHPdoc)
public setVariable ( $name, $value )

sipHeaderAdd() публичный Метод

(non-PHPdoc)
См. также: IClient::sipHeaderAdd()
public sipHeaderAdd ( $name, $value )

sipHeaderRemove() публичный Метод

(non-PHPdoc)
См. также: IClient::sipHeaderRemove()
public sipHeaderRemove ( $name )

stopPlayingTones() публичный Метод

(non-PHPdoc)
См. также: IClient::stopPlayingTones()
public stopPlayingTones ( )

streamFile() публичный Метод

(non-PHPdoc)
public streamFile ( $file, $escapeDigits = '' )

waitDigit() публичный Метод

(non-PHPdoc)
public waitDigit ( $timeout )

Описание свойств

$arguments защищенное свойство

Initial arguments given by the user in the dialplan.
protected string[] $arguments
Результат string[]

$cdrInstance защищенное свойство

protected $cdrInstance

$channelVariablesInstance защищенное свойство

protected $channelVariablesInstance

$clidInstance защищенное свойство

protected $clidInstance

$logger защищенное свойство

PSR-3 logger.
protected Logger $logger
Результат Logger

$variables защищенное свойство

Initial channel variables given by asterisk at start.
protected string[] $variables
Результат string[]