PHP Класс PAGI\CallSpool\CallFile

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

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

Метод Описание
__construct ( DialDescriptor $dialDescriptor ) : void Constructor.
getAccount ( ) : string Returns account code to use for this call.
getAlwaysDelete ( ) : boolean If the file's modification time is in the future, the call file will not be deleted
getApplication ( ) : string Returns Asterisk Application to run (use instead of specifiying context, extension and priority)
getApplicationData ( ) : string Returns the options to be passed to application.
getArchive ( ) : boolean Sets if should move to subdir "outgoing_done" with "Status: value", where value can be Completed, Expired or Failed.
getCallerId ( ) : string Returns Caller ID, Please note: It may not work if you do not respect the format: CallerID: "Some Name" <1234>
getChannel ( ) : string Returns channel to use for the call.
getContext ( ) : string Returns context to use for this call when answered.
getExtension ( ) : string Returns extension to use for this call when answered.
getMaxRetries ( ) : integer Returns number of retries before failing (not including the initial attempt, e.g. 0 = total of 1 attempt to make the call). Default is 0.
getPriority ( ) : string Returns priority to use for this call when answered.
getRetryTime ( ) : integer Returns seconds between retries, Don't hammer an unavailable phone.
getVariable ( string $key ) : string Returns the value for the given variable.
getWaitTime ( ) : integer Returns seconds to wait for an answer. Default is 45.
serialize ( ) : string Returns the text describing this call file, ready to be spooled.
setAccount ( string $value ) : void Sets account code to use for this call.
setAlwaysDelete ( boolean $value ) : void If the file's modification time is in the future, the call file will not be deleted
setApplication ( string $value ) : void Sets Asterisk Application to run (use instead of specifiying context, extension and priority)
setApplicationData ( array $options = [] ) : void Sets the options to be passed to application.
setArchive ( boolean $value ) : void Sets if should move to subdir "outgoing_done" with "Status: value", where value can be Completed, Expired or Failed.
setCallerId ( string $value ) : void Sets the Caller ID, Please note: It may not work if you do not respect the format: CallerID: "Some Name" <1234>
setContext ( string $value ) : void Sets context to use for this call when answered.
setExtension ( string $value ) : void Sets extension to use for this call when answered.
setMaxRetries ( integer $value ) : void Sets number of retries before failing (not including the initial attempt, e.g. 0 = total of 1 attempt to make the call). Default is 0.
setPriority ( string $value ) : void Sets priority to use for this call when answered.
setRetryTime ( integer $value ) : void Sets seconds between retries, Don't hammer an unavailable phone.
setVariable ( string $key, string $value ) : void Sets a given variable with the given value.
setWaitTime ( integer $value ) : void Sets seconds to wait for an answer. Default is 45.
unserialize ( string $text ) : void Deconstructs a call file from the given text.

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

Метод Описание
getParameter ( string $key ) : string Returns the value for the given parameter.
setParameter ( string $key, string $value ) : void Sets a given parameter with the given value.

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

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

Constructor.
public __construct ( DialDescriptor $dialDescriptor ) : void
$dialDescriptor PAGI\DialDescriptor\DialDescriptor
Результат void

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

Returns account code to use for this call.
public getAccount ( ) : string
Результат string

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

If the file's modification time is in the future, the call file will not be deleted
public getAlwaysDelete ( ) : boolean
Результат boolean

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

Returns Asterisk Application to run (use instead of specifiying context, extension and priority)
public getApplication ( ) : string
Результат string

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

Returns the options to be passed to application.
public getApplicationData ( ) : string
Результат string

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

Sets if should move to subdir "outgoing_done" with "Status: value", where value can be Completed, Expired or Failed.
public getArchive ( ) : boolean
Результат boolean

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

Returns Caller ID, Please note: It may not work if you do not respect the format: CallerID: "Some Name" <1234>
public getCallerId ( ) : string
Результат string

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

Returns channel to use for the call.
public getChannel ( ) : string
Результат string

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

Returns context to use for this call when answered.
public getContext ( ) : string
Результат string

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

Returns extension to use for this call when answered.
public getExtension ( ) : string
Результат string

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

Returns number of retries before failing (not including the initial attempt, e.g. 0 = total of 1 attempt to make the call). Default is 0.
public getMaxRetries ( ) : integer
Результат integer

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

Returns the value for the given parameter.
protected getParameter ( string $key ) : string
$key string Parameter name.
Результат string

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

Returns priority to use for this call when answered.
public getPriority ( ) : string
Результат string

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

Default is 300 (5 min).
public getRetryTime ( ) : integer
Результат integer

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

Returns the value for the given variable.
public getVariable ( string $key ) : string
$key string Variable name.
Результат string

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

Returns seconds to wait for an answer. Default is 45.
public getWaitTime ( ) : integer
Результат integer

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

Returns the text describing this call file, ready to be spooled.
public serialize ( ) : string
Результат string

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

Sets account code to use for this call.
public setAccount ( string $value ) : void
$value string Value to set.
Результат void

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

If the file's modification time is in the future, the call file will not be deleted
public setAlwaysDelete ( boolean $value ) : void
$value boolean Value to set.
Результат void

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

Sets Asterisk Application to run (use instead of specifiying context, extension and priority)
public setApplication ( string $value ) : void
$value string Value to set.
Результат void

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

Sets the options to be passed to application.
public setApplicationData ( array $options = [] ) : void
$options array
Результат void

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

Sets if should move to subdir "outgoing_done" with "Status: value", where value can be Completed, Expired or Failed.
public setArchive ( boolean $value ) : void
$value boolean Value to set.
Результат void

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

Sets the Caller ID, Please note: It may not work if you do not respect the format: CallerID: "Some Name" <1234>
public setCallerId ( string $value ) : void
$value string Value to set.
Результат void

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

Sets context to use for this call when answered.
public setContext ( string $value ) : void
$value string Value to set.
Результат void

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

Sets extension to use for this call when answered.
public setExtension ( string $value ) : void
$value string Value to set.
Результат void

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

Sets number of retries before failing (not including the initial attempt, e.g. 0 = total of 1 attempt to make the call). Default is 0.
public setMaxRetries ( integer $value ) : void
$value integer Value to set.
Результат void

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

Sets a given parameter with the given value.
protected setParameter ( string $key, string $value ) : void
$key string Parameter name.
$value string Value.
Результат void

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

Sets priority to use for this call when answered.
public setPriority ( string $value ) : void
$value string Value to set.
Результат void

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

Default is 300 (5 min).
public setRetryTime ( integer $value ) : void
$value integer Value to set.
Результат void

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

Sets a given variable with the given value.
public setVariable ( string $key, string $value ) : void
$key string Variable name.
$value string Value.
Результат void

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

Sets seconds to wait for an answer. Default is 45.
public setWaitTime ( integer $value ) : void
$value integer Value to set.
Результат void

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

Deconstructs a call file from the given text.
public unserialize ( string $text ) : void
$text string A call file (intended to be pre-loaded, with file_get_contents() or similar).
Результат void