\TelePony
Uncomplicated telephony class
Synopsis
class TelePony
{
- // constants
- const URL_ME = '?module=telepony';
- const ROUTE_AJCALLSHIST = 'ajaxcallshist';
- const ROUTE_INCALLSTATS = 'incallstats';
- const ROUTE_CALLSHIST = 'callshistory';
- const ROUTE_NIGHTCALLS = 'nightcalls';
- const ROUTE_DFROM = 'datefrom';
- const ROUTE_DTO = 'dateto';
- const ROUTE_DLOADCDR = 'downloadcdr';
- const PATH_CDRDEBUG = 'exports/teleponycdrdebug.log';
- // members
- protected array $altCfg = ;
- protected array $billCfg = ;
- protected array $allContacts = ;
- protected $messages = '';
- // methods
- public void __construct()
- protected void initMessages()
- protected void loadConfigs()
- public string renderControls()
- public string renderNumLog()
- public array/bool getCDR()
- protected array groupCDRflows()
- protected int parseChannel()
- protected string parseCDRFlow()
- protected string renderCallStatus()
- protected string renderNumber()
- public string renderCdrDateForm()
- public void renderCDR()
- public void getCDRJson()
- public array fetchMissedCalls()
- public array getHorseMonthData()
- public string renderNightCalls()
Constants
Name | Value |
---|---|
URL_ME | '?module=telepony' |
ROUTE_AJCALLSHIST | 'ajaxcallshist' |
ROUTE_INCALLSTATS | 'incallstats' |
ROUTE_CALLSHIST | 'callshistory' |
ROUTE_NIGHTCALLS | 'nightcalls' |
ROUTE_DFROM | 'datefrom' |
ROUTE_DTO | 'dateto' |
ROUTE_DLOADCDR | 'downloadcdr' |
PATH_CDRDEBUG | 'exports/teleponycdrdebug.log' |
Members
protected
Methods
protected
- groupCDRflows() — Groups all calls from CDR as uniqueFlowId=>call records
- initMessages() — Inits system messages helper
- loadConfigs() — Preloads required configs into protected properties
- parseCDRFlow() — Parses flow data into humanic stats array.
- parseChannel() — Parses channel data to extract peer number
- renderCallStatus() — Returns styled call status lable depend of disposiotion
- renderNumber() — Returns some contact if available in phonebook
public
- __construct() — Creates new TelePony instance
- fetchMissedCalls() — Fetches and preprocess some missed calls from CDR
- getCDR() — Returns raw CDR for selected period of time
- getCDRJson() — Renders some calls history JSON data
- getHorseMonthData() — Returns calls stats data for current month for the exhorse
- renderCDR() — Renders calls history data container
- renderCdrDateForm() — Renders CDR date selection form
- renderControls() — Renders basic module controls
- renderNightCalls() — Renders calls during non-business hours list
- renderNumLog() — Renders incoming calls stats if it exists