#include <cc++/bayonnescript.h>#include <cc++/bayonnesymbols.h>#include <cc++/url.h>#include <cc++/slog.h>#include <cc++/file.h>#include <cc++/socket.h>#include <cc++/buffer.h>#include <cc++/bayonneaudio.h>#include <iostream>#include <fstream>#include <cstdlib>#include <climits>Go to the source code of this file.
Classes | |
| struct | execdata_t |
| union | trunkdata_t |
| struct | TrunkEvent |
| struct | statnode_t |
| class | CallStat |
| A call statistic class is used to manipulate call stats with a mutex lock to prevent errors during "adjustment" periods.call statistic collection object. More... | |
| class | Translator |
| Phrasebook modules are used to convert things like numbers into sets of prompts that form spoken words.phrase translations dso base for tts. More... | |
| class | KeyTones |
| Load /etc/bayonne [tones] key values for user defined tone sets.Load and build user defined tones. More... | |
| class | KeyLocal |
| Load localization rules from [localize].Load localization rules. More... | |
| class | KeyVoices |
| Load /etc/bayonne [voices] to select and map voice libraries to different translators.Load interpreter imports to use. More... | |
| class | KeyPaths |
| Load /etc/bayoone [paths] key value pairs.Load keypaths path location configuration data. More... | |
| class | KeyNetwork |
| Load /etc/bayonne [network] key value pairs.Load database access bindings. More... | |
| class | KeyProxy |
| Load proxy settings and provide access to proxy info.Load proxy info. More... | |
| class | KeyMemory |
| Load /etc/bayonne [memory] key value pairs.Load memory related options. More... | |
| class | KeyThreads |
| Load /etc/bayonne [thread] key value pairs.Load keythreads priority and session count configuration. More... | |
| class | Conference |
| A base class new for driver conference resource objects.Conference object resource. More... | |
| class | Keyroute |
| The Keyroute class is a container of routing information that associates a route key, such as a telephone number, with a data element such as a scriptname or start path.Route key data object. More... | |
| class | Keyroute::key |
| class | TrunkGroup |
| Trunk "groups" provide keydata configuration information that apply to a group of trunk ports represented under a common "group" identity.Trunk group configuration. More... | |
| class | KeyServer |
| This class is a cache for server specific configuration information which may be configured from /etc/bayonne.conf [server].load server configuration data. More... | |
| class | Plugins |
| This class is used to load and manage "plugin" modules as called for in /etc/bayonne.conf [plugins].Load and manage plugins support. More... | |
| class | aaScript |
| We derive a Bayonne server version of ScriptCommand, aaScript, which holds most common elements of the script engine for Bayonne use.Bayonne script dialect. More... | |
| class | aaImage |
| We derive a Bayonne compiler and script image container, aaImage, to hold active script sets for the trunk class script engine.Bayonne script image. More... | |
| class | PortNotify |
| The PortNotify class is used to buffer and pass port notify events, which, in the past, when used in some drivers, were typically done with a "pipe" and a select or poll call.Bayonne driver port notification events. More... | |
| class | EventBuffer |
| The EventBuffer class is used to buffer and pass port trunks events, which, in the past, when used in some drivers, were typically done with a "pipe" and a select or poll call.Bayonne event record buffering. More... | |
| class | AudioBuffer |
| The AudioBuffer class is for mixing one-to-one soft joins.Bayonne audio mixer. More... | |
| class | Trunk |
| We derive a Bayonne server version of ScriptInterp, "Trunk", which holds most common elements of the script engine for Bayonne use.Bayonne channel port script engine. More... | |
| class | Trunk::Threaded |
| class | Trunk::Database |
| union | Trunk::Number |
| union | Trunk::Digit |
| class | Fifo |
| The system fifo is a class that both handles a fifo "control interface" and that can process string commands as events through the Bayonne driver.Bayonne fifo command executive. More... | |
| class | Driver |
| The driver class represents an abstract means of accessing the internals of a Bayonne driver plug-in module.Bayonne driver interface class. More... | |
| class | Debug |
| New DSO class for installing a "debugging" or "monitor" plugin.Regression test/debug DSO interface. More... | |
| class | AudioService |
| AudioService holds the logic for processing audio channels.audio service processing. More... | |
| class | Service |
| Services are threads used to support a trunk class, such as audio services used for audio, etc.service thread support. More... | |
| class | Server |
| Server classes are used for threaded entities such as network management interfaces, which may be started and stopped under server control.threaded server service. More... | |
| class | Sync |
| The Sync class is used to create dso objects which have entites that are repetitivly called through the scheduler thread. More... | |
| class | phTone |
| The tone class is used to build sampled single and dual frequency tones that may be fed to the telephony device.generated sample tone. More... | |
| class | TGI |
| This class is used for interfacing to DSO loaded TGI interpreters.TGI interpreter module. More... | |
| class | TTS |
| The tts syth classes intercept core functions as needed to create an interface to a native text to speech subsystem, usually by manipulating data.play. More... | |
| class | Session |
| Sessions are used for "garbage collected" entities which may be detached and removed after an expiration time rather than falling out of scope immediately.Garbage collectable objects. More... | |
Defines | |
| #define | PIPE_BUF 512 |
| #define | MAX_DIGITS 48 |
| #define | MAX_NAME_LEN 64 |
| #define | TRUNK_CAP_VOICE 0x00000001 |
| #define | TRUNK_CAP_DIAL 0x00000002 |
| #define | TRUNK_CAP_SENDFAX 0x00000004 |
| #define | TRUNK_CAP_RECVFAX 0x00000008 |
| #define | TRUNK_CAP_DATA 0x00000010 |
| #define | TRUNK_CAP_TTS 0x00000020 |
| #define | TRUNK_CAP_ASR 0x00000040 |
| #define | TRUNK_CAP_STATION 0x00000080 |
| #define | TRUNK_CAP_TIE 0x00000160 |
| #define | TRUNK_CAP_TRUNK 0x00002000 |
| #define | MAX_SPANS 64 |
| #define | MAX_CARDS 64 |
Enumerations | |
| enum | seltype_t { SELECT_FIRST, SELECT_LAST } |
| enum | joinmode_t { JOIN_RECV, JOIN_XMIT, JOIN_FULL } |
| enum | dialmode_t { PULSE_DIALER, DTMF_DIALER, MF_DIALER } |
| enum | trunkstep_t { TRUNK_STEP_HANGUP = 0, TRUNK_STEP_SLEEP, TRUNK_STEP_ACCEPT, TRUNK_STEP_REJECT, TRUNK_STEP_ANSWER, TRUNK_STEP_COLLECT, TRUNK_STEP_PLAY, TRUNK_STEP_PLAYWAIT, TRUNK_STEP_RECORD, TRUNK_STEP_TONE, TRUNK_STEP_DIALXFER, TRUNK_STEP_SOFTDIAL, TRUNK_STEP_FLASH, TRUNK_STEP_JOIN, TRUNK_STEP_LISTEN, TRUNK_STEP_RTP, TRUNK_STEP_DUPLEX, TRUNK_STEP_DETECT, TRUNK_STEP_REQUIRES, TRUNK_STEP_THREAD, TRUNK_STEP_SENDFAX, TRUNK_STEP_RECVFAX, TRUNK_STEP_ENTER, TRUNK_STEP_SOFTJOIN, TRUNK_STEP_DRIVER, TRUNK_STEP_EXIT = TRUNK_STEP_HANGUP } |
| enum | trunksignal_t { TRUNK_SIGNAL_STEP = 0, TRUNK_SIGNAL_EXIT, TRUNK_SIGNAL_HANGUP = TRUNK_SIGNAL_EXIT, TRUNK_SIGNAL_ERROR, TRUNK_SIGNAL_TIMEOUT, TRUNK_SIGNAL_DTMF, TRUNK_SIGNAL_0, TRUNK_SIGNAL_1, TRUNK_SIGNAL_2, TRUNK_SIGNAL_3, TRUNK_SIGNAL_4, TRUNK_SIGNAL_5, TRUNK_SIGNAL_6, TRUNK_SIGNAL_7, TRUNK_SIGNAL_8, TRUNK_SIGNAL_9, TRUNK_SIGNAL_STAR, TRUNK_SIGNAL_POUND, TRUNK_SIGNAL_A, TRUNK_SIGNAL_OVERRIDE = TRUNK_SIGNAL_A, TRUNK_SIGNAL_B, TRUNK_SIGNAL_FLASH = TRUNK_SIGNAL_B, TRUNK_SIGNAL_C, TRUNK_SIGNAL_IMMEDIATE = TRUNK_SIGNAL_C, TRUNK_SIGNAL_D, TRUNK_SIGNAL_PRIORITY = TRUNK_SIGNAL_D, TRUNK_SIGNAL_SILENCE, TRUNK_SIGNAL_BUSY, TRUNK_SIGNAL_CANCEL, TRUNK_SIGNAL_FAIL = TRUNK_SIGNAL_CANCEL, TRUNK_SIGNAL_INVALID = TRUNK_SIGNAL_CANCEL, TRUNK_SIGNAL_NOTIFY, TRUNK_SIGNAL_NOANSWER, TRUNK_SIGNAL_RING, TRUNK_SIGNAL_ANSWER = TRUNK_SIGNAL_RING, TRUNK_SIGNAL_PICKUP = TRUNK_SIGNAL_RING, TRUNK_SIGNAL_TONE, TRUNK_SIGNAL_EVENT, TRUNK_SIGNAL_TIME, TRUNK_SIGNAL_MAXTIME = TRUNK_SIGNAL_TIME, TRUNK_SIGNAL_CHILD, TRUNK_SIGNAL_DRIVER, TRUNK_SIGNAL_GOTO = 65 } |
| enum | trunkevent_t { TRUNK_ENTER_STATE = 100, TRUNK_EXIT_STATE, TRUNK_STOP_STATE, TRUNK_NOTIFICATION, TRUNK_SERVICE_SUCCESS, TRUNK_SERVICE_FAILURE, TRUNK_SERVICE_LOGIN, TRUNK_SIGNAL_TEXT, TRUNK_SEND_MESSAGE, TRUNK_JOIN_TRUNKS, TRUNK_PART_TRUNKS, TRUNK_NULL_EVENT, TRUNK_CHILD_START, TRUNK_CHILD_FAIL, TRUNK_CHILD_EXIT, TRUNK_SIGNAL_JOIN, TRUNK_FAX_EVENT, TRUNK_EXIT_SHELL = 200, TRUNK_START_DIAL, TRUNK_START_SCRIPT, TRUNK_RING_START, TRUNK_RING_REDIRECT, TRUNK_STOP_DISCONNECT, TRUNK_SHELL_START, TRUNK_WAIT_SHELL, TRUNK_ASR_START, TRUNK_ASR_TEXT, TRUNK_ASR_PARTIAL, TRUNK_ASR_VOICE, TRUNK_SYNC_PARENT, TRUNK_SYNC_NOTIFY, TRUNK_START_INCOMING = TRUNK_RING_START, TRUNK_START_OUTGOING = TRUNK_START_SCRIPT, TRUNK_MAKE_TEST = 300, TRUNK_MAKE_BUSY, TRUNK_MAKE_IDLE, TRUNK_MAKE_STEP, TRUNK_MAKE_STANDBY, TRUNK_LINE_WINK = 400, TRUNK_TIMER_EXPIRED, TRUNK_TIMER_EXIT, TRUNK_TIMER_SYNC, TRUNK_RINGING_ON, TRUNK_RINGING_OFF, TRUNK_TEST_IDLE, TRUNK_TEST_FAILURE, TRUNK_ON_HOOK, TRUNK_OFF_HOOK, TRUNK_CALLER_ID, TRUNK_RINGING_DID, TRUNK_CALL_DETECT, TRUNK_CALL_CONNECT, TRUNK_CALL_RELEASE, TRUNK_CALL_ACCEPT, TRUNK_CALL_ANSWERED, TRUNK_CALL_HOLD, TRUNK_CALL_NOHOLD, TRUNK_CALL_DIGITS, TRUNK_CALL_OFFER, TRUNK_CALL_ANI, TRUNK_CALL_ACTIVE, TRUNK_CALL_NOACTIVE, TRUNK_CALL_BILLING, TRUNK_CALL_RESTART, TRUNK_CALL_SETSTATE, TRUNK_CALL_FAILURE, TRUNK_CALL_ALERTING, TRUNK_CALL_INFO, TRUNK_CALL_BUSY, TRUNK_CALL_DIVERT, TRUNK_CALL_FACILITY, TRUNK_CALL_FRAME, TRUNK_CALL_NOTIFY, TRUNK_CALL_NSI, TRUNK_CALL_RINGING, TRUNK_CALL_DISCONNECT, TRUNK_DEVICE_OPEN, TRUNK_DEVICE_CLOSE, TRUNK_DEVICE_BLOCKED, TRUNK_DEVICE_UNBLOCKED, TRUNK_CALL_OUTGOING, TRUNK_CALL_INCOMING, TRUNK_AUDIO_IDLE = 500, TRUNK_INPUT_PENDING, TRUNK_OUTPUT_PENDING, TRUNK_AUDIO_BUFFER, TRUNK_TONE_IDLE, TRUNK_DTMF_KEYDOWN, TRUNK_DTMF_KEYUP, TRUNK_TONE_START, TRUNK_TONE_STOP, TRUNK_VOX_DETECT, TRUNK_VOX_SILENCE, TRUNK_AUDIO_START, TRUNK_AUDIO_STOP, TRUNK_CPA_DIALTONE, TRUNK_CPA_BUSYTONE, TRUNK_CPA_RINGING, TRUNK_CPA_RINGBACK = TRUNK_CPA_RINGING, TRUNK_CPA_INTERCEPT, TRUNK_CPA_NODIALTONE, TRUNK_CPA_NORINGBACK, TRUNK_CPA_NOANSWER, TRUNK_CPA_CONNECT, TRUNK_CPA_FAILURE, TRUNK_CPA_GRUNT, TRUNK_CPA_REORDER, TRUNK_DSP_READY, TRUNK_CPA_STOPPED, TRUNK_CPA_SIT, TRUNK_CPA_WAITING, TRUNK_START_RINGING = 600, TRUNK_START_TRANSFER, TRUNK_START_INTERCOM, TRUNK_START_RECALL, TRUNK_START_DIALING, TRUNK_STOP_RINGING, TRUNK_STATION_OFFHOOK, TRUNK_STATION_ONHOOK, TRUNK_STATION_FLASH, TRUNK_STATION_ANSWER, TRUNK_STATION_PICKUP, TRUNK_STATION_CONNECT, TRUNK_DRIVER_SPECIFIC = 8000 } |
| enum | dspmode_t { DSP_MODE_INACTIVE = 0, DSP_MODE_VOICE, DSP_MODE_CALLERID, DSP_MODE_DATA, DSP_MODE_FAX, DSP_MODE_TDM, DSP_MODE_RTP, DSP_MODE_DUPLEX, DSP_MODE_JOIN, DSP_MODE_CONF, DSP_MODE_TONE } |
| enum | trunkmode_t { TRUNK_MODE_INCOMING = 0, TRUNK_MODE_OUTGOING, TRUNK_MODE_INACTIVE, TRUNK_MODE_UNAVAILABLE } |
| enum | statitem_t { STAT_MAX_INCOMING, STAT_MAX_OUTGOING, STAT_TOT_INCOMING, STAT_TOT_OUTGOING, STAT_ACTIVE_CALLS, STAT_NOW_INCOMING, STAT_NOW_OUTGOING, STAT_SYS_INCOMING, STAT_SYS_OUTGOING, STAT_SYS_UPTIME, STAT_SYS_ACTIVITY, STAT_CURRENT_CALLS, STAT_CMAX_INCOMING, STAT_CMAX_OUTGOING, STAT_AVAIL_CALLS } |
| enum | playmode_t { PLAY_MODE_NORMAL, PLAY_MODE_ONE, PLAY_MODE_ANY, PLAY_MODE_TEMP, PLAY_MODE_TEXT, PLAY_MODE_FILE, PLAY_MODE_MOH, PLAY_MODE_NONE } |
| enum | writemode_t { WRITE_MODE_NONE, WRITE_MODE_REPLACE, WRITE_MODE_APPEND, WRITE_MODE_INITIAL } |
| enum | ttsmode_t { TTS_GATEWAY_TEXT, TTS_GATEWAY_FILE } |
| enum | trunkspeed_t { SPEED_FAST, SPEED_SLOW, SPEED_NORMAL } |
Functions | |
| __EXPORT bool | getLogical (const char *string) |
| __EXPORT timeout_t | getSecTimeout (const char *string) |
| __EXPORT timeout_t | getMSTimeout (const char *string) |
| __EXPORT timeout_t | getTimePosition (const char *string) |
| __EXPORT void | setReply (const char *sym, const char *value) |
| __EXPORT void | errlog (const char *level, const char *fmt,...) |
| __EXPORT statnode_t * | getNodes (const char *name) |
| __EXPORT bool | hasTTS (void) |
| __EXPORT bool | permitAudioAccess (const char *path, bool write) |
| __EXPORT bool | permitFileAccess (const char *path) |
| __EXPORT void | initScripting (void) |
Variables | |
| __EXPORT | Trunk |
| __EXPORT | TrunkImage |
| __EXPORT | Service |
| __EXPORT | phTone |
| __EXPORT | TrunkGroup |
| __EXPORT | AudioBuffer |
| __EXPORT | Conference |
| __EXPORT | UsageStat |
| __EXPORT KeyThreads | keythreads |
| __EXPORT unsigned | numbering |
| __EXPORT bool | aliases |
| __EXPORT bool | running |
| __EXPORT KeyServer | keyserver |
| __EXPORT KeyMemory | keymemory |
| __EXPORT KeyPaths | keypaths |
| __EXPORT KeyVoices | keyvoices |
| __EXPORT KeyLocal | keylocal |
| __EXPORT KeyNetwork | keynetwork |
| __EXPORT KeyProxy | keyproxy |
| __EXPORT Plugins | plugins |
| __EXPORT Debug * | debug |
| __EXPORT Fifo | fifo |
| __EXPORT ThreadLock | cachelock |
| __EXPORT aaScript * | aascript |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.4