Bayonne2 / Common C++ 2 Framework
|
The primary session object representing a server timeslot and active communication endpoint in Bayonne. More...
#include <bayonne.h>
Public Member Functions | |
bool | isDTMF (void) |
bool | isPeering (void) |
BayonneSpan * | getSpan (void) |
timeslot_t | getTimeslot (void) |
ScriptEngine * | getEngine (void) |
const char * | getExternal (const char *option) |
Process interpreter session symbols. More... | |
bool | addSymbol (const char *id, const char *value) |
Add to an existing symbol. More... | |
bool | clearSymbol (const char *id) |
Clear an existing symbol. More... | |
uint16 | getEventSequence (void) |
Get event sequence id. More... | |
BayonneTranslator * | getTranslator (void) |
Get the current language translator. More... | |
void | startConnecting (void) |
Start connecting child... More... | |
BayonneSession (BayonneDriver *driver, timeslot_t timeslot, BayonneSpan *span=NULL) | |
Create a new session. More... | |
virtual | ~BayonneSession () |
Destroy a session. More... | |
const char * | getDigits (void) |
const char * | defVoicelib (void) |
const char * | getSessionId (void) |
const char * | getSessionParent (void) |
const char * | getSessionJoined (void) |
time_t | getSessionStart (void) |
void | initialevent (void) |
Initial kickoff event. More... | |
void | initialize (void) |
Initialine ccengine script environment. More... | |
void | detach (void) |
Detach interpreter. More... | |
time_t | getJoined (void) |
Return time this call is joined or 0 if not child node. More... | |
BayonneDriver * | getDriver (void) |
Return driver associated with this session. More... | |
virtual timeout_t | getRemaining (void)=0 |
Return time remaining until timer expires. More... | |
virtual void | startTimer (timeout_t timer)=0 |
Start a timer on the session. More... | |
virtual void | stopTimer (void)=0 |
Stop the timer for the session. More... | |
virtual void | setOffhook (bool state) |
Set the port hook state. More... | |
virtual void | makeIdle (void) |
Handles driver specific stuff when going idle. More... | |
void | part (event_t reason) |
Disconnect notify peer... More... | |
virtual bool | postEvent (Event *event) |
Post an event to the session state engine. More... | |
bool | matchLine (Line *line) |
virtual void | queEvent (Event *event) |
queue an event through the msgport. More... | |
virtual void | startThread (void) |
ccengine thread handling. More... | |
virtual void | enterThread (ScriptThread *thr) |
ccengine thread handling. More... | |
virtual void | exitThread (const char *msg) |
ccengine thread handling. More... | |
virtual void | clrAudio (void) |
Clear/cleanup audio processing for the session. More... | |
virtual timeout_t | getToneFraming (void) |
Get frame rate used for creating tone generators. More... | |
virtual const char * | audioEncoding (void) |
Get driver default encoding. More... | |
virtual const char * | audioExtension (void) |
Get driver default extension. More... | |
virtual timeout_t | audioFraming (void) |
Get driver default framing. More... | |
const char * | getAudio (bool live=true) |
Check script keywords for audio processing. More... | |
void | branching (void) |
ccengine branch event notification. More... | |
bool | isOffhook (void) |
Return hook state. More... | |
interface_t | getInterface (void) |
Return interface type of this session. More... | |
bridge_t | getBridge (void) |
Return bridge type for joins. More... | |
calltype_t | getType (void) |
Return call type on session. More... | |
timeslot_t | getSlot (void) |
Return server timeslot this session uses. More... | |
bool | isIdle (void) |
Return if the session is currently idle. More... | |
bool | isRefer (void) |
Return if currently referring. More... | |
bool | isJoined (void) |
Return state of join. More... | |
bool | isAssociated (void) |
Return state of association with parent in call. More... | |
void | associate (BayonneSession *s) |
Set new call association. More... | |
bool | isHolding (void) |
bool | isDisconnecting (void) |
Return state disconnecting or idle... More... | |
timeout_t | getJoinTimer (void) |
Return parent answer timer, if joining. More... | |
bool | signalScript (signal_t signal) |
Signal notification to script. More... | |
virtual bool | peerLinear (void) |
Indicate whether session peers audio as linear frames. More... | |
virtual bool | peerAudio (Audio::Encoded encoded) |
Post a peer audio frame into the driver. More... | |
virtual bool | setPeering (Audio::Encoding encoding, timeout_t framing) |
Set peer audio encoding to the encoding type and framing specified by peer on drivers which can switch encoding. More... | |
const char * | getKeyString (const char *id) |
bool | getKeyBool (const char *id) |
long | getKeyValue (const char *id) |
timeout_t | getSecTimeout (const char *id) |
timeout_t | getMSecTimeout (const char *id) |
timeout_t | getTimeoutValue (const char *opt=NULL) |
timeout_t | getTimeoutKeyword (const char *kw) |
const char * | getExitKeyword (const char *def) |
const char * | getMenuKeyword (const char *def) |
unsigned | getInputCount (const char *digits, unsigned max) |
uint32 | newTid (void) |
Compute a new unique transaction id. More... | |
const char * | getTid (void) |
Get the current transaction identifier string for the session. More... | |
bool | digitEvent (const char *event) |
Throw a digit pattern matching event message to the interprer. More... | |
bool | stringEvent (const char *evt) |
char | getDigit (void) |
Get the next pending digit in the DTMF input buffer. More... | |
long | getIntValue (const char *text, unsigned prec, ScriptProperty *property=NULL) |
int | numericExpression (long *list, int max, unsigned prec, ScriptProperty *property=NULL) |
bool | conditionalExpression (void) |
bool | conditional (void) |
unsigned long | getSequence (void) |
virtual const char * | getLogname (void) |
ScriptImage * | getImage (void) |
const char * | getMember (void) |
const char * | getKeyword (const char *kw) |
const char * | getKeyoption (const char *kw) |
const char * | getValue (const char *def=NULL) |
const char * | getOption (const char *def=NULL) |
const char * | hasOption (void) |
const char * | getContent (const char *opt) |
const char * | getSymContent (const char *opt) |
Symbol * | getKeysymbol (const char *kw, unsigned size=0) |
Symbol * | getSymbol (unsigned short size=0) |
bool | getSymbol (const char *id, char *buffer, unsigned short max) |
const char * | getSymbol (const char *id) |
char | getPackToken (void) |
Frame * | getFrame (void) |
Line * | getLine (void) |
void | setFrame (void) |
Name * | getName (void) |
bool | getTrace (void) |
bool | execute (Method method) |
Runtime execution of script handler. More... | |
virtual void | logmissing (const char *id, const char *level="undefined", const char *group="symbol") |
virtual void | logerror (const char *msg, const char *name=NULL) |
Symbol * | mapSymbol (const char *id, unsigned short=0) |
Symbol * | mapDirect (const char *id, unsigned short=0) |
bool | setNumber (const char *id, const char *value=NULL, unsigned dec=0) |
bool | setSymbol (const char *id, const char *value=NULL, unsigned short size=0) |
bool | setConst (const char *id, const char *value) |
bool | putSymbol (const char *id, const char *value, unsigned short size=0) |
bool | catSymbol (const char *id, const char *value, unsigned short size=0) |
Name * | getScript (const char *name) |
bool | step (void) |
bool | attach (ScriptCommand *cmd, const char *scrname) |
void | attach (ScriptCommand *cmd, ScriptImage *img, Name *scr) |
void | release (void) |
Release any acquired lock... More... | |
bool | signal (const char *name) |
Signals are used during "delayed" execution steps when a signal event has occured aynchronously with the execution of a script controlled state event handler. More... | |
bool | signal (unsigned id) |
Signals can be referenced by numeric id as well as by symbolic name. More... | |
bool | done (void) |
timeout_t | getTimeout (void) |
bool | isRunning (void) |
bool | isExiting (void) |
char * | getTemp (void) |
unsigned | getTempSize (void) |
void | nameMutex (const char *name) |
Enable setting of mutex name for deadlock debug. More... | |
void | enterMutex (void) |
Entering a Mutex locks the mutex for the current thread. More... | |
void | enter (void) |
Future abi will use enter/leave/test members. More... | |
void | leave (void) |
Future abi will use enter/leave/test members. More... | |
bool | test (void) |
Future abi will use enter/leave/test members. More... | |
bool | tryEnterMutex (void) |
Tries to lock the mutex for the current thread. More... | |
void | leaveMutex (void) |
Leaving a mutex frees that mutex for use by another thread. More... | |
const char * | cstring (const char *str) |
unsigned | gathertype (Symbol **idx, unsigned max, const char *prefix, symType group) |
unsigned | gather (Symbol **idx, unsigned max, const char *prefix, const char *suffix) |
Symbol * | find (const char *id, unsigned short size=0) |
Symbol * | make (const char *id, unsigned short size) |
Symbol * | setReference (const char *id, Symbol *target) |
int | getPages (void) |
Return the total number of pages that have been allocated for this memory pool. More... | |
void | md5_hash (char *out, const char *source) |
Compute md5 hashes... More... | |
Static Public Member Functions | |
static const char * | getGlobal (const char *id) |
static bool | setGlobal (const char *id, const char *value) |
static bool | sizeGlobal (const char *id, unsigned size) |
static bool | addGlobal (const char *id, const char *value) |
static bool | clearGlobal (const char *id) |
static long | getRealValue (double val, unsigned prec) |
static double | getDouble (long value, unsigned prec) |
static long | getInteger (long value, unsigned prec) |
static long | getTens (unsigned prec) |
static void | setDebug (bool mode) |
Enable or disable deadlock debugging. More... | |
static bool | isScript (Name *scr) |
static bool | isSymbol (const char *id) |
static bool | use (const char *name) |
static unsigned | getIndex (const char *id) |
static Symbol * | deref (Symbol *sym) |
static bool | commit (Symbol *sym, const char *value) |
static bool | append (Symbol *sym, const char *value) |
static bool | symindex (Symbol *sym, short offset) |
static const char * | extract (Symbol *sym) |
static unsigned | count (Symbol *sym) |
static unsigned | storage (Symbol *sym) |
static void | clear (Symbol *sym) |
static void | addFunction (const char *name, unsigned count, Function i) |
static void | addConditional (const char *name, Cond test) |
static bool | isPrivate (Name *scr) |
static bool | isFunction (Name *scr) |
static void | snmptrap (unsigned id, const char *descr=NULL) |
static void | allocate (timeslot_t timeslots, ScriptCommand *pointer=NULL, timeslot_t overdraft=0) |
Allocates the maximum number of timeslots the server will use as a whole and attaches a given server to the library. More... | |
static const char * | getRegistryId (const char *id) |
static BayonneDriver * | getDriverTag (const char *id) |
static Audio::Encoding | getEncoding (const char *cp) |
static void | allocateLocal (void) |
Allocate local script engine sessions, if needed. More... | |
static void | addConfig (const char *cfgfile) |
Add config file entry. More... | |
static void | waitLoaded (void) |
Wait for live flag... More... | |
static unsigned long | uptime (void) |
Get server uptime. More... | |
static ScriptCompiler * | reload (void) |
Request active scripts to be recompiled from the library. More... | |
static void | down (void) |
Used to down the server from the library. More... | |
static bool | service (const char *service) |
Sets server service level from the library. More... | |
static const char * | getRunLevel (void) |
Get service level. More... | |
static BayonneSession * | getSession (timeslot_t timeslot) |
Returns a session pointer for a server timeslot. More... | |
static ScriptImage ** | getLocalImage (timeslot_t timeslot) |
Returns a local image pointer for a server timeslot. More... | |
static BayonneSession * | startDialing (const char *dial, const char *name, const char *caller, const char *display, BayonneSession *parent=NULL, const char *manager=NULL, const char *secret=NULL) |
Start a dialing session. More... | |
static BayonneSession * | getSid (const char *id) |
Returns a session pointer for a string identifier. More... | |
static timeslot_t | toTimeslot (const char *id) |
Returns a server timeslot number for a string identifier. More... | |
static timeslot_t | getTimeslotsUsed (void) |
Return total library timeslots used (highest used). More... | |
static timeslot_t | getTimeslotCount (void) |
Return total timeslots allocated for the server. More... | |
static timeslot_t | getAvailTimeslots (void) |
Return remaining timeslots available to allocate driver ports into. More... | |
static Handler | getState (const char *name) |
Map a state name into a handler. More... | |
static int | getDigit (char dtmf) |
Convert a dtmf character into a 0-15 number reference. More... | |
static char | getChar (int dtmf) |
Convert a dtmf digit number into it's ascii code. More... | |
static bool | matchDigits (const char *digits, const char *match, bool partial=false) |
A function to support pattern matching and templates for digit strings. More... | |
static ScriptImage * | useImage (void) |
Use the current compiled script image; mark as in use. More... | |
static void | endImage (ScriptImage *image) |
Release a script image in use. More... | |
static bool | loadPlugin (const char *path) |
Load a plugin module. More... | |
static bool | loadMonitor (const char *path) |
Load a monitoring/management module. More... | |
static bool | loadAudio (const char *path) |
Load a bgm/audio processing module for continues audio. More... | |
static void | errlog (const char *level, const char *fmt,...) |
static bool | getUserdata (void) |
static void | addTrap4 (const char *addr) |
static bool | isScript (Name *scr) |
static bool | isSymbol (const char *id) |
static bool | use (const char *name) |
static unsigned | getIndex (const char *id) |
static Symbol * | deref (Symbol *sym) |
static bool | commit (Symbol *sym, const char *value) |
static bool | append (Symbol *sym, const char *value) |
static bool | symindex (Symbol *sym, short offset) |
static const char * | extract (Symbol *sym) |
static unsigned | count (Symbol *sym) |
static unsigned | storage (Symbol *sym) |
static void | clear (Symbol *sym) |
static void | addFunction (const char *name, unsigned count, Function i) |
static void | addConditional (const char *name, Cond test) |
static bool | isPrivate (Name *scr) |
static bool | isFunction (Name *scr) |
Data Fields | |
Traffic | call_attempts |
Traffic | call_complete |
BayonneAudio | audio |
class __EXPORT | Line |
class __EXPORT | Name |
class __EXPORT | Line |
class __EXPORT | Name |
Static Public Attributes | |
static size_t | pagesize |
static bool | fastStart |
static bool | useBigmem |
static unsigned | fastStepping |
static unsigned | autoStepping |
static unsigned | symsize |
static unsigned | symlimit |
static char | decimal |
static bool | use_definitions |
static bool | use_macros |
static bool | use_prefix |
static bool | use_merge |
static bool | use_funcs |
static const char * | plugins |
static const char * | altplugins |
static const char * | access_user |
static const char * | access_pass |
static const char * | access_host |
static bool | exec_funcs |
static const char * | exec_extensions |
static const char * | exec_token |
static const char * | exec_prefix |
static const char * | exit_token |
static const char * | apps_extensions |
static const char * | apps_prefix |
static const char * | etc_prefix |
static const char * | var_prefix |
static const char * | log_prefix |
static char | dtmf_keymap [256] |
static timeout_t | step_timer |
static timeout_t | reset_timer |
static timeout_t | exec_timer |
static unsigned | compile_count |
static volatile bool | image_loaded |
static BayonneTranslator * | init_translator |
static const char * | init_voicelib |
static const char * | trap_community |
static AtomicCounter | libexec_count |
static statetab | states [] |
Table of states ordered by id. More... | |
static Mutex | serialize |
A mutex to serialize any direct console I/O operations. More... | |
static ThreadLock | reloading |
A mutex to serialize reload requests. More... | |
static Traffic | total_call_attempts |
master traffic counters for call attempts and call completions. More... | |
static Traffic | total_call_complete |
static volatile unsigned short | total_active_calls |
static bool | fastStart |
static bool | useBigmem |
static unsigned | fastStepping |
static unsigned | autoStepping |
static size_t | pagesize |
static unsigned | symsize |
static unsigned | symlimit |
static char | decimal |
static bool | use_definitions |
static bool | use_macros |
static bool | use_prefix |
static bool | use_merge |
static bool | use_funcs |
static const char * | plugins |
static const char * | altplugins |
static const char * | access_user |
static const char * | access_pass |
static const char * | access_host |
static bool | exec_funcs |
static const char * | exec_extensions |
static const char * | exec_token |
static const char * | exec_prefix |
static const char * | exit_token |
static const char * | apps_extensions |
static const char * | apps_prefix |
static const char * | etc_prefix |
static const char * | var_prefix |
static const char * | log_prefix |
Protected Member Functions | |
bool | requiresDTMF (void) |
Used to indicate commands which require dtmf handling to be enabled. More... | |
void | enterCall (void) |
Enter a co-joined call session; used to notify other services. More... | |
void | exitCall (const char *reason) |
Exit a co-joined call session; used to notify other services. More... | |
virtual bool | enableDTMF (void) |
Enable dtmf detection for this channel. More... | |
virtual void | disableDTMF (void) |
Disable dtmf detection for this channel. More... | |
virtual const char * | checkAudio (bool live) |
Check audio properties for file and channel audio processing based on the driver specific capabilities of this channel through it's virtual. More... | |
virtual bool | filterPosting (Event *event) |
virtual to filter incoming events. More... | |
virtual bool | enterCommon (Event *event) |
virtual bool | enterInitial (Event *event) |
virtual bool | enterFinal (Event *event) |
virtual bool | enterIdle (Event *event) |
virtual bool | enterReset (Event *event) |
virtual bool | enterRelease (Event *event) |
virtual bool | enterRinging (Event *event) |
virtual bool | enterPickup (Event *event) |
virtual bool | enterAnswer (Event *event) |
virtual bool | enterSeize (Event *event) |
virtual bool | enterHunting (Event *event) |
virtual bool | enterHangup (Event *event) |
virtual bool | enterTone (Event *event) |
virtual bool | enterReconnect (Event *event) |
virtual bool | enterDTMF (Event *event) |
virtual bool | enterPlay (Event *event) |
virtual bool | enterRecord (Event *event) |
virtual bool | enterJoin (Event *event) |
virtual bool | enterWait (Event *event) |
virtual bool | enterDial (Event *event) |
virtual bool | enterBusy (Event *event) |
virtual bool | enterStandby (Event *event) |
virtual bool | enterXfer (Event *event) |
virtual bool | enterRefer (Event *event) |
virtual bool | enterHold (Event *event) |
virtual bool | enterRecall (Event *event) |
void | check (void) |
Check dtmf handling and other nessisities for the interpreter after an event has changed interpreter state. More... | |
void | renameRecord (void) |
bool | stateInitial (Event *event) |
bool | stateFinal (Event *event) |
bool | stateIdle (Event *event) |
bool | stateIdleReset (Event *event) |
bool | stateReset (Event *event) |
bool | stateRelease (Event *event) |
bool | stateBusy (Event *event) |
bool | stateStandby (Event *event) |
bool | stateRinging (Event *event) |
bool | statePickup (Event *event) |
bool | stateAnswer (Event *event) |
bool | stateSeize (Event *event) |
bool | stateHunting (Event *event) |
bool | stateRunning (Event *event) |
bool | stateLibexec (Event *event) |
bool | stateLibreset (Event *event) |
bool | stateLibwait (Event *event) |
bool | stateWaitkey (Event *event) |
bool | stateThreading (Event *event) |
bool | stateHangup (Event *event) |
bool | stateCollect (Event *event) |
bool | stateSleep (Event *event) |
bool | stateStart (Event *event) |
bool | stateClear (Event *event) |
bool | stateInkey (Event *event) |
bool | stateInput (Event *event) |
bool | stateRead (Event *event) |
bool | stateDial (Event *event) |
bool | stateXfer (Event *event) |
bool | stateRefer (Event *event) |
bool | stateHold (Event *event) |
bool | stateRecall (Event *event) |
bool | stateTone (Event *event) |
bool | stateDTMF (Event *event) |
bool | statePlay (Event *event) |
bool | stateRecord (Event *event) |
bool | stateJoin (Event *event) |
bool | stateWait (Event *event) |
bool | stateConnect (Event *event) |
bool | stateReconnect (Event *event) |
bool | stateCalling (Event *event) |
bool | putEvent (Event *event) |
Direct method to post an event to a channel. More... | |
void | libWrite (const char *string) |
Write libexec... More... | |
void | libClose (const char *string) |
bool | isLibexec (const char *tsid) |
timeout_t | getLibexecTimeout (void) |
const char * | getWritepath (char *buf=NULL, size_t len=0) |
void | incIncomingAttempts (void) |
void | incOutgoingAttempts (void) |
void | incIncomingComplete (void) |
void | incOutgoingComplete (void) |
void | incActiveCalls (void) |
void | decActiveCalls (void) |
ScriptInterp * | getInterp (const char *id) |
Return session id for interpreter session command. More... | |
ScriptSymbols * | getSymbols (const char *id) |
Return ccengine symbol page map. More... | |
Name * | attachStart (Event *event) |
Start a script from idle or ringing. More... | |
unsigned | getId (void) |
Used by ccengine. More... | |
void | setSid (void) |
Compute a uneque call session id for the current call on the current session object. More... | |
void | setState (state_t) |
Set the session to a new state. More... | |
void | setRunning (void) |
Set the session to the running state, resume interpreter or libexec. More... | |
bool | setReconnect (const char *enc, timeout_t framing) |
Attempt to readjust encoding of active session if supported. More... | |
bool | recallReconnect (void) |
Attempt to readjust encoding of active session for recall. More... | |
void | setConnecting (const char *evname=NULL) |
Set the session to the connecting (join) state or run state based on flags and circumstances from seize/pickup. More... | |
bool | setLibexec (result_t result) |
Set the result of a libexec initiated process and change state to libexec. More... | |
bool | setLibreset (result_t result) |
Set the result of a libexec initiated process and execute a reset timer interval. More... | |
libaudio_t * | getLibaudio (void) |
Get the libaudio object. More... | |
void | finalize (void) |
ccengine. More... | |
bool | exit (void) |
Exit processing for interpreter. More... | |
ScriptSymbols * | getLocal (void) |
void | initRuntime (Name *name) |
Initialize execution environment for a script. More... | |
bool | push (void) |
Attempt to push a value onto the stack. More... | |
bool | pull (void) |
Attempt to recall a previous stack level. More... | |
void | clearStack (void) |
Clear the stack of local loops or recursion for branching. More... | |
void | advance (void) |
Advance program to the next script statement. More... | |
void | skip (void) |
Skip line without checking or setting updates. More... | |
void | error (const char *error) |
Set error variable and advance to either the error handler or next script statement. More... | |
bool | scriptEvent (const char *name, bool inhereted=true) |
Events reference to named @event handlers which have been attached to a script. More... | |
void | gotoEvent (NamedEvent *event) |
Branch to a selected event record immediately. More... | |
void | trap (unsigned id) |
Set the execution interpreter to a trap identifier. More... | |
void | trap (const char *name) |
Select trap by symbolic name and execute if found, else advance to next script step (unless exit trap). More... | |
bool | tryCatch (const char *id) |
Tries a catch handler... More... | |
virtual bool | isLocked (const char *id) |
virtual const char * | remapLocal (void) |
virtual void | waitThread (void) |
bool | eventThread (const char *evt, bool flag=true) |
bool | redirect (const char *scr) |
bool | redirect (bool evflag) |
void | ripple (void) |
unsigned long | getMask (void) |
void | purge (void) |
virtual void * | first (size_t size) |
Allocate first workspace from paged memory. More... | |
char * | first (char *str) |
Allocate a string from the memory pager pool and copy the string into it's new memory area. More... | |
virtual void * | alloc (size_t size) |
Allocate memory from either the currently active page, or allocate a new page for the object. More... | |
char * | alloc (const char *str) |
Allocate a string from the memory pager pool and copy the string inti it's new memory area. More... | |
void | clean (void) |
Clean for memory cleanup before exiting. More... | |
Static Protected Attributes | |
static BayonneTranslator | langNone |
static ScriptSymbols * | globalSyms |
static Mutex | globalLock |
static Test * | test |
static Fun * | ifun |
static BayonneSession ** | timeslots |
static ScriptImage ** | localimages |
static char * | status |
static ScriptCommand * | server |
static unsigned | ts_trk |
static unsigned | ts_ext |
static timeslot_t | ts_limit |
static timeslot_t | ts_count |
static timeslot_t | ts_used |
static std::ostream * | logging |
static const char * | path_prompts |
static const char * | path_tmpfs |
static const char * | path_tmp |
static unsigned | idle_count |
static unsigned | idle_limit |
static bool | shutdown_flag |
static char | sla [64] |
static time_t | start_time |
static time_t | reload_time |
static Test * | test |
static Fun * | ifun |
Private Member Functions | |
BayonneSession () | |
Private Attributes | |
BayonneSession * | nextIdle |
BayonneSession * | prevIdle |
bool | isAvail |
Friends | |
class __EXPORT | ScriptEngine |
class __EXPORT | BayonneMsgport |
class __EXPORT | BayonneTranslator |
class __EXPORT | BayonneDriver |
class __EXPORT | Bayonne |
The primary session object representing a server timeslot and active communication endpoint in Bayonne.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Primary event identifiers.
These are the events that can be passed into the Bayonne state machine. They are broken into categories.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Signaled interpreter events.
These can be masked and accessed through ^xxx handlers in the scripting language.
|
inherited |
Call processing states offered in core library.
This list must be ordered to match the entries in the state table (statetab).
|
inherited |
ost::BayonneSession::BayonneSession | ( | BayonneDriver * | driver, |
timeslot_t | timeslot, | ||
BayonneSpan * | span = NULL |
||
) |
Create a new session.
driver | to bind. |
timeslot | to bind. |
span | to bind, or NULL if no span associated. |
|
virtual |
Destroy a session.
|
staticinherited |
|
staticinherited |
|
staticinherited |
Add config file entry.
|
staticinherited |
|
staticinherited |
|
static |
bool ost::BayonneSession::addSymbol | ( | const char * | id, |
const char * | value | ||
) |
Add to an existing symbol.
id | of symbol. |
value | to add. |
|
staticinherited |
|
protectedinherited |
Advance program to the next script statement.
|
protectedvirtualinherited |
Allocate memory from either the currently active page, or allocate a new page for the object.
size | size of memory to allocate. |
Reimplemented in SharedMemPager.
|
protectedinherited |
Allocate a string from the memory pager pool and copy the string inti it's new memory area.
This checks only the last active page for available space before allocating a new page.
str | string to allocate and copy into paged memory pool. |
|
staticinherited |
Allocates the maximum number of timeslots the server will use as a whole and attaches a given server to the library.
timeslots | to allocate. |
pointer | to server shell. |
|
staticinherited |
Allocate local script engine sessions, if needed.
|
staticinherited |
|
staticinherited |
void ost::BayonneSession::associate | ( | BayonneSession * | s | ) |
Set new call association.
Used by ACD.
session | to associate with. |
|
inherited |
|
inherited |
Start a script from idle or ringing.
This may use the assign statements to find the script name if none is passed.
event | passed to kick off the script. |
|
virtual |
Get driver default encoding.
|
virtual |
Get driver default extension.
|
virtual |
Get driver default framing.
|
virtual |
ccengine branch event notification.
Used for menudef processing.
Reimplemented from ost::ScriptInterp.
|
inherited |
|
protected |
Check dtmf handling and other nessisities for the interpreter after an event has changed interpreter state.
|
protectedvirtual |
Check audio properties for file and channel audio processing based on the driver specific capabilities of this channel through it's virtual.
true | if for live audio, false if for file only. |
|
protectedinherited |
Clean for memory cleanup before exiting.
|
staticinherited |
|
staticinherited |
|
static |
|
protectedinherited |
Clear the stack of local loops or recursion for branching.
bool ost::BayonneSession::clearSymbol | ( | const char * | id | ) |
Clear an existing symbol.
id | of symbol. |
|
virtual |
Clear/cleanup audio processing for the session.
|
staticinherited |
|
staticinherited |
|
inherited |
|
inherited |
|
staticinherited |
|
staticinherited |
|
inlineinherited |
|
protected |
|
inline |
void ost::BayonneSession::detach | ( | void | ) |
Detach interpreter.
bool ost::BayonneSession::digitEvent | ( | const char * | event | ) |
Throw a digit pattern matching event message to the interprer.
event | message. |
|
protectedvirtual |
Disable dtmf detection for this channel.
|
inherited |
|
staticinherited |
Used to down the server from the library.
|
protectedvirtual |
Enable dtmf detection for this channel.
|
staticinherited |
Release a script image in use.
If no active calls are using it and it's no longer the top active image, purge from memory.
image | to compiled script from useImage. |
|
inlineinherited |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
Enter a co-joined call session; used to notify other services.
Always performed by child node.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
inherited |
Entering a Mutex locks the mutex for the current thread.
This also can be done using the ENTER_CRITICAL macro or by using the ++ operator on a mutex.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
ccengine thread handling.
Reimplemented from ost::ScriptInterp.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
staticinherited |
|
protectedinherited |
Set error variable and advance to either the error handler or next script statement.
error | message. |
|
protectedinherited |
|
inherited |
Runtime execution of script handler.
This can be called in the current or derived class to invoke extensible methods.
method | derived method member to call. |
|
protectedvirtual |
|
protected |
Exit a co-joined call session; used to notify other services.
May happen when a child node exits, drops a recall, or is dropped by a parent.
reason | call is terminated. |
|
virtual |
ccengine thread handling.
Reimplemented from ost::ScriptInterp.
|
staticinherited |
|
staticinherited |
|
protectedvirtual |
virtual to filter incoming events.
event | being sent to channel. |
|
protected |
ccengine.
|
inherited |
|
protectedvirtualinherited |
Allocate first workspace from paged memory.
This method scans all currently allocated blocks for available space before adding new pages and hence is both slower and more efficient.
size | size of memory to allocate. |
Reimplemented in SharedMemPager.
|
protectedinherited |
Allocate a string from the memory pager pool and copy the string into it's new memory area.
This method allocates memory by first searching for an available page, and then allocating a new page if no space is found.
str | string to allocate and copy into paged memory pool. |
|
inherited |
|
inherited |
const char* ost::BayonneSession::getAudio | ( | bool | live = true | ) |
Check script keywords for audio processing.
live | true if for live, else for file processing. |
|
inlinestaticinherited |
|
inline |
|
staticinherited |
Convert a dtmf digit number into it's ascii code.
dtmf | digit number. |
|
inherited |
|
staticinherited |
Convert a dtmf character into a 0-15 number reference.
dtmf | digit as ascii |
char ost::BayonneSession::getDigit | ( | void | ) |
Get the next pending digit in the DTMF input buffer.
const char* ost::BayonneSession::getDigits | ( | void | ) |
|
staticinherited |
|
inline |
|
staticinherited |
|
staticinherited |
|
inline |
|
inline |
const char* ost::BayonneSession::getExitKeyword | ( | const char * | def | ) |
|
virtual |
Process interpreter session symbols.
option | symbol being requested. |
Reimplemented from ost::ScriptInterp.
|
inlineinherited |
|
static |
|
protectedvirtual |
Used by ccengine.
Reimplemented from ost::ScriptInterp.
|
inlineinherited |
|
staticinherited |
|
staticinherited |
unsigned ost::BayonneSession::getInputCount | ( | const char * | digits, |
unsigned | max | ||
) |
|
staticinherited |
|
inline |
|
protectedvirtual |
Return session id for interpreter session command.
id | of session request. |
Reimplemented from ost::ScriptInterp.
|
inherited |
|
inline |
timeout_t ost::BayonneSession::getJoinTimer | ( | void | ) |
Return parent answer timer, if joining.
bool ost::BayonneSession::getKeyBool | ( | const char * | id | ) |
|
inherited |
const char* ost::BayonneSession::getKeyString | ( | const char * | id | ) |
|
inherited |
long ost::BayonneSession::getKeyValue | ( | const char * | id | ) |
|
inherited |
|
inlineprotected |
|
protected |
|
inlineinherited |
|
protectedinherited |
|
staticinherited |
Returns a local image pointer for a server timeslot.
timeslot | number in server. |
|
inlinevirtualinherited |
|
protectedinherited |
|
inherited |
const char* ost::BayonneSession::getMenuKeyword | ( | const char * | def | ) |
timeout_t ost::BayonneSession::getMSecTimeout | ( | const char * | id | ) |
|
inlineinherited |
|
inherited |
|
inherited |
|
inlineinherited |
|
staticinherited |
|
staticinherited |
|
pure virtual |
Return time remaining until timer expires.
Commonly used for msgport scheduling.
|
staticinherited |
Get service level.
return | service level |
|
inherited |
timeout_t ost::BayonneSession::getSecTimeout | ( | const char * | id | ) |
|
inlineinherited |
|
staticinherited |
Returns a session pointer for a server timeslot.
Each server timeslot can map to a single session object.
timeslot | number in server. |
|
inline |
|
inline |
|
inline |
|
inline |
|
staticinherited |
Returns a session pointer for a string identifier.
This can be for a transaction id, a call id, or other unique identifiers which can be mapped into a single timeslot.
id | session identifier string. |
|
inline |
|
inline |
|
staticinherited |
Map a state name into a handler.
Used for logging requests. Uses the statetab.
name | of state to lookup. |
|
inherited |
|
inherited |
|
inherited |
|
protectedvirtual |
Return ccengine symbol page map.
Gives access to globals.
id | table of symbols. |
Reimplemented from ost::ScriptInterp.
|
inherited |
|
inherited |
|
inherited |
|
staticinherited |
|
inline |
|
inherited |
timeout_t ost::BayonneSession::getTimeoutKeyword | ( | const char * | kw | ) |
timeout_t ost::BayonneSession::getTimeoutValue | ( | const char * | opt = NULL | ) |
|
inline |
|
inlinestaticinherited |
|
inlinestaticinherited |
|
virtual |
Get frame rate used for creating tone generators.
|
inlineinherited |
|
inline |
|
inline |
|
staticinherited |
|
inherited |
|
protected |
|
protectedinherited |
Branch to a selected event record immediately.
event | record pointer to access. |
|
inherited |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void ost::BayonneSession::initialevent | ( | void | ) |
Initial kickoff event.
|
virtual |
Initialine ccengine script environment.
Reimplemented from ost::ScriptInterp.
|
protectedinherited |
Initialize execution environment for a script.
bool ost::BayonneSession::isAssociated | ( | void | ) |
Return state of association with parent in call.
bool ost::BayonneSession::isDisconnecting | ( | void | ) |
Return state disconnecting or idle...
|
inlineinherited |
|
staticinherited |
|
staticinherited |
|
inline |
bool ost::BayonneSession::isJoined | ( | void | ) |
Return state of join.
|
protected |
|
protectedvirtualinherited |
|
inline |
|
staticinherited |
|
staticinherited |
bool ost::BayonneSession::isRefer | ( | void | ) |
Return if currently referring.
|
inlineinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
inlineinherited |
|
inherited |
Leaving a mutex frees that mutex for use by another thread.
If the mutex has been entered (invoked) multiple times (recursivily) by the same thread, then it will need to be exited the same number of instances before it is free for re-use. This operation can also be done using the LEAVE_CRITICAL macro or by the – operator on a mutex.
|
protected |
|
protected |
Write libexec...
string | to write. |
|
staticinherited |
Load a bgm/audio processing module for continues audio.
path | id of plugin. |
|
staticinherited |
Load a monitoring/management module.
path | id of plugin. |
|
staticinherited |
Load a plugin module.
path | id of plugin. |
|
virtualinherited |
|
virtualinherited |
|
inherited |
|
virtual |
Handles driver specific stuff when going idle.
|
inherited |
|
inherited |
|
staticinherited |
A function to support pattern matching and templates for digit strings.
This is used for digit @xxx:... entries and the route command.
digits | to use. |
match | digit pattern to match against. |
partial | accept match if true. |
bool ost::BayonneSession::matchLine | ( | Line * | line | ) |
|
inherited |
Compute md5 hashes...
md5 | output string |
string | to hash |
|
inlineinherited |
uint32 ost::BayonneSession::newTid | ( | void | ) |
Compute a new unique transaction id.
These are like pids and are often used to assure transaction coherence, such as in the libexec system.
|
inherited |
void ost::BayonneSession::part | ( | event_t | reason | ) |
Disconnect notify peer...
reason | event id to pass |
|
virtual |
Post a peer audio frame into the driver.
The frame is assumed to either be in the format used for global peering, or, if the driver supports setPeering, perhaps in the session selected format.
encoded | audio frame to peer. |
|
virtual |
Indicate whether session peers audio as linear frames.
|
virtual |
Post an event to the session state engine.
event | being posted. |
|
protectedinherited |
Attempt to recall a previous stack level.
|
protectedinherited |
|
protectedinherited |
Attempt to push a value onto the stack.
|
protected |
Direct method to post an event to a channel.
event | being posted. |
|
inherited |
|
virtual |
queue an event through the msgport.
event | to queue. |
|
protected |
Attempt to readjust encoding of active session for recall.
|
protectedinherited |
|
protectedinherited |
|
inherited |
Release any acquired lock...
|
staticinherited |
Request active scripts to be recompiled from the library.
|
protectedvirtualinherited |
|
protected |
|
protected |
Used to indicate commands which require dtmf handling to be enabled.
|
protectedinherited |
|
protectedinherited |
Events reference to named @event handlers which have been attached to a script.
This allows low level applications to invoke an event handler much the way a signal handler occurs.
name | of event handler. |
inhereted | search flag. |
|
staticinherited |
Sets server service level from the library.
service | level or NULL to clear. |
|
protected |
Set the session to the connecting (join) state or run state based on flags and circumstances from seize/pickup.
|
inherited |
|
inlinestaticinherited |
|
inherited |
|
static |
|
protected |
Set the result of a libexec initiated process and change state to libexec.
Return false if no libexec support, or if not currently libexecing...
result | code to set. |
|
protected |
Set the result of a libexec initiated process and execute a reset timer interval.
This is used to schedule reset hang time before resuming libexec.
result | code to set. |
|
inherited |
|
virtual |
Set the port hook state.
Mostly for analog devices.
state | true to set offhook, false onhook. |
|
virtual |
Set peer audio encoding to the encoding type and framing specified by peer on drivers which can switch encoding.
This can enable audio conversions to be bypassed.
encoding | format requested. |
framing | timer to use. |
|
protected |
Attempt to readjust encoding of active session if supported.
encoding | to try |
timeout | to use |
|
protected |
Set the session to the running state, resume interpreter or libexec.
|
protected |
Compute a uneque call session id for the current call on the current session object.
Also a great key for cdr records.
|
protected |
Set the session to a new state.
|
inherited |
|
inherited |
Signals are used during "delayed" execution steps when a signal event has occured aynchronously with the execution of a script controlled state event handler.
This mechanism can be used in place of calling implicit "Step" traps.
name | of signal identifier. |
|
inherited |
Signals can be referenced by numeric id as well as by symbolic name.
id | number of handler. |
bool ost::BayonneSession::signalScript | ( | signal_t | signal | ) |
Signal notification to script.
signal | to send to script engine. |
|
static |
|
protectedinherited |
Skip line without checking or setting updates.
|
staticinherited |
|
inline |
|
staticinherited |
Start a dialing session.
WARNING: this function leaves the channel locked so it can be examined by the returning task.
dialing | string or uri. |
script | to run or start. |
caller | id for this call. |
display | name for this call. |
parent | to join to. |
|
virtual |
ccengine thread handling.
Reimplemented from ost::ScriptInterp.
|
pure virtual |
Start a timer on the session.
Used extensivily in state handler code.
timer | to start for specified milliseconds. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inherited |
|
pure virtual |
Stop the timer for the session.
Used extensivily in state handler code.
|
staticinherited |
|
staticinherited |
|
inline |
|
staticinherited |
|
staticinherited |
|
inlineinherited |
|
staticinherited |
Returns a server timeslot number for a string identifier.
id | for a session. |
|
protectedinherited |
Set the execution interpreter to a trap identifier.
If no trap id exists, then advance to next script statement (unless exit trap).
id | of trap to select numerically. |
|
protectedinherited |
Select trap by symbolic name and execute if found, else advance to next script step (unless exit trap).
name | of trap to select. |
|
protectedinherited |
Tries a catch handler...
id | of catch handler to try. |
|
inherited |
Tries to lock the mutex for the current thread.
Behaves like enterMutex , except that it doesn't block the calling thread if the mutex is already locked by another thread.
|
staticinherited |
Get server uptime.
|
staticinherited |
|
staticinherited |
|
staticinherited |
Use the current compiled script image; mark as in use.
|
staticinherited |
Wait for live flag...
|
protectedvirtualinherited |
|
friend |
|
friend |
|
friend |
|
friend |
BayonneAudio ost::BayonneSession::audio |
|
protectedinherited |
|
protected |
|
staticprotected |
|
staticprotectedinherited |
|
staticprotectedinherited |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
staticinherited |
|
staticprotected |
|
staticinherited |
|
inherited |
|
inherited |
|
staticprotectedinherited |
|
staticprotectedinherited |
|
protected |
|
inherited |
|
inherited |
|
private |
|
staticprotectedinherited |
|
staticprotectedinherited |
|
staticprotectedinherited |
|
protected |
|
private |
|
staticinherited |
|
protectedinherited |
|
staticinherited |
|
staticprotectedinherited |
|
protectedinherited |
|
protected |
|
staticinherited |
|
protectedinherited |
|
protected |
|
staticprotectedinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
protected |
|
staticprotectedinherited |
|
staticprotectedinherited |
|
staticprotectedinherited |
|
protected |
|
protected |