models/PBX.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
Package
Default  

\PBX

Package: Models
PBX model

Constants

>VConstant  PBX_MAX_ATTEMPTS = 3
>VConstant  PBX_SUCCESS = 0
>VConstant  PBX_ERROR_INTERNAL_ERROR = 999
>VConstant  PBX_ERROR_QUEUE_ID_MISSING = 2
>VConstant  PBX_ERROR_QUEUE_EXISTS = 7
>VConstant  PBX_ERROR_QUEUE_NOT_EXISTS = 9
>VConstant  PBX_ERROR_AGENT_ID_MISSING = 2
>VConstant  PBX_ERROR_AGENT_EXISTS = 8
>VConstant  PBX_ERROR_AGENT_NOT_EXISTS = 10
>VConstant  PBX_ERROR_ASSIGN_FAILED = 1
>VConstant  PBX_ERROR_RELEASE_FAILED = 2
>VConstant  PBX_ERROR_AGENT_ACTION_FAILED = 1
>VConstant  PBX_ERROR_ACTION_AGENT_NOT_EXISTS = 100
>VConstant  PBX_ERROR_LOGIN_ALREADY = 3
>VConstant  PBX_ERROR_LOGIN_EXT_NOT_EXISTS = 101
>VConstant  PBX_ERROR_LOGOFF_ALREADY = 5
>VConstant  PBX_ERROR_CALL_NUMBER_OR_AGENT_MISSING = 2
>VConstant  PBX_ERROR_CALL_AGENT_NOT_LOGIN = 5
>VConstant  PBX_ERROR_CALL_AGENT_UNAVAILABLE = 6
>VConstant  PBX_ERROR_HANGUP_NOT_FOUND = 200

Properties

>VPropertyprivate$operatorId
Details
Type
n/a
>VPropertyprivate$pbx_api_enable
Details
Type
n/a
>VPropertyprivate$pbx_debug
Details
Type
n/a
>VPropertyprivate$pbx_log_agent_path
Details
Type
n/a
>VPropertyprivate$pbx_log_call_path
Details
Type
n/a
>VPropertyprivate$pbx_log_dir
Details
Type
n/a
>VPropertyprivate$pbx_log_filename
Details
Type
n/a
>VPropertyprivate$pbx_log_path
Details
Type
n/a
>VPropertyprivate$pbx_log_population_path
Details
Type
n/a
>VPropertyprivate$pbx_server_agent_api_url
Details
Type
n/a
>VPropertyprivate$pbx_server_api_url
Details
Type
n/a
>VPropertyprivate$pbx_server_call_url
Details
Type
n/a
>VPropertyprivate$pbx_server_hangup_url
Details
Type
n/a
>VPropertyprivate$pbx_server_host
Details
Type
n/a
>VPropertyprivate$pbx_server_secure
Details
Type
n/a

Methods

methodpublic__construct() : void

methodprivate_manageAgent( $action,  $data) : string

Common private method for operator's management

Parameters
NameTypeDescription
$action
$data
Returns
TypeDescription
string
methodprivate_manageAgentAction( $action,  $data) : string

Common private method for operator's actions management

Parameters
NameTypeDescription
$action
$data
Returns
TypeDescription
string
methodprivate_manageAssign( $action,  $data) : string

Common private method for assignees's management

Parameters
NameTypeDescription
$action
$data
Returns
TypeDescription
string
methodprivate_manageQueue( $action,  $data) : string

Common private method for queue's management

Parameters
NameTypeDescription
$action
$data
Returns
TypeDescription
string
methodprivate_remoteRequest( $pbx_request_url) : integer

request to external remote server. returned INT value. 0 - Success, other - ERROR_CODE

Parameters
NameTypeDescription
$pbx_request_url
Returns
TypeDescription
integer
methodpublicaddAgent( $data) : string

Send comand to PBX server to add new operator to system

Parameters
NameTypeDescription
$data
Returns
TypeDescription
string
methodpublicaddQueue( $queueId,  $data) : string

Send command to PBX server to add new group to survey process. ID + NAME only now. May be expand in fature.

Parameters
NameTypeDescription
$queueId
$data
Returns
TypeDescription
string
methodpublicagentLogin( $data) : string

Send command to PBX server to allow operator to survey

Parameters
NameTypeDescription
$data
Returns
TypeDescription
string
methodpublicagentLogoff( $data) : string

Send command to PBX server to stop operator to survey

Parameters
NameTypeDescription
$data
Returns
TypeDescription
string
methodpublicagentOnline( $data) : string

Send notification to PBX server that operator back from intermission to survey process

Parameters
NameTypeDescription
$data
Returns
TypeDescription
string
methodpublicagentPause( $data) : string

Send notofication to PBX server that operator out to intermission

Parameters
NameTypeDescription
$data
Returns
TypeDescription
string
methodpublicassignAgentToQueue( $data) : string

Send command to PBX server to assign operator to survey group

Parameters
NameTypeDescription
$data
Returns
TypeDescription
string
methodpubliccall( $data) : void

Parameters
NameTypeDescription
$data
methodpublicdelQueue( $queueId) : string

Send command to PBX server to remove group of survey.

Parameters
NameTypeDescription
$queueId
Returns
TypeDescription
string
methodpublicdeleteAgent( $id) : string

Send comand to PBX server to remove operator by ID

Parameters
NameTypeDescription
$id
Returns
TypeDescription
string
methodpubliceditAgent( $data) : string

Send comand to PBX server to update operator's data

Parameters
NameTypeDescription
$data
Returns
TypeDescription
string
methodpubliceditQueue( $queueId,  $data) : string

Send command to PBX server to edit group of surves. Unsupported now, need for comlete interface logic.

Parameters
NameTypeDescription
$queueId
$data
Returns
TypeDescription
string
methodpublicgetLastCallback( $interviewerId,  $projectId,  $lastId) : void

Parameters
NameTypeDescription
$interviewerId
$projectId
$lastId
methodpublichangup( $data) : void

Parameters
NameTypeDescription
$data
methodpublicisPBX() : boolean

Check is PBX mode enabled

Returns
TypeDescription
boolean
methodpubliclog( $log_type,  $action,  $attempt,  $err_status,  $err_code,  $request,  $response, array $params = array()) : void

Stupid complicate common log method. Waiting for refactoring, but .

..

Parameters
NameTypeDescription
$log_type
$action
$attempt
$err_status
$err_code
$request
$response
$paramsarray
methodpublicreleaseAgentFromQueue( $data) : string

Send command to PBX server to release operator from survey group

Parameters
NameTypeDescription
$data
Returns
TypeDescription
string
Documentation was generated by phpDocumentor 2.8.5.