38 #ifndef CCXX_BAYONNE_H_
39 #define CCXX_BAYONNE_H_
41 #ifndef CCXX_SCRIPT3_H_
45 #ifndef CCXX_CCAUDIO2_H_
49 #ifndef CCXX_SOCKET_H_
53 #define BAYONNE_RELEASE 1 // release check sequence
54 #define NO_TIMESLOT 0xffff
57 #define MAX_LIBINPUT 256
58 #define MAX_PATHNAME 256
59 #define MIN_AUDIOFEED (120 * 8) // 120 millisecond starting
60 #define MAX_AUDIOFEED (600 * 8) // 600 millisecond buffer
61 #define RPC_MAX_PARAMS 96
64 #define PFD_INVALID INVALID_HANDLE_VALUE
66 #define PFD_INVALID -1
69 #if SCRIPT_RIPPLE_LEVEL < 2
70 #error "ccscript 3 0.8.0 or later required"
74 #define SLOG_DEBUG(x, ...) slog.debug(x, __VA_ARGS__)
76 #define SLOG_DEBUG(x, ...)
114 virtual void clearBuffer(
timeout_t duration);
131 virtual bool isActive(
void);
139 virtual unsigned long getPosition(
timeout_t framing);
165 {
return getLast(
id);};
168 {
return getLong(
id);};
171 {
return getBool(
id);};
194 void loadConfig(
void);
197 virtual void updateConfig(
Keydata *keydata);
202 const char *getString(
const char *key,
char *buf,
size_t size);
203 long getValue(
const char *key);
204 bool isKey(
const char *key);
205 bool getBoolean(
const char *key);
207 static void reload(
void);
222 const char *updatedString(
const char *
id);
223 long updatedValue(
const char *
id);
224 timeout_t updatedSecTimer(
const char *
id);
225 timeout_t updatedMsecTimer(
const char *
id);
226 bool updatedBoolean(
const char *
id);
236 const char *getString(
const char *key,
char *buf,
size_t size);
239 long getValue(
const char *key);
240 bool isKey(
const char *key);
241 bool getBoolean(
const char *key);
256 static struct sockaddr_in trap_addr4[8];
260 static unsigned trap_count6;
261 static struct sockaddr_in6 trap_addr6[8];
265 static char dtmf_keymap[256];
267 static void snmptrap(
unsigned id,
const char *descr = NULL);
402 STATE_SUSPEND = STATE_DOWN,
403 STATE_STANDBY = STATE_DOWN,
404 STATE_LIBEXEC = STATE_EXEC,
405 STATE_RINGING = STATE_RING,
406 STATE_RUNNING = STATE_STEP,
407 STATE_THREADING = STATE_THREAD
434 SIGNAL_OVERRIDE = SIGNAL_A,
436 SIGNAL_FLASH = SIGNAL_B,
438 SIGNAL_IMMEDIATE = SIGNAL_C,
440 SIGNAL_PRIORITY = SIGNAL_D,
456 SIGNAL_HANGUP = SIGNAL_EXIT
516 START_SCRIPT = START_INCOMING,
517 START_SELECTED = START_OUTGOING,
518 START_TRANSFER = START_REFER,
570 CALL_HOLDING=CALL_HOLD,
615 DIAL_MACHINE = DIAL_PAM,
641 DTMF_GENTONE = DTMF_GENUP,
670 ENTER_RESUME = MAKE_UP,
671 ENTER_SUSPEND = MAKE_DOWN,
679 DRIVER_SPECIFIC = 1000
691 RESULT_BADPATH = 254,
832 static void detach(
Ring *list);
852 volatile unsigned long iCount, oCount;
972 const char *pathv[4];
989 unsigned count,
size, required;
1016 unsigned char digits[64];
1072 static const char *getRegistryId(
const char *
id);
1081 static void allocateLocal(
void);
1086 static void addConfig(
const char *cfgfile);
1094 void md5_hash(
char *out,
const char *source);
1099 static void waitLoaded(
void);
1106 static unsigned long uptime(
void);
1118 static void down(
void);
1126 static bool service(
const char *service);
1133 static const char *getRunLevel(
void);
1164 const char *name,
const char *caller,
const char *display,
1166 const char *secret = NULL);
1185 static timeslot_t toTimeslot(
const char *
id);
1219 static Handler getState(
const char *name);
1227 static int getDigit(
char dtmf);
1235 static char getChar(
int dtmf);
1247 static bool matchDigits(
const char *digits,
const char *match,
bool partial =
false);
1270 static bool loadPlugin(
const char *path);
1278 static bool loadMonitor(
const char *path);
1286 static bool loadAudio(
const char *path);
1288 static void errlog(
const char *level,
const char *fmt, ...);
1290 static bool getUserdata(
void);
1292 static void addTrap4(
const char *addr);
1294 static void addTrap6(
const char *addr);
1319 } zeroconf_family_t;
1333 {
return zeroconf_first;};
1341 {
return zeroconf_next;};
1349 {
return zeroconf_type;};
1357 {
return zeroconf_port;};
1360 {
return zeroconf_family;};
1381 void setEnv(
const char *
id);
1401 static unsigned addItem(
BayonneSession *s,
unsigned count,
const char *text);
1456 virtual unsigned digits(
BayonneSession *sessiob,
unsigned count,
const char *
string);
1466 virtual unsigned spell(
BayonneSession *session,
unsigned count,
const char *
string);
1476 virtual unsigned sayorder(
BayonneSession *session,
unsigned count,
const char *
string);
1486 virtual unsigned number(
BayonneSession *session,
unsigned count,
const char *
string);
1497 virtual unsigned saynumber(
BayonneSession *session,
unsigned count,
const char *
string);
1507 virtual unsigned saycount(
BayonneSession *session,
unsigned count,
const char *
string);
1517 virtual unsigned sayhour(
BayonneSession *session,
unsigned count,
const char *
string);
1527 virtual unsigned saytime(
BayonneSession *session,
unsigned count,
const char *
string);
1537 virtual unsigned weekday(
BayonneSession *session,
unsigned count,
const char *
string);
1547 virtual unsigned sayday(
BayonneSession *session,
unsigned count,
const char *
string);
1557 virtual unsigned saydate(
BayonneSession *session,
unsigned count,
const char *
string);
1567 virtual unsigned saybool(
BayonneSession *session,
unsigned count,
const char *
string);
1577 virtual unsigned phone(
BayonneSession *session,
unsigned count,
const char *
string);
1587 virtual unsigned extension(
BayonneSession *session,
unsigned count,
const char *
string);
1596 virtual const char *speak(
BayonneSession *session, Line *line = NULL);
1620 char *getContinuation(
void);
1640 const char *extension, *
voicelib, *libext, *prefixdir, *offset;
1643 char var_position[14];
1657 const char *getFilename(
const char *name,
bool write =
false);
1671 void play(
const char **list,
Mode mode = modeRead);
1680 void record(
const char *name,
Mode mode = modeCreate,
const char *annotation = NULL);
1688 const char *getVoicelib(
const char *iso);
1747 void shutdown(
void);
1760 size_t onWait(
void *buf);
1761 size_t onPost(
void *buf);
1762 size_t onPeek(
void *buf);
1807 virtual void reloadDriver(
void);
1813 virtual void startDriver(
void);
1818 virtual void stopDriver(
void);
1824 void relistIdle(
void);
1835 virtual bool isAuthorized(
const char *userid,
const char *secret);
1837 virtual bool deregister(
const char *
id);
1838 virtual bool reregister(
const char *
id,
const char *uri,
const char *secret,
timeout_t expires);
1874 {
return trunkDriver;}
1880 {
return firstDriver;}
1889 static BayonneDriver *authorize(
const char *userid,
const char *secret);
1895 {
return nextDriver;};
1898 {
return firstDriver;};
1904 {
return protoDriver;}
1918 virtual bool suspend(
void);
1925 virtual bool resume(
void);
1930 virtual void reregister(
void);
1939 virtual const char *registerScript(
ScriptImage *image, Line *line);
1948 virtual const char *assignScript(
ScriptImage *image, Line *line);
1981 static BayonneDriver *loadProtocol(
const char *
id,
unsigned timeslots = 0);
1990 static unsigned list(
char **items,
unsigned max);
1995 static void start(
void);
2000 static void stop(
void);
2005 static void reload(
void);
2070 {
return reset_timer;};
2078 {
return release_timer;};
2086 {
return hangup_timer;};
2094 {
return pickup_timer;};
2102 {
return seize_timer;};
2110 {
return hunt_timer;};
2118 {
return flash_timer;};
2126 {
return interdigit_timer;};
2136 {
return ring_timer;};
2144 {
return answer_count;};
2177 {
return audio_stack;};
2185 {
return audio_priority;};
2193 {
return audio_level;};
2201 {logevents = output;};
2209 inline bool isSpanable(
unsigned span);
2221 virtual bool getDestination(
const char *target,
const char *dial,
char *output,
size_t size);
2238 virtual bool isExternal(
const char *dest);
2246 virtual bool isRegistered(
const char *dest);
2254 virtual bool isAvailable(
const char *dest);
2263 virtual bool isReachable(
const char *proxy);
2274 virtual unsigned getRegistration(regauth_t *data,
unsigned count,
const char *
id = NULL);
2333 static void allocate(
unsigned total = 0);
2381 {
return count - used;}
2388 virtual bool suspend(
void);
2395 virtual bool resume(
void);
2402 virtual bool reset(
void);
2421 unsigned gatherPrefix(
const char *prefix,
const char **list,
unsigned max);
2425 virtual const char *submit(
const char **data);
2429 virtual unsigned destinations(Image *img,
const char **array,
unsigned max);
2431 virtual bool isDestination(Image *img,
const char *name);
2435 bool scriptEvent(
ScriptInterp *interp,
const char *evt);
2437 bool digitEvent(
ScriptInterp *interp,
const char *evt);
2448 static const char *submitRequest(
const char **data);
2452 static unsigned gatherDestinations(
ScriptImage *img,
const char **index,
unsigned max);
2454 static bool isDestination(
const char *name);
2493 bool offhook, dtmf, answered,
starting, holding, connecting, referring;
2510 bool requiresDTMF(
void);
2516 void enterCall(
void);
2525 void exitCall(
const char *reason);
2532 virtual bool enableDTMF(
void);
2537 virtual void disableDTMF(
void);
2547 virtual const char *checkAudio(
bool live);
2555 virtual bool filterPosting(
Event *event);
2557 virtual bool enterCommon(
Event *event);
2558 virtual bool enterInitial(
Event *event);
2559 virtual bool enterFinal(
Event *event);
2560 virtual bool enterIdle(
Event *event);
2561 virtual bool enterReset(
Event *event);
2562 virtual bool enterRelease(
Event *event);
2563 virtual bool enterRinging(
Event *event);
2564 virtual bool enterPickup(
Event *event);
2565 virtual bool enterAnswer(
Event *event);
2566 virtual bool enterSeize(
Event *event);
2567 virtual bool enterHunting(
Event *event);
2568 virtual bool enterHangup(
Event *event);
2569 virtual bool enterTone(
Event *event);
2570 virtual bool enterReconnect(
Event *event);
2571 virtual bool enterDTMF(
Event *event);
2572 virtual bool enterPlay(
Event *event);
2573 virtual bool enterRecord(
Event *event);
2574 virtual bool enterJoin(
Event *event);
2575 virtual bool enterWait(
Event *event);
2576 virtual bool enterDial(
Event *event);
2577 virtual bool enterBusy(
Event *event);
2578 virtual bool enterStandby(
Event *event);
2579 virtual bool enterXfer(
Event *event);
2580 virtual bool enterRefer(
Event *event);
2581 virtual bool enterHold(
Event *event);
2582 virtual bool enterRecall(
Event *event);
2590 void renameRecord(
void);
2591 bool stateInitial(
Event *event);
2592 bool stateFinal(
Event *event);
2593 bool stateIdle(
Event *event);
2594 bool stateIdleReset(
Event *event);
2595 bool stateReset(
Event *event);
2596 bool stateRelease(
Event *event);
2597 bool stateBusy(
Event *event);
2598 bool stateStandby(
Event *event);
2599 bool stateRinging(
Event *event);
2600 bool statePickup(
Event *event);
2601 bool stateAnswer(
Event *event);
2602 bool stateSeize(
Event *event);
2603 bool stateHunting(
Event *event);
2604 bool stateRunning(
Event *event);
2605 bool stateLibexec(
Event *event);
2606 bool stateLibreset(
Event *event);
2607 bool stateLibwait(
Event *event);
2608 bool stateWaitkey(
Event *event);
2609 bool stateThreading(
Event *event);
2610 bool stateHangup(
Event *event);
2611 bool stateCollect(
Event *event);
2612 bool stateSleep(
Event *event);
2613 bool stateStart(
Event *event);
2614 bool stateClear(
Event *event);
2615 bool stateInkey(
Event *event);
2616 bool stateInput(
Event *event);
2617 bool stateRead(
Event *event);
2618 bool stateDial(
Event *event);
2619 bool stateXfer(
Event *event);
2620 bool stateRefer(
Event *event);
2621 bool stateHold(
Event *event);
2622 bool stateRecall(
Event *event);
2623 bool stateTone(
Event *event);
2624 bool stateDTMF(
Event *event);
2625 bool statePlay(
Event *event);
2626 bool stateRecord(
Event *event);
2627 bool stateJoin(
Event *event);
2628 bool stateWait(
Event *event);
2629 bool stateConnect(
Event *event);
2630 bool stateReconnect(
Event *event);
2631 bool stateCalling(
Event *event);
2639 bool putEvent(
Event *event);
2646 void libWrite(
const char *
string);
2648 void libClose(
const char *
string);
2650 bool isLibexec(
const char *tsid);
2654 const char *getWritepath(
char *buf = NULL,
size_t len = 0);
2656 void incIncomingAttempts(
void);
2658 void incOutgoingAttempts(
void);
2660 void incIncomingComplete(
void);
2662 void incOutgoingComplete(
void);
2664 void incActiveCalls(
void);
2666 void decActiveCalls(
void);
2675 {
return state.peering;};
2692 const char *getExternal(
const char *option);
2701 bool addSymbol(
const char *
id,
const char *value);
2709 bool clearSymbol(
const char *
id);
2719 static const char *getGlobal(
const char *
id);
2720 static bool setGlobal(
const char *
id,
const char *value);
2721 static bool sizeGlobal(
const char *
id,
unsigned size);
2722 static bool addGlobal(
const char *
id,
const char *value);
2723 static bool clearGlobal(
const char *
id);
2759 unsigned getId(
void);
2776 void setRunning(
void);
2784 bool setReconnect(
const char *enc,
timeout_t framing);
2790 bool recallReconnect(
void);
2796 void setConnecting(
const char *evname = NULL);
2825 {
return translator;};
2831 {connecting =
true;};
2841 {
return state.libaudio;};
2846 void finalize(
void);
2857 char var_duration[12];
2858 char var_callid[12];
2862 char var_recall[16];
2863 char var_joined[16];
2865 char var_timeslot[8];
2868 char var_spantsid[12];
2891 const char *getDigits(
void);
2903 {
return var_joined;};
2906 {
return starttime;};
2911 void initialevent(
void);
2916 void initialize(
void);
2927 {
return time_joined;};
2943 virtual timeout_t getRemaining(
void) = 0;
2951 virtual void startTimer(
timeout_t timer) = 0;
2957 virtual void stopTimer(
void) = 0;
2964 virtual void setOffhook(
bool state);
2969 virtual void makeIdle(
void);
2976 void part(event_t reason);
2984 virtual bool postEvent(
Event *event);
2987 bool matchLine(Line *line);
2994 virtual void queEvent(
Event *event);
2999 virtual void startThread(
void);
3009 virtual void exitThread(
const char *msg);
3014 virtual void clrAudio(
void);
3024 virtual const char *audioEncoding(
void);
3029 virtual const char *audioExtension(
void);
3042 const char *getAudio(
bool live =
true);
3048 void branching(
void);
3110 bool isJoined(
void);
3117 bool isAssociated(
void);
3132 bool isDisconnecting(
void);
3147 bool signalScript(signal_t signal);
3154 virtual bool peerLinear(
void);
3178 const char *getKeyString(
const char *
id);
3179 bool getKeyBool(
const char *
id);
3180 long getKeyValue(
const char *
id);
3181 timeout_t getSecTimeout(
const char *
id);
3182 timeout_t getMSecTimeout(
const char *
id);
3183 timeout_t getTimeoutValue(
const char *opt = NULL);
3184 timeout_t getTimeoutKeyword(
const char *kw);
3185 const char *getExitKeyword(
const char *def);
3186 const char *getMenuKeyword(
const char *def);
3188 unsigned getInputCount(
const char *digits,
unsigned max);
3197 uint32 newTid(
void);
3213 bool digitEvent(
const char *event);
3216 {
return scriptEvent(evt);}
3223 char getDigit(
void);
3251 bool parseCall(
char *cp);
3283 const char *getParamId(
unsigned short param,
unsigned short offset);
3284 const char *getIndexed(
unsigned short param,
unsigned short offset = 0);
3285 const char *getNamed(
unsigned short param,
const char *member);
3286 const char *getMapped(
const char *map,
const char *member);
3288 friend size_t xmlwrite(
char **buf,
size_t *max,
const char *fmt, ...);
3289 bool buildResponse(
const char *fmt, ...);
3290 void sendSuccess(
void);
3291 void sendFault(
int code,
const char *
string);
3294 {result.code = code; result.string = string;};
3296 bool invokeXMLRPC(
void);
3299 size_t xmlwrite(
char **buf,
size_t *max,
const char *fmt, ...);
3317 friend void startServices(
void);
3318 friend void stopServices(
void);
3326 virtual void stopService(
void);
3331 virtual void startService(
void);
3357 static void start(
void);
3362 static void stop(
void);
3390 virtual void releaseEngine(
void) = 0;
3396 virtual void disconnectEngine(
void) = 0;
3406 virtual bool stepEngine(
void) = 0;
unsigned long complete_oCount
timeout_t getRingTimer(void)
Get the timer to wait for next ring before deciding a call has dissapeared.
Bayonne services are used for threaded modules which may be installed at runtime. ...
Mode
File processing mode, whether to skip missing files, etc.
timeslot_t getCount(void)
Return total number of server timeslots in this span.
AudioCodec * getCodec(void)
Get audio codec used.
BayonneTranslator * getNext()
Get next translator.
Bayonne RPC arguments, may be passed through to binders from webservice sessions for extensions to so...
const char * getSessionId(void)
class __EXPORT BayonneRPC
unsigned getAnswerCount(void)
Get the number of rings to wait before answering.
static timeslot_t ts_used
static BayonneDriver * getPrimary(void)
Return the first loaded driver.
bool stringEvent(const char *evt)
static unsigned long stamp
__EXPORT AppLog & debug(AppLog &sl)
Manipulator for debug level.
Generic audio class to hold master data types and various useful class encapsulated friend functions ...
AudioTone * tone
Current tone object to use for generation of audio tones, dtmf dialing sequences, etc...
timeout_t getPickupTimer(void)
Get the pickup timer to wait for channel pickup.
AudioStream accesses AudioFile base class content as fixed frames of streaming linear samples...
unsigned long attempts_oCount
BayonneTranslator * translator
Translator in effect for this session.
timeout_t getResetTimer(void)
Get the reset timer for this driver when resetting a thread in the step state.
class __EXPORT BayonneService
static const char * trap_community
static bool isStopping(void)
Return is stopping flag.
tpport_t getPort(void)
Get the binding service port number.
Encoding
Audio encoding formats.
static BayonneTranslator * first
interface_t
Telephony endpoint interface identifiers.
static ThreadLock reloading
A mutex to serialize reload requests.
static BayonneSpan * last
static BayonneSpan * first
static BayonneDriver * getRoot(void)
Rate
Audio encoding rate, samples per second.
time_t getSessionStart(void)
const char * zeroconf_type
The codec class is a virtual used for transcoding audio samples between linear frames (or other known...
This is a class used for collecting statistics for call traffic measurement, such as might be used by...
BayonneSpan * getSpan(void)
static BayonneDriver * protoDriver
Bayonne specific reloaded keydata class.
static timeout_t reset_timer
int getAudioPriority(void)
Get the thread priority to use for audio threads for this driver.
static bool shutdown_flag
static unsigned compile_count
unsigned short tpport_t
Transport Protocol Ports.
static std::ostream * logging
The principle driver node for a given collection of spans and sessions of a given Bayonne driver fami...
static ScriptImage ** localimages
This is a structure used to initialize XMLRPC method tables.
timeout_t getSeizeTimer(void)
Get the sieze time to wait for dialtone on outbound call.
A semaphore is generally used as a synchronization object between multiple threads or to protect a li...
Generic Bayonne master class to reference various useful data types and core static members used for ...
static Traffic total_call_complete
static BayonneDriver * getTrunking(void)
Return primary trunk driver, if driver trunking...
The Mutex class is used to protect a section of code so that at any given time only a single thread c...
size_t xmlwrite(char **buf, size_t *max, const char *fmt,...)
timeout_t getInterdigit(void)
Get default dtmf interdigit timer to use.
__EXPORT char * find(const char *cs, char *str, size_t len=0)
static BayonneConfig * first
void setLogging(std::ostream *output)
Set driver logging.
Threaded step execute scripting engine framework.
class __EXPORT BayonneSpan
BayonneZeroconf * getNext(void)
Get the next zeroconf binding to iterate an object list.
BayonneTranslator * translator
Current language translator in effect for the current set of autio prompts.
libaudio_t * getLibaudio(void)
Get the libaudio object.
static unsigned getCount(void)
static BayonneSpan ** index
A derivable class to hold compiled script images for active processes.
static ScriptSymbols * globalSyms
class __EXPORT BayonneDriver
calltype_t
Type of call session being processed.
const char * getName(void)
Get the name of the driver.
timeslot_t getCount(void)
Get the total number of timeslots this driver uses.
static BayonneService * last
static volatile unsigned short total_active_calls
static bool useProtocols(void)
Return flag for protocols active.
static const char * path_tmpfs
Keydata objects are used to load and hold "configuration" data for a given application.
Keydata::Define * defkeys
A list of each state and a description.
unsigned getAvail(void)
Get available timeslots.
static BayonneTranslator * getFirst(void)
Get first translator.
static BayonneDriver * firstDriver
static DynamicKeydata * firstConfig
This class is used to bind services that are to be published with zeroconf, such as by the avahi modu...
static BayonneBinder * binder
void startConnecting(void)
Start connecting child...
A bayonne config class, used for special purposes, especially during script compiles.
BayonneDriver * getNext(void)
Get next driver...
timeout_t getHuntTimer(void)
Get the hunting timer.
unsigned getAvail(void)
Get number of call slots still available.
size_t getAudioStack(void)
Get the size of the stack for audio threads.
static unsigned getSpans(void)
Return total spans in use.
The buffer class represents an IPC service that is built upon a buffer of fixed capacity that can be ...
class __EXPORT BayonneTranslator
signal_t
Signaled interpreter events.
A derivable class to hold compiled script images for active processes.
calltype_t getType(void)
Return call type on session.
static BayonneDriver * lastDriver
static StreamingBuffer * first
timeslot_t getFirst(void)
Get the first server timeslot of this span.
const char * getPrefix(void)
static BayonneDriver * trunkDriver
bool isIdle(void)
Return if the session is currently idle.
Audio::Level getAudioLevel(void)
Get the audio level for silence detection.
timeslot_t getSlot(void)
Return server timeslot this session uses.
interface_t getInterface(void)
Return interface type of this session.
const char * getSessionJoined(void)
class __EXPORT BayonneMsgport
zeroconf_family_t zeroconf_family
static RPCNode * getFirst(void)
bridge_t
Type of bridge used for joining ports.
void clearEngine(BayonneSession *s)
This is a little class used to associate XMLRPC call method tables with our server.
static unsigned trap_count4
This is an internal ring class for synchronized ringing.
Framework for portable audio processing and file handling classes.
static timeslot_t getTimeslotsUsed(void)
Return total library timeslots used (highest used).
Generic script class to hold master data types and various useful class encpasulated friend functions...
BayonneMsgport * getMsgport(void)
Return the message port bound with this driver.
const char * getInitial(const char *id)
static BayonneTranslator * init_translator
A core class to support language translation services in Bayonne phrasebook.
state_t
Call processing states offered in core library.
static BayonneTranslator langNone
The ThreadLock class impliments a thread rwlock for optimal reader performance on systems which have ...
static ScriptCommand * server
Bayonne specific dynamic keydata class.
BayonneDriver * nextDriver
A span is a collection of ports under a single control interface or communication channel...
static AtomicCounter libexec_count
static timeslot_t ts_limit
Bayonnne specific static keydata class.
static Mutex serialize
A mutex to serialize any direct console I/O operations.
RPCDefine * getMethods(void)
static const char * path_tmp
The AudioTone class is used to create a frame of audio encoded single or dualtones.
bool isOffhook(void)
Return hook state.
timeslot_t getFirst(void)
Get first server timeslot this driver uses.
Offers interface bridge for embedded scripting engines through an abstract interface.
class __EXPORT BayonneSession
The primary session object representing a server timeslot and active communication endpoint in Bayonn...
event_t
Primary event identifiers.
static BayonneSession ** timeslots
ScriptEngine * getEngine(void)
void transportFault(unsigned code, const char *string)
bool getBoolean(const char *id)
volatile unsigned short active_calls
BayonneDriver * msgdriver
static timeslot_t ts_count
zeroconf_family_t getFamily(void)
timeout_t getFlashTimer(void)
Get the programmed flash timer to signal trunk flash.
static time_t reload_time
Every thread of execution in an application is created by instantiating an object of a class derived ...
The Event class implements a feature originally found in the WIN32 API; event notification.
static unsigned long getStamp(void)
struct timespec * getTimeout(struct timespec *spec, timeout_t timeout)
BayonneSession * lastIdle
static const char * path_prompts
volatile unsigned short active_calls
BayonneZeroconf * zeroconf_next
unsigned getSpansUsed(void)
Get the number of span objects used by driver.
static timeslot_t getAvailTimeslots(void)
Return remaining timeslots available to allocate driver ports into.
Streaming buffer for audio, to be used in bgm audio sources.
static timeslot_t getTimeslotCount(void)
Return total timeslots allocated for the server.
static BayonneZeroconf * zeroconf_first
timeslot_t getTimeslot(void)
time_t getJoined(void)
Return time this call is joined or 0 if not child node.
void setInitial(const char *id, const char *val)
An intermediary binder class for Bayonne engine.
const char * getId(void)
Get the id string.
const char * defVoicelib(void)
unsigned getSpanFirst(void)
Get the first span id used.
BayonneDriver * getDriver(void)
Get driver associated with this span.
BayonneDriver * getDriver(void)
Return driver associated with this session.
Bayonne Msgports are used to queue and post session events which normally have to be passed through a...
static timeout_t step_timer
static unsigned idle_limit
DynamicKeydata * nextConfig
static Traffic total_call_attempts
master traffic counters for call attempts and call completions.
static timeout_t exec_timer
bridge_t getBridge(void)
Return bridge type for joins.
The AtomicCounter class offers thread-safe manipulation of an integer counter.
static BayonneService * first
const char * getSessionParent(void)
timeout_t getHangupTimer(void)
Get the hangup timer for hang time before going idle.
void setEngine(BayonneSession *s)
Set vm session.
const char * getType(void)
Get the binding protocol description, usually "_svc._proto".
unsigned getId(void)
Get the id associated with this span.
const char * getString(const char *id)
unsigned short call_limit
uint16 getEventSequence(void)
Get event sequence id.
Network addresses and sockets related classes.
void setValue(const char *sym, const char *data)
Set (replace) the value of a given keyword.
static unsigned idle_count
static const char * init_voicelib
timeout_t getReleaseTimer(void)
Get the release timer when releasing a trunk.
static volatile bool image_loaded
static BayonneZeroconf * getFirst(void)
Get the first zeroconf binding, used by zeroconf plugins.
The event data structure includes the event identifier and any paramaters.
static BayonneDriver * getProtocol(void)
Return primary protocol driver...
This class holds the bound keyword set for a given Bayonne style script interpreter.
Offers core Bayonne audio processing in a self contained class.
long getValue(const char *id)
BayonneTranslator * getTranslator(void)
Get the current language translator.
const char * getTid(void)
Get the current transaction identifier string for the session.