\PBXNum
Universal PBX incoming calls processing class
Synopsis
class PBXNum
{
- // constants
- const CACHE_KEY = 'PBXUSERDATA';
- const CACHE_TIME = 3600;
- const LOG_PATH = 'content/documents/incallsnum.log';
- const LOG_TABLE = 'callshist';
- // members
- protected $telepathy = '';
- protected string $number = '';
- protected $cache = '';
- protected $callsDb = '';
- // methods
- public void __construct()
- public void setNumber()
- protected void initTelepathy()
- protected void initCache()
- protected void initDb()
- protected void saveCallsHist()
- protected void log()
- protected mixed getReply()
- public array parseLog()
- public void renderReply()
Constants
Name | Value |
---|---|
CACHE_KEY | 'PBXUSERDATA' |
CACHE_TIME | 3600 |
LOG_PATH | 'content/documents/incallsnum.log' |
LOG_TABLE | 'callshist' |
Members
protected
Methods
protected
- getReply() — Returns some state int for some user if he is detected by mobile phone Can return cash balance also. In that case a serialized and base64 encoded array with user acc state and acc cash balance is returned
- initCache() — Inits system cache object instance for further usage
- initDb() — Inits incoming calls database abstraction layer
- initTelepathy() — Inits telepathy object instance
- log() — Saves some data to log
- saveCallsHist() — Saves incoming call into database
public
- __construct() — Creates new PBXNum instance
- parseLog() — Returns parsed incoming calls log.
- renderReply() — Renders reply for PBX external AGI application
- setNumber() — Sets current mobile number