|
Public Member Functions |
| bool | scrThread (void) |
| int | getExitFd (void) |
| | Get fd handle.
|
| void | clearExitFd (void) |
| const char * | getTrunkGid (void) |
| | Get trunk global id.
|
| Symbol * | getEntry (const char *symname, unsigned size) |
| | This provides an interface to internal symbol definitions.
|
| void | commit (Symbol *sym) |
| | A derived Commit handler, allows "clear %digits", etc.
|
| void | cleardigits (bool all) |
| | Cleardigits handler.
|
| char | getdigit (void) |
| | Fetch a pending digit.
|
| bool | getExitkey (unsigned short mask, unsigned keycode) |
| | Check and get terminating mask.
|
| void | setExitkey (void) |
| | Set exit keytrap for a masked key.
|
| bool | isAdmin (void) |
| | Flag if admin user.
|
| const char * | getStation (void) |
| | Get a fax station identifier for a script.
|
| timeout_t | getTimeout (const char *keyword=NULL) |
| | Get a "timeout" option.
|
| timeout_t | getInterdigit (const char *keyword=NULL) |
| | Get a "interdigit" timeout option.
|
| unsigned short | getDigitMask (const char *keyword=NULL) |
| | Get a dtmf bit "mask".
|
| bool | hasExitMask (unsigned short mask) |
| | Test if terminating key had been pressed.
|
| unsigned short | getExitMask (void) |
| | Get a dtmf exit "mask".
|
| bool | trunkSignal (trunksignal_t) |
| | Notify the script subsystem of a completion event.
|
| void | trunkError (const char *errmsg=NULL) |
| | Notify the script subsystem of a error event.
|
| bool | event (const char *event, bool inheret=true) |
| | Branch to a named script event handler, inhereted.
|
| const char * | getPrefixPath (void) |
| | Compute a prefix path based on prefix passed.
|
| virtual const char * | getDefaultEncoding (void) |
| | Get the default audio encoding format to use.
|
| unsigned | getId (void) |
| | Get the timeslot port number.
|
| unsigned | getSequence (void) |
| | Get the trunk sequence number.
|
| Driver * | getDriver (void) |
| void | setSave (const char *save) |
| | Set the sleep save marker for sleeping tasks.
|
| virtual unsigned long | getCapabilities (void) |
| | Get driver capabilities.
|
| virtual void | getName (char *buffer)=0 |
| | Get the device logical name number.
|
| virtual bool | postEvent (TrunkEvent *event)=0 |
| | Invoke a runtime state handler for a trunk driver.
|
| int | getDigit (char digit) |
| | Compute the DTMF digit id of a character.
|
| bool | isReady (void) |
| | See if trunk is idle and available.
|
| bool | getOnce (void) |
| | Make getOnce() into a public.
|
| unsigned | getMemberId (void) |
| | Get group membership.
|
| phTone * | getTone (void) |
| | Process a soft tone buffer.
|
| ScriptCommand * | getCommand (void) |
| | Fetch the command interpreter in public context.
|
| trunkmode_t | getTrunkMode (void) |
| | Fetch the current trunk mode flag.
|
| Trunk * | getJoined (void) |
| void | setJoined (Trunk *trk) |
Static Public Member Functions |
| static bool | hasDriver (ScriptInterp *interp, const char *v) |
| static bool | hasVoice (ScriptInterp *interp, const char *v) |
| static bool | hasAppVoice (ScriptInterp *interp, const char *v) |
| static bool | hasSysVoice (ScriptInterp *interp, const char *v) |
| static bool | hasAltVoice (ScriptInterp *interp, const char *v) |
| static bool | hasGroup (ScriptInterp *interp, const char *v) |
| static bool | hasPlugin (ScriptInterp *interp, const char *v) |
| static bool | hasSysPrompt (ScriptInterp *interp, const char *v) |
| static bool | hasVarPrompt (ScriptInterp *interp, const char *v) |
| static bool | isNode (ScriptInterp *interp, const char *v) |
| static bool | isService (ScriptInterp *interp, const char *v) |
| static bool | isSchedule (ScriptInterp *interp, const char *v) |
| static bool | ifDTMF (ScriptInterp *interp, const char *v) |
| static bool | ifFeature (ScriptInterp *interp, const char *v) |
| static bool | isExtension (ScriptInterp *interp, const char *v) |
| static bool | isStationPort (ScriptInterp *interp, const char *v) |
| static bool | isVirtual (ScriptInterp *interp, const char *v) |
| static bool | isHunt (ScriptInterp *interp, const char *v) |
| static bool | isActiveUser (ScriptInterp *interp, const char *v) |
| static bool | isDnd (ScriptInterp *interp, const char *v) |
| static bool | ifRinging (ScriptInterp *interp, const char *v) |
| static bool | ifRunning (ScriptInterp *interp, const char *v) |
| static bool | ifPort (ScriptInterp *interp, const char *v) |
| static const char * | getEncodingName (Audio::Encoding e) |
| | Get the string name of an audio encoding type.
|
| static ScriptSymbol * | getGlobals (void) |
| | Get global symbol stace.
|
Public Attributes |
| AudioBuffer * | softJoin |
| unsigned long | eventmask |
| bool | isStation |
| bool | isRinging |
Protected Member Functions |
| void | setAudioPosition (timeout_t pos) |
| void | incIncoming (void) |
| void | decIncoming (void) |
| void | incOutgoing (void) |
| void | decOutgoing (void) |
| void | setUsage (UsageStat *us) |
| bool | scrCommit (void) |
| bool | scrChange (void) |
| bool | scrPassword (void) |
| bool | scrLogin (void) |
| bool | scrLogout (void) |
| bool | scrSync (void) |
| bool | scrAnswer (void) |
| bool | scrDial (void) |
| bool | scrTransfer (void) |
| bool | scrHold (void) |
| bool | scrOptions (void) |
| bool | scrRoute (void) |
| void | setExclusive (bool enable) |
| void | setIdle (bool mode) |
| | Set idle count of the driver.
|
| virtual void | initSyms (void)=0 |
| | Set symbol constants on attach.
|
| unsigned long | getTrapDefault (void) |
| | Our default mask includes timeout.
|
| void | repSymbol (const char *id, const char *data) |
| | Replace a symbol if a valid value is passed for a replacement.
|
| void | dialRewrite (const char *dialstring) |
| | Rewrite a telephone number based on trunk group stored digit rewrite rules, and post into dial command buffer.
|
| virtual void | setDTMFDetect (void) |
| | This function sets dtmf detection based on the script interpreter's current trap mask.
|
| virtual void | setDTMFDetect (bool enable) |
| | Set actual dtmf detection in the derived trunk class driver.
|
| virtual void | stopServices (void) |
| | This is used to reset service threads and generally cleanup the session handler.
|
| virtual void | trunkStep (trunkstep_t step)=0 |
| | Used to perform state transitions when trunk is in "step" state, from the Bayonne script engine.
|
| bool | idleHangup () |
| | This is used to see if the total timer has expired.
|
| virtual unsigned long | getIdleTime (void)=0 |
| | This is used to determine if the trunk is currently "idle" and for how long.
|
| bool | scriptStep (void) |
| | This is used to post a step update back to the script engine.
|
| bool | attach (const char *scrname) |
| | We override ScriptInterp::Attach with our own that adds additional support.
|
| void | initialize (void) |
| | We override ScriptInterp::initialize with a local one that initializes key variables before init segments run.
|
| void | detach (void) |
| | We override ScriptInterp::Detach with our own that adds additional support to purge the variable pool.
|
| char ** | getInitial (char **args) |
| | We get the scheduled or dnis or callerid map table values.
|
| void | setList (char **list) |
| | Set a list of keyword values into the variable space of the script interpreter.
|
| virtual void | accept (void) |
| | Accept method for accept scripts.
|
| virtual const char * | getLibexec (void) |
| | Get the voice library extension set to use.
|
| virtual bool | setListen (bool on) |
| | Start the listen thread for the current port and return true if supported.
|
| virtual bool | setBMG (bool on) |
| | Start the background audio play thread for the current port.
|
| virtual void | reject (void) |
| | Reject method for reject scripts.
|
| void | enterState (const char *state) |
| | Enter a state and post it's identifier in local sym.
|
| | Trunk (int port, Driver *drv, int card=0, int span=0) |
| | ~Trunk () |
| bool | recvEvent (TrunkEvent *event) |
| | Receive an event message from a foreign trunk and process it locally.
|
| bool | syncParent (const char *msg) |
| | Post a sync event to the parent.
|
| void | setCalls (const char *mode) |
| | Set callrec to call type specified.
|
| void | setField (char *field, const char *str, unsigned len) |
| | Set a field, typically in the callrec structure.
|
Protected Attributes |
| const char *volatile | trunkgid |
| UsageStat * | use |
| phTone * | tonetmp |
| int | tsid |
| Trunk * | ctx |
| Number | numbers [6] |
| ScriptInterface * | script |
| TrunkGroup * | group |
| int | id |
| unsigned | spanid |
| unsigned | cardid |
| time_t | starttime |
| time_t | idletime |
| time_t | synctimer |
| time_t | exittimer |
| int | exitfd |
| char | exitmsg [128] |
| volatile unsigned | seq |
| int | idle_timer |
| unsigned | rings |
| unsigned | digits |
| unsigned | counts |
| Driver * | driver |
| Trunk * | joined |
| Service * | thread |
| trunkdata_t | data |
| execdata_t | tgi |
| Digit | dtmf |
| char | buffer [65] |
| struct { |
| bool offhook: 1 |
| bool dtmf: 1 |
| bool script: 1 |
| bool reset: 1 |
| bool timer: 1 |
| bool audio: 1 |
| bool once: 1 |
| bool ready: 1 |
| bool echo: 1 |
| unsigned onexit: 1 |
| trunkmode_t trunk: 2 |
| dspmode_t dsp: 4 |
| bool dnd: 1 |
| bool cid: 1 |
| bool sent: 1 |
| bool listen: 1 |
| bool bgm: 1 |
| } | flags |
Static Protected Attributes |
| static char | status [] |
| static struct callrec_t * | callrec |
| static ScriptSymbol | globals |
| static char | digit [16] |
Friends |
| class | Request |
| class | Route |
| class | ThreadModule |
| class | MappedCalls |
| class | aaScript |
| class | Translator |
| class | ScriptInterface |
| class | Service |
| class | AudioService |
| class | Fifo |
| class | Driver |
| class | TrunkGroup |
Classes |
| class | Database |
| union | Digit |
| union | Number |
| class | Threaded |
This is also the base of the channel port structure for Bayonne. Drivers will further derive this as "DriverTrunk".