#include <bayonne.h>
Inheritance diagram for Trunk:
Public Methods | |
virtual unsigned long | getCapabilities (void) |
Get driver capabilities. More... | |
virtual void | getName (char *buffer) = 0 |
Get the device logical name number. More... | |
virtual bool | postEvent (TrunkEvent *event) = 0 |
Invoke a runtime state handler for a trunk driver. More... | |
int | getDigit (char digit) |
Compute the DTMF digit id of a character. More... | |
bool | isReady (void) |
See if trunk is idle and available. More... | |
void | libexec (char **argv, unsigned timeout) |
Perform a libexec operation on behalf of the current trunk. More... | |
bool | getOnce (void) |
Make getOnce() into a public. | |
unsigned | getMember (void) |
Get group membership. More... | |
Protected Methods | |
unsigned long | getTrapDefault (void) |
Our default mask includes timeout. More... | |
void | setConstant (const char *id, const char *data) |
This is used to initialize constant variables in the symbol space. More... | |
void | repSymbol (const char *id, const char *data) |
Replace a symbol if a valid value is passed for a replacement. More... | |
scriptsymbol_t* | getEntry (const char *symname, int size) |
This provides an interface to internal symbol definitions. More... | |
void | Commit (scriptsymbol_t *sym) |
A derived Commit handler, allows "clear digits", etc. More... | |
int | getTimeout (void) |
Get a "timeout" option. More... | |
int | getInterdigit (void) |
Get a "interdigit" timeout option. More... | |
unsigned short | getDigitMask (void) |
Get a dtmf bit "mask". More... | |
bool | TrunkSignal (trunksignal_t) |
Notify the script subsystem of a completion event. More... | |
virtual void | setDTMFDetect (void) |
This function sets dtmf detection based on the script interpreter's current trap mask. More... | |
virtual void | setDTMFDetect (bool enable) |
Set actual dtmf detection in the derived trunk class driver. More... | |
virtual void | stopServices (void) |
This is used to reset service threads and generally cleanup the session handler. More... | |
virtual void | TrunkStep (trunkstep_t step) = 0 |
Used to perform state transitions when trunk is in "step" state, from the Bayonne script engine. More... | |
bool | idleHangup () |
This is used to see if the total timer has expired. More... | |
virtual unsigned long | getIdleTime (void) = 0 |
This is used to determine if the trunk is currently "idle" and for how long. More... | |
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. More... | |
void | Detach (void) |
We override ScriptInterp::Detach with our own that adds additional support to purge the variable pool. | |
unsigned long | getMask (void) |
Get the interpter mask or manager mask. | |
char** | getInitial (char **args) |
We get the scheduled or dnis or callerid map table values. More... | |
void | setList (char **list) |
Set a list of keyword values into the variable space of the script interpreter. More... | |
Trunk (int port) | |
Protected Attributes | |
ScriptInterface* | script |
TrunkGroup* | group |
PortManager* | manager |
int | id |
time_t | start |
time_t | idle |
int | idle_timer |
int | rings |
int | digits |
Service* | thread |
trunkdata_t | data |
execdata_t | tgi |
digitsymbol_t | dtmf |
char | buffer [65] |
struct { | |
bool offhook | |
bool dtmf | |
bool script | |
bool reset | |
bool timer | |
bool audio | |
bool once | |
bool ready | |
bool echo | |
unsigned temp | |
trunkmode_t trunk | |
dspmode_t dsp | |
} | flags |
Static Protected Attributes | |
ScriptSymbol | globals |
char | digit [16] |
Friends | |
class | TestDebug |
class | aaScript |
class | Translator |
class | ScriptInterface |
class | Service |
class | AudioService |
class | Fifo |
class | PortManager |
This is also the base of the channel port structure for Bayonne. Drivers will further derive this as "DriverTrunk".
|
|
|
We override ScriptInterp::Attach with our own that adds additional support. This attach initializes a series of required and default "variables" for the script interpreter.
|
|
A derived Commit handler, allows "clear digits", etc.
|
|
We override ScriptInterp::Detach with our own that adds additional support to purge the variable pool.
|
|
This is used to post a step update back to the script engine.
|
|
Notify the script subsystem of a completion event.
|
|
Used to perform state transitions when trunk is in "step" state, from the Bayonne script engine. This call is used rather than "postEvent" with TRUNK_MAKE_STEP since the Bayonne engine is already in the context of the callback thread and invoked from a postEvent initiated call. Hence, this saves the overhead rather of a recursive postEvent call.
|
|
Get driver capabilities.
|
|
Compute the DTMF digit id of a character.
|
|
Get a dtmf bit "mask".
|
|
This provides an interface to internal symbol definitions.
|
|
This is used to determine if the trunk is currently "idle" and for how long.
|
|
We get the scheduled or dnis or callerid map table values.
|
|
Get a "interdigit" timeout option. This is like getValue, however the interdigit value supplied is from the const table.
|
|
Get the interpter mask or manager mask.
|
|
Get group membership.
|
|
Get the device logical name number.
|
|
Make getOnce() into a public.
|
|
Get a "timeout" option. This is like getValue, however the default timeout supplied is from the constant table.
|
|
Our default mask includes timeout.
|
|
This is used to see if the total timer has expired.
|
|
See if trunk is idle and available.
|
|
Perform a libexec operation on behalf of the current trunk.
|
|
Invoke a runtime state handler for a trunk driver. This must be in an event in the derived TrunkDriver class.
|
|
Replace a symbol if a valid value is passed for a replacement.
|
|
This is used to initialize constant variables in the symbol space. These are assumed to be constant for the current session as variables are purged between sessions.
|
|
Set actual dtmf detection in the derived trunk class driver. This typically is called by the "initial" state handler when entering a trunk driver call processing state when an implicit setting is required (such as "collect", which forces enable).
|
|
This function sets dtmf detection based on the script interpreter's current trap mask. This is often used as the initial handler for setting dtmf detection when entering each trunk driver's state. |
|
Set a list of keyword values into the variable space of the script interpreter.
|
|
This is used to reset service threads and generally cleanup the session handler. It is a virtual since driver specific implimentations may vary. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|