Telephony_Handler_Telphin_Controller
extends Telephony_Controller
in package
Telephony_Handler_Telphin_Controller.
Tags
Table of Contents
Properties
- $instance : mixed
- The singleton instances.
- $_apiUrl : string
- Telphin REST API url
- $_oSite : Site_Model
- Site object
- $_oTelephony : Telephony_Model
- Telephony object
Methods
- callback() : self
- Callback
- factory() : mixed
- Create and return an object of telephony
- getAudio() : null|string
- Get audio record filepath
- getCallbackUrl() : string
- Get callback url
- getSettingsList() : array<string|int, mixed>
- Get driver settings list
- instance() : object
- Register an existing instance as a singleton.
- setSite() : self
- Set site
- setTelephony() : self
- Set telephony
- _addAudio() : self
- Add audio file to crm note
- _createLead() : void
- Create lead from call
- _createNotification() : self
- Create notification for subscribers
- _getDriverName() : srting
- Get full driver name
- _getLeadIds() : array<string|int, mixed>
- Get lead ids by phone
- _getSiteuserIds() : array<string|int, mixed>
- Get siteuser ids by phone
Properties
$instance
The singleton instances.
public
static mixed
$instance
= array()
$_apiUrl
Telphin REST API url
protected
string
$_apiUrl
= 'https://apiproxy.telphin.ru/api/ver1.0'
$_oSite
Site object
protected
Site_Model
$_oSite
= \NULL
$_oTelephony
Telephony object
protected
Telephony_Model
$_oTelephony
= \NULL
Methods
callback()
Callback
public
callback() : self
Return values
selffactory()
Create and return an object of telephony
public
static factory(mixed $driverName) : mixed
Parameters
- $driverName : mixed
getAudio()
Get audio record filepath
public
getAudio(string $record_uuid[, string $client_id = '@me' ]) : null|string
Parameters
- $record_uuid : string
- $client_id : string = '@me'
Return values
null|stringgetCallbackUrl()
Get callback url
public
getCallbackUrl() : string
Return values
stringgetSettingsList()
Get driver settings list
public
getSettingsList() : array<string|int, mixed>
Return values
array<string|int, mixed>instance()
Register an existing instance as a singleton.
public
static instance(Telephony_Model $oTelephony) : object
Parameters
- $oTelephony : Telephony_Model
Return values
objectsetSite()
Set site
public
setSite(object $oSite) : self
Parameters
- $oSite : object
-
Site Model
Return values
selfsetTelephony()
Set telephony
public
setTelephony(object $oTelephony) : self
Parameters
- $oTelephony : object
-
Telephony_Model
Return values
self_addAudio()
Add audio file to crm note
protected
_addAudio(Crm_Note_Model $oCrm_Note, Siteuser_Model|Lead_Model $oObject, array<string|int, mixed> $aAudio) : self
Parameters
- $oCrm_Note : Crm_Note_Model
- $oObject : Siteuser_Model|Lead_Model
- $aAudio : array<string|int, mixed>
Return values
self_createLead()
Create lead from call
protected
_createLead(array<string|int, mixed> $aData) : void
Parameters
- $aData : array<string|int, mixed>
_createNotification()
Create notification for subscribers
protected
_createNotification([int $type = 1 ][, string $phone = NULL ][, string|null $status = NULL ][, string $entity_type = '' ]) : self
Parameters
- $type : int = 1
- $phone : string = NULL
- $status : string|null = NULL
- $entity_type : string = ''
Return values
self_getDriverName()
Get full driver name
protected
static _getDriverName(string $driver) : srting
Parameters
- $driver : string
-
driver name
Return values
srting_getLeadIds()
Get lead ids by phone
protected
_getLeadIds(string $phone) : array<string|int, mixed>
Parameters
- $phone : string
Return values
array<string|int, mixed>_getSiteuserIds()
Get siteuser ids by phone
protected
_getSiteuserIds(string $phone) : array<string|int, mixed>
Parameters
- $phone : string