Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

bayonne.h

Go to the documentation of this file.
00001 // Copyright (C) 2000 Open Source Telecom Corporation.
00002 //  
00003 // This program is free software; you can redistribute it and/or modify
00004 // it under the terms of the GNU General Public License as published by
00005 // the Free Software Foundation; either version 2 of the License, or
00006 // (at your option) any later version.
00007 // 
00008 // This program is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011 // GNU General Public License for more details.
00012 // 
00013 // You should have received a copy of the GNU General Public License
00014 // along with this program; if not, write to the Free Software 
00015 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00016 
00017 #ifndef __CCXX_BAYONNE_H__
00018 #define __CCXX_BAYONNE_H__
00019 
00020 #ifndef __CCXX_SCRIPT_H__
00021 #include <cc++/script.h>
00022 #endif
00023 
00024 #ifndef __CCXX_SLOG_H__
00025 #include <cc++/slog.h>
00026 #endif
00027 
00028 #ifndef __CCXX_DSO_H__
00029 #include <cc++/file.h>
00030 #endif
00031 
00032 #ifndef __CCXX_SOCKET_H__
00033 #include <cc++/socket.h>
00034 #endif
00035 
00036 #ifndef __CCXX_AUDIO_H__
00037 #include <cc++/audio.h>
00038 #endif
00039 
00040 #include <stdlib.h>
00041 
00042 #ifdef  __FreeBSD__
00043 #undef  read
00044 #undef  write
00045 #undef  readv
00046 #undef  writev
00047 #endif
00048 
00049 #ifndef COMMON_TPPORT_TYPE_DEFINED
00050 typedef short   tpport_t;
00051 #endif
00052 
00053 /* Bayonne uses a universal event record for all driver plugins and
00054    state handlers.  Not all drivers impliment the entire set of events
00055    and some drivers have specific events associated with their unique
00056    characteristcs.  However, most events are considered "universal".
00057 */
00058 
00059 class Trunk;
00060 class Service;
00061 class phTone;
00062 class TrunkGroup;
00063 class Module;
00064 class Request;
00065 
00066 typedef enum
00067 {
00068         SELECT_FIRST,
00069         SELECT_LAST
00070 } seltype_t;
00071 
00072 typedef enum {
00073         MODULE_GENERIC,
00074         MODULE_DELIVERY,
00075         MODULE_SENDFILE,
00076         MODULE_SENDFAX,
00077         MODULE_NOTIFY,
00078         MODULE_FIFO,
00079         MODULE_TGI,
00080         MODULE_URL,
00081         MODULE_NET,
00082         MODULE_REPLY,
00083         MODULE_ASR,
00084         MODULE_TTS,
00085         MODULE_ANY
00086 }       modtype_t;
00087 
00088 typedef enum {
00089         // step change requests
00090         TRUNK_STEP_HANGUP = 0,
00091         TRUNK_STEP_SLEEP,
00092         TRUNK_STEP_ANSWER,
00093         TRUNK_STEP_COLLECT,
00094         TRUNK_STEP_PLAY,
00095         TRUNK_STEP_RECORD,
00096         TRUNK_STEP_TONE,
00097         TRUNK_STEP_DIALXFER,
00098         TRUNK_STEP_FLASH,
00099         TRUNK_STEP_JOIN,
00100         TRUNK_STEP_RTP,
00101         TRUNK_STEP_DUPLEX,
00102         TRUNK_STEP_DETECT,
00103         TRUNK_STEP_REQUIRES,
00104         TRUNK_STEP_EXIT = TRUNK_STEP_HANGUP,
00105         TRUNK_STEP_DRIVER
00106 } trunkstep_t;
00107 
00108 typedef enum {
00109         // notify script from state handler
00110         TRUNK_SIGNAL_STEP = 0,
00111         TRUNK_SIGNAL_EXIT,
00112         TRUNK_SIGNAL_HANGUP=TRUNK_SIGNAL_EXIT,
00113         TRUNK_SIGNAL_ERROR,
00114         TRUNK_SIGNAL_TIMEOUT,
00115         TRUNK_SIGNAL_DTMF,
00116         TRUNK_SIGNAL_0,
00117         TRUNK_SIGNAL_1,
00118         TRUNK_SIGNAL_2,
00119         TRUNK_SIGNAL_3,
00120         TRUNK_SIGNAL_4,
00121         TRUNK_SIGNAL_5,
00122         TRUNK_SIGNAL_6,
00123         TRUNK_SIGNAL_7,
00124         TRUNK_SIGNAL_8,
00125         TRUNK_SIGNAL_9,
00126         TRUNK_SIGNAL_STAR,
00127         TRUNK_SIGNAL_POUND,
00128         TRUNK_SIGNAL_A,
00129         TRUNK_SIGNAL_B,
00130         TRUNK_SIGNAL_C,
00131         TRUNK_SIGNAL_D,
00132         TRUNK_SIGNAL_DIALTONE,
00133         TRUNK_SIGNAL_BUSY,
00134         TRUNK_SIGNAL_CANCEL,
00135         TRUNK_SIGNAL_SIGNAL,
00136         TRUNK_SIGNAL_DRIVER
00137 }       trunksignal_t;
00138 
00139 typedef enum {
00140         // primary state handlers
00141 
00142         TRUNK_ENTER_STATE = 100,// newly entered handler state
00143         TRUNK_EXIT_STATE,       // exiting prior state (unused)
00144         TRUNK_STOP_STATE,       // request state termination
00145         TRUNK_NOTIFICATION,     // death notify event
00146         TRUNK_SERVICE_SUCCESS,  // service completion successful
00147         TRUNK_SERVICE_FAILURE,  // service completion failed
00148         TRUNK_SERVICE_LOOKUP,   // lookup transaction
00149         TRUNK_SERVICE_LOGIN,    // login transaction
00150         TRUNK_SIGNAL_NOTIFY,    // signal between trunks
00151         TRUNK_JOIN_TRUNKS,      // join two trunks together
00152         TRUNK_PART_TRUNKS,      // split two trunks that were joined
00153         TRUNK_NULL_EVENT,       // used to push pipe driven systems
00154 
00155         // tgi/integration control state handlers
00156 
00157         TRUNK_EXIT_SHELL = 200, // tgi completion event
00158         TRUNK_START_SCRIPT,     // start of script
00159         TRUNK_RING_START,       // smdi/integrated answer
00160         TRUNK_RING_REDIRECT,    // smdi/integrated answer options
00161         TRUNK_STOP_DISCONNECT,  // integrated hangup notification
00162 
00163         // in the future these will be used
00164 
00165         TRUNK_START_INCOMING = TRUNK_RING_START,
00166         TRUNK_START_OUTGOING = TRUNK_START_SCRIPT,
00167 
00168         // primary "mode" selection controls
00169 
00170         TRUNK_MAKE_TEST =  300, // request driver perform line test
00171         TRUNK_MAKE_BUSY,        // request driver lockout line
00172         TRUNK_MAKE_IDLE,        // request driver reset line
00173         TRUNK_MAKE_STEP,        // pass step event internally
00174 
00175         // basic trunk events
00176 
00177         TRUNK_LINE_WINK = 400,  // used for line disconnect notification
00178         TRUNK_TIMER_EXPIRED,    // driver specific port timer expired
00179         TRUNK_RINGING_ON,       // some drivers distinguish start/stop
00180         TRUNK_RINGING_OFF,      // default ring event
00181         TRUNK_TEST_IDLE,        // some drivers have line test completion
00182         TRUNK_TEST_FAILURE,     // some drivers notify errors
00183         TRUNK_ON_HOOK,          // some drivers notify on hook
00184         TRUNK_OFF_HOOK,         // some drivers notify off hook
00185         TRUNK_CALLER_ID,        // caller id parse request
00186         TRUNK_RINGING_DID,      // did digit ring signal
00187         TRUNK_CALL_DETECT,      // ISDN call detected notification
00188         TRUNK_CALL_CONNECT,     // ISDN call connection notification
00189         TRUNK_CALL_RELEASE,     // ISDN call release notification
00190         TRUNK_CALL_ACCEPT,      // ISDN incoming call accepted
00191         TRUNK_CALL_RINGING,     // digital T1 incoming call
00192         TRUNK_CALL_DISCONNECT,  // digital T1 circuit break
00193 
00194         // basic audio processing events
00195 
00196         TRUNK_AUDIO_IDLE = 500, // audio reset or completion event
00197         TRUNK_INPUT_PENDING,    // some drivers monitor audio i/o status
00198         TRUNK_OUTPUT_PENDING,   // some drivers monitor audio i/p status
00199         TRUNK_AUDIO_BUFFER,     // some drivers return audio buffers
00200         TRUNK_TONE_IDLE,        // tone generator completion event
00201         TRUNK_DTMF_KEYDOWN,     // some drivers distinguish tone down
00202         TRUNK_DTMF_KEYUP,       // default dtmf event
00203         TRUNK_TONE_START,       // tone detected
00204         TRUNK_TONE_STOP,        // some drivers have tone completion event
00205         TRUNK_FSK_DETECT,       // fsk tone detect
00206         TRUNK_FAX_DETECT,       // fax tone detect
00207         TRUNK_VOX_DETECT,       // speaker detected
00208         TRUNK_AUDIO_START,      // some drivers may "vox" compress
00209         TRUNK_AUDIO_STOP,       // some drivers may "vox" compress
00210         TRUNK_CPA_DIALTONE,     // dialtone heard on the line
00211         TRUNK_CPA_BUSYTONE,
00212         TRUNK_CPA_RINGING,
00213         TRUNK_CPA_RINGBACK = TRUNK_CPA_RINGING,
00214         TRUNK_CPA_INTERCEPT,
00215         TRUNK_CPA_NODIALTONE,
00216         TRUNK_CPA_NORINGBACK,
00217         TRUNK_CPA_NOANSWER,
00218         TRUNK_CPA_CONNECT,
00219         TRUNK_CPA_FAILURE,
00220         TRUNK_DSP_READY,        // dsp resource became available
00221 
00222         // driver specific events and anomolies
00223 
00224         TRUNK_DRIVER_SPECIFIC=8000      // very oddball events
00225 } trunkevent_t;
00226 
00227 typedef enum
00228 {
00229         DSP_MODE_INACTIVE = 0,  // dsp is idle
00230         DSP_MODE_VOICE,         // standard voice processing
00231         DSP_MODE_CALLERID,      // caller id support
00232         DSP_MODE_DATA,          // fsk modem mode
00233         DSP_MODE_FAX,           // fax support
00234         DSP_MODE_TDM,           // TDM bus with echo cancellation
00235         DSP_MODE_RTP,           // VoIP full duplex
00236         DSP_MODE_DUPLEX,        // mixed play/record
00237         DSP_MODE_JOIN,          // support of joined channels
00238         DSP_MODE_CONF,          // in conference
00239         DSP_MODE_TONE           // tone processing
00240 } dspmode_t;
00241 
00242 typedef enum
00243 {
00244         TRUNK_MODE_INCOMING = 0,
00245         TRUNK_MODE_OUTGOING,
00246         TRUNK_MODE_INACTIVE,
00247         TRUNK_MODE_UNAVAILABLE
00248 } trunkmode_t;
00249  
00250 typedef enum
00251 {
00252         STAT_MAX_INCOMING,
00253         STAT_MAX_OUTGOING,
00254         STAT_TOT_INCOMING,
00255         STAT_TOT_OUTGOING,
00256         STAT_ACTIVE_CALLS
00257 } statitem_t;
00258 
00259 #define TRUNK_CAP_VOICE         0x00000001
00260 #define TRUNK_CAP_DIAL          0x00000002
00261 #define TRUNK_CAP_SENDFAX       0x00000004
00262 #define TRUNK_CAP_RECVFAX       0x00000008
00263 #define TRUNK_CAP_DATA          0x00000010
00264 #define TRUNK_CAP_TTS           0x00000020
00265 #define TRUNK_CAP_ASR           0x00000040
00266 
00267 typedef union
00268 {
00269         scriptsymbol_t sym;
00270         char data[sizeof(scriptsymbol_t) + 12];
00271 }       numbersymbol_t;
00272 
00273 typedef union
00274 {
00275         scriptsymbol_t bin;
00276         char data[sizeof(scriptsymbol_t) + 32];
00277 }       digitsymbol_t;
00278 
00279 typedef struct
00280 {
00281         
00282         int pid;
00283         unsigned seq;
00284         void *data;
00285 }       execdata_t;
00286 
00287 typedef union
00288 {
00289         struct
00290         {
00291                 int rings;
00292                 int timeout;
00293         }       answer;
00294         struct
00295         {
00296                 char list[256];
00297                 char *name;
00298                 unsigned long offset;
00299                 unsigned long limit;
00300                 unsigned char volume;
00301         }       play;
00302         struct
00303         {
00304                 char *name;
00305                 timeout_t timeout;
00306                 unsigned long offset;
00307                 unsigned short term;
00308                 unsigned char volume;
00309                 unsigned long trim;
00310                 bool append;
00311         }       record;
00312         struct
00313         {
00314                 char digits[65];
00315                 char *digit;
00316                 timeout_t interdigit;
00317                 bool exit;
00318                 timeout_t timeout;
00319                 timeout_t offhook;
00320                 timeout_t onhook;
00321         }       dialxfer;
00322         struct
00323         {
00324                 timeout_t timeout;
00325                 unsigned count;
00326                 unsigned short term;
00327                 unsigned short ignore;
00328         }       collect;
00329         struct
00330         {
00331                 timeout_t wakeup;
00332                 unsigned rings;
00333                 unsigned loops;
00334         }       sleep;
00335         struct
00336         {
00337                 timeout_t wakeup;
00338                 unsigned loops;
00339                 phTone *tone;
00340         }       tone;
00341         struct
00342         {
00343                 timeout_t wakeup;
00344                 Trunk *trunk;
00345                 phTone *tone;
00346         }       join;
00347         struct
00348         {
00349                 struct in_addr addr;
00350                 unsigned short bind, port, term;
00351                 audioencoding_t codec;
00352         }       rtp;
00353 }       trunkdata_t;
00354 
00355 typedef struct
00356 {
00357         trunkevent_t id;        // event id
00358         union
00359         {
00360                 struct
00361                 {
00362                         unsigned digit: 4;
00363                         unsigned duration: 12;
00364                         unsigned e1: 8;
00365                         unsigned e2: 8;
00366                 } dtmf;
00367                 struct
00368                 {
00369                         unsigned tone: 8;
00370                         unsigned energy: 8;
00371                         unsigned duration: 16;
00372                 } tone;
00373                 struct
00374                 {
00375                         unsigned digit:  4;
00376                         unsigned duration: 24;
00377                 } ring;
00378                 struct
00379                 {
00380                         unsigned seq;
00381                         bool result;
00382                         char *data;
00383                 } lookup;
00384                 int status;
00385                 Trunk *trunk;
00386                 void *data;
00387                 char **argv;
00388                 char *error;
00389                 timeout_t duration;
00390                 trunkstep_t step;
00391                 char dn[8];
00392                 dspmode_t dsp;
00393         } parm;
00394 } TrunkEvent;
00395 
00396 #pragma pack(1)
00397 
00398 typedef struct {
00399         time_t  update;
00400         char name[16];
00401         struct in_addr addr;
00402         unsigned char version;
00403         unsigned char buddies;
00404         unsigned char ports;
00405         char stat[255];
00406 }       statnode_t;
00407 
00408 #pragma pack()
00409 
00410 /* This is used to bind user defined "functions" which may be loaded
00411    in a DSO module.
00412 */
00413 
00414 typedef char *(*functioncall_t)(scriptsymbol_t *sym, char **args);
00415 
00416 typedef struct
00417 {
00418         char *name;
00419         functioncall_t function;
00420 } FUNCTIONS;
00421 
00422 
00430 class CallStat : public Mutex
00431 {
00432 protected:
00433         int capacity;
00434         struct
00435         {
00436                 int incoming;
00437                 int outgoing;
00438         }       active, max, lastmax;
00439 
00440         struct
00441         {
00442                 long incoming;
00443                 long outgoing;
00444         }       total, lasttotal;
00445 
00446 public:
00447         CallStat();
00448 
00454         inline int getCapacity(void)
00455                 {return capacity;};
00456 
00463         long getStat(statitem_t item);
00464 
00468         void incIncoming(void);
00469 
00473         void decIncoming(void);
00474 
00478         void incOutgoing(void);
00479 
00483         void decOutgoing(void);
00484 
00488         void Update(void);
00489 };
00490 
00503 class Translator : protected Keydata
00504 {
00505 private:
00506         friend Translator *getTranslator(char *name);
00507         static Translator *first;
00508         Translator *next;
00509 
00510 protected:
00516         virtual char *getName(void) = 0;
00517 
00524         char *getPlayBuffer(Trunk *trunk);
00525 
00526         void scanDir(const char *etcdir, const char *language, const char *lib);
00527 
00528         Translator(const char *conf, const char *lib);
00529 
00530 public:
00538         virtual char *Speak(Trunk *trunk) = 0;
00539 };
00540 
00554 class Functions
00555 {
00556 protected:
00562         virtual char *getName(void) = 0;
00563 
00569         void Load(FUNCTIONS *map);
00570 };
00571 
00572 /* Bayonne config file istanciation classes.  In Bayonne these are
00573    created as keydata objects out of bayonne.conf during process
00574    startup automatically.  This is Bayonne runtime configuration magic.
00575 */
00576 
00583 class KeyTones : protected Keydata
00584 {
00585 public:
00589         KeyTones();
00590 };
00591 
00599 class KeyLocal : public Keydata
00600 {
00601 public:
00605         KeyLocal();
00606 };
00607 
00615 class KeyPaths : public Keydata
00616 {
00617 public:
00621         KeyPaths();
00622 
00626         inline const char *getLibexec(void)
00627                 {return getLast("libexec");};
00628 
00632         inline const char *getTgipath(void)
00633                 {return getLast("tgipath");};
00634 
00638         inline const char *getLibpath(void)
00639                 {return getLast("libpath");};
00640 
00644         inline const char *getDatafiles(void)
00645                 {return getLast("datafiles");};
00646 
00650         inline const char *getWrappers(void)
00651                 {return getLast("wrappers");};
00652 
00656         inline const char *getRunfiles(void)
00657                 {return getLast("runfiles");};
00658 
00662         inline const char *getSpool(void)
00663                 {return getLast("spool");};
00664 
00668         inline const char *getScriptFiles(void)
00669                 {return getLast("scripts");};
00670 
00674         inline const char *getCache(void)
00675                 {return getLast("precache");};
00676 };
00677 
00685 class KeyNetwork : public Keydata
00686 {
00687 public:
00691         KeyNetwork();
00692 
00698         unsigned getRefresh(void)
00699                 {return atoi(getLast("refresh"));};
00700 
00706         unsigned getTimeToLive(void)
00707                 {return atoi(getLast("live"));};
00708 
00714         unsigned getTimeToElect(void)
00715                 {return atoi(getLast("elect"));};
00716 
00722         unsigned getTimeToExpire(void)
00723                 {return atoi(getLast("expire"));};
00724 
00730         InetHostAddress getBroadcast(void);
00731 
00737         InetAddress getAddress(void);
00738 
00744         tpport_t getPort(void);
00745 
00751         InetHostAddress getDBHost(void);
00752 
00758         tpport_t getDBPort(void);
00759 };
00760 
00768 class KeyMailbox : public Keydata
00769 {
00770 public:
00774         KeyMailbox();
00775 
00781         inline unsigned getCount(void)
00782                 {return atoi(getLast("count"));};
00783 
00789         inline unsigned getLimit(void)
00790                 {return atoi(getLast("limit"));};
00791 
00798         inline unsigned getQuota(void)
00799                 {return atoi(getLast("quota"));};
00800 
00806         inline unsigned getMinimum(void)
00807                 {return atoi(getLast("minimum"));};
00808 
00814         inline unsigned getMaximum(void)
00815                 {return atoi(getLast("maximum"));};
00816 
00822         inline const char *getPassword(void)
00823                 {return getLast("password");};
00824 };
00825 
00834 class KeyMemory : public Keydata
00835 {
00836 public:
00840         KeyMemory();
00841 
00847         inline int getSymbolSize(void)
00848                 {return atoi(getLast("symbols"));};
00849 
00856         inline int getPageSize(void)
00857                 {return atoi(getLast("page"));};
00858 };
00859 
00867 class KeyFeed : public Keydata
00868 {
00869 public:
00873         KeyFeed();
00874 
00880         inline unsigned getBuffers(void)
00881                 {return atoi(getLast("buffers"));};
00882 };
00883 
00884 
00892 class KeyThreads : public Keydata
00893 {
00894 public:
00898         KeyThreads();
00899 
00905         inline int priService(void)
00906                 {return atoi(getLast("services"));};
00907 
00913         inline int priScheduler(void)
00914                 {return atoi(getLast("scheduler"));};
00915 
00921         inline int priGUI(void)
00922                 {return atoi(getLast("gui"));};
00923 
00929         inline int priRTP(void)
00930                 {return atoi(getLast("rtp"));};
00931 
00937         inline int getStepDelay(void)
00938                 {return atoi(getLast("stepdelay"));};
00939 
00945         inline int getStepInterval(void)
00946                 {return atoi(getLast("stepinterval"));};
00947 
00953         inline int getResetDelay(void)
00954                 {return atoi(getLast("resetdelay"));};
00955 
00961         size_t getStack(void);
00962 
00968         int getServices(void);
00969 
00975         int priResolver(void);
00976 
00983         int getResolver(void);
00984 
00990         inline int priAudio(void)
00991                 {return atoi(getLast("audio"));};
00992 
00998         inline int priFeed(void)
00999                 {return atoi(getLast("feed"));};
01000 
01006         inline int priGateway(void)
01007                 {return atoi(getLast("gateways"));};
01008 
01014         inline int priManager(void)
01015                 {return atoi(getLast("managers"));};
01016 
01022         inline int priNetwork(void)
01023                 {return atoi(getLast("network"));};
01024 
01030         inline int getInterval(void)
01031                 {return atoi(getLast("interval"));};
01032 
01038         inline int getRefresh(void)
01039                 {return atoi(getLast("refresh"));};
01040 
01046         int getGateways(void);
01047         
01054         inline int getPriority(void)
01055                 {return atoi(getLast("priority"));};
01056 
01062         int getPolicy(void);
01063 
01069         inline int getPages(void)
01070                 {return atoi(getLast("pages"));};
01071 };
01072 
01080 class Auditdata : public Keydata
01081 {
01082 private:
01083         friend class Audit;
01084 
01085         Auditdata();
01086 };
01087 
01096 class Policy
01097 {
01098 private:
01099         friend class TrunkGroup;
01100 
01101         Policy *next;
01102         TrunkGroup *group;
01103 
01104 protected:
01105         Policy(TrunkGroup *grp);
01106         
01107         virtual Request *loPriority(void)
01108                 {return NULL;};
01109 
01110         virtual Request *hiPriority(void)
01111                 {return NULL;};
01112 };
01113 
01123 class Request
01124 {
01125 private:
01126         friend class TrunkGroup;
01127 
01128         static unsigned seq;
01129 
01130         unsigned id;
01131         Request *next;
01132         time_t expires;
01133         TrunkGroup *group;
01134 
01135         char *argv[33];
01136         char buffer[512];
01137         char tagid[65];
01138 
01139         void Detach(void);
01140 
01141 public:
01142         Request(TrunkGroup *grp, const char *text, unsigned expire, const char *tag = NULL);
01143         ~Request()
01144                 {Detach();};
01145 
01146         inline char **getList(void)
01147                 {return argv;};
01148 
01149         inline char *getTag(void)
01150                 {return tagid;};
01151 
01152         bool isExpired(void);
01153 
01154         friend void cancel(TrunkGroup *group, const char *tag);
01155         friend Request *request(TrunkGroup *group, char **argv, unsigned timeout, const char *tag = NULL);
01156         friend Request *locate(TrunkGroup *group, const char *tag, int *pos);
01157 };
01158 
01169 class TrunkGroup : public Keydata, public CallStat
01170 {
01171 private:
01172         friend class KeyServer;
01173         friend class Scheduler;
01174         friend class Audit;
01175         friend class TestDebug;
01176         friend class Request;
01177         friend class Policy;
01178         friend class Trunk;
01179         static TrunkGroup *first;
01180         TrunkGroup *next;
01181         char schedule[65];
01182         char planned[65];
01183         unsigned trump;
01184         Request *reqfirst, *reqlast;
01185         Policy *polFirst;
01186         unsigned members;
01187 
01188         void setSchedule(const char *str);
01189 
01190         friend inline const char *getGroups(void)
01191                 {return TrunkGroup::first->getLast("groups");};
01192 
01193         friend void cancel(TrunkGroup *group, const char *tag);
01194         friend Request *locate(TrunkGroup *group, const char *tag, int *pos = NULL);
01195 
01196 
01197 public:
01203         TrunkGroup(char *name = NULL);
01204 
01210         inline const char *getName(void)
01211                 {return getLast("name");};
01212 
01218         inline unsigned getAnswer(void)
01219                 {return atoi(getLast("answer"));};
01220 
01226         inline unsigned getCallerid(void)
01227                 {return atoi(getLast("callerid"));};
01228 
01234         inline unsigned getPickup(void)
01235                 {return atoi(getLast("pickup"));};
01236 
01242         inline const char *chkRequest(void)
01243                 {return getLast("requests");};
01244 
01250         seltype_t getSelect(void);
01251 
01257         inline unsigned getThreashold(void)
01258                 {return atoi(getLast("threashold"));};
01259 
01265         inline unsigned getAnalysis(void)
01266                 {return atoi(getLast("analysis"));};
01267 
01274         inline timeout_t getReady(void)
01275                 {return atol(getLast("ready"));};
01276         
01282         inline unsigned getIdleTime(void)
01283                 {return atoi(getLast("idletime"));};
01284 
01290         inline unsigned getSiezeTime(void)
01291                 {return atoi(getLast("siezetime"));};
01292 
01298         inline unsigned getRingTime(void)
01299                 {return atoi(getLast("ringtime"));};
01300 
01306         inline int getHangup(void)
01307                 {return atoi(getLast("hangup"));};
01308 
01314         inline timeout_t getFlash(void)
01315                 {return atol(getLast("flash"));};
01316 
01322         inline timeout_t getDialtone(void)
01323                 {return atol(getLast("dialtone"));};
01324 
01330         inline timeout_t getDialspeed(void)
01331                 {return atol(getLast("dialspeed"));};
01332 
01339         const char *getNumber(void);
01340 
01347         const char *getSchedule(char *buf);
01348 
01358         const char *getRedirect(const char *redirect, char *buf);
01359 
01363         inline void incCapacity(void)
01364                 {++capacity;};
01365 
01371         Request *getRequest(void);
01372 
01378         friend TrunkGroup *getGroup(const char *name);
01379 };
01380 
01388 class KeyServer : public Keydata
01389 {
01390 private:
01391         unsigned uid, gid;
01392         const char *altdir;
01393         const char *phrdir;
01394 
01395 public:
01399         KeyServer();
01400 
01406         inline const char *getNode(void)
01407                 {return getLast("node");};
01408 
01414         inline const char *getPassword(void)
01415                 {return getLast("password");};
01416 
01422         inline const char *getToken(void)
01423                 {return getLast("token");};
01424 
01428         void loadGroups(bool test);
01429 
01435         inline const char *getDefault(void)
01436                 {return getLast("default");};
01437 
01443         inline unsigned getGid(void)
01444                 {return gid;};
01445 
01451         inline unsigned getUid(void)
01452                 {return uid;};
01453 
01457         void setUid(void);
01458 
01462         void setGid(void);
01463 
01469         inline int getNodeCount(void)
01470                 {return atoi(getLast("nodes"));};
01471 
01477         inline const char *getPrefix(void)
01478                 {return altdir;};
01479 
01485         inline const char *getPhrases(void)
01486                 {return phrdir;};
01487 };
01488 
01496 class Plugins : public Keydata
01497 {
01498 public:
01502         Plugins();
01503 
01507         ~Plugins();
01508 
01514         char *getDriverName(void);
01515 
01519         void loadDebug(void);
01520 
01525         DSO *loadDriver(void);
01526 
01530         void loadExtensions(void);
01531 
01535         void loadFunctions(void);
01536 
01540         void loadMaps(void);
01541 
01545         void loadModules(void);
01546 
01550         void loadServices(void);
01551 
01555         void loadFeeds(void);
01556 
01560         void loadTGI(void);
01561 
01565         void loadManagers(void);
01566 
01570         void loadTranslators(void);
01571 
01575         void loadAuditing(void);
01576 };
01577 
01586 class aaScript : public ScriptCommand 
01587 {
01588 private:
01589         friend class Functions;
01590 
01591 #pragma pack(1)
01592         typedef struct _functions
01593         {
01594                 struct _functions *next;
01595                 functioncall_t function;
01596                 char name[1];
01597         }       functions_t;
01598 #pragma pack()
01599 
01600         functions_t *functions[KEYWORD_INDEX_SIZE];
01601 
01602 protected:
01610         unsigned long getTrapMask(const char *trapname);
01611 
01619         void addFunction(char *name, functioncall_t function);
01620 
01621 public:
01628         functioncall_t getFunction(char *name);
01629 
01633         aaScript();
01634 
01640         void addModule(Module *module);
01641 };
01642 
01652 class aaImage : public ScriptImage
01653 {
01654 protected:
01662         virtual bool isScript(char *scriptname);
01663 
01670         void scanDir(char *path);
01671 
01672 public:
01676         aaImage(aaScript *script);
01677 };
01678 
01685 class Mixer : protected Mutex
01686 {
01687 private:
01688         friend class Conference;
01689         void addGroup(void);
01690         void delGroup(void);
01691 
01692 protected:
01693         Mixer();
01694         unsigned avail, members, groups;
01695 
01696 public:
01697         unsigned getAvail(void)
01698                 {return avail;};
01699 
01700         unsigned getMembers(void)
01701                 {return members;};
01702 
01703         unsigned getGroups(void)
01704                 {return groups;};
01705 
01706         virtual bool setMixer(int groups, int members) = 0;
01707 
01708         virtual Conference *getConference(int group) = 0;
01709 };
01710 
01719 class Conference : protected Mutex
01720 {
01721 protected:
01722         Mixer *mixer;
01723         unsigned limit;
01724         unsigned members;
01725         int *membership;
01726 
01727         virtual ~Conference();
01728 
01729         Conference(Mixer *m);
01730 public:
01731         inline virtual Mixer *getMixer(void)
01732                 {return mixer;};
01733 
01734         int *getMembership(void)
01735                 {return membership;};
01736 
01737         Trunk *getTrunk(unsigned member);
01738 
01739         unsigned getMembers(void)
01740                 {return members;};
01741 
01742         unsigned getLimit(void)
01743                 {return limit;};
01744 
01745         virtual bool setConference(unsigned max) = 0;
01746 };
01747 
01757 class Trunk : public ScriptInterp
01758 {
01759 private:
01760         friend class TestDebug;
01761         friend class aaScript;
01762         friend class Translator;
01763         friend class ScriptInterface;
01764         friend class Service;
01765         friend class AudioService;
01766         friend class Fifo;
01767         friend class PortManager;
01768 
01769         unsigned member;
01770         char *cdrv[33];
01771         int cdrc;
01772         numbersymbol_t numbers[5];
01773 
01774         bool scrStart(void);
01775         bool scrRequest(void);
01776         bool scrLibonce(void);
01777         bool scrLibexec(void);
01778         bool scrHangup(void);
01779         bool scrDebug(void);
01780         bool scrImport(void);
01781         bool scrExport(void);
01782         bool scrFunction(void);
01783         bool scrAlog(void);
01784         bool scrAudit(void);
01785         bool scrPause(void);
01786         bool scrSleep(void);
01787         bool scrSync(void);
01788         bool scrTone(void);
01789         bool scrAnswer(void);
01790         bool scrCollect(void);
01791         bool scrFlash(void);
01792         bool scrPlay(void);
01793         bool scrRecord(void);
01794         bool scrAppend(void);
01795         bool scrDial(void);
01796         bool scrDTMF(void);
01797         bool scrTransfer(void);
01798         bool scrHold(void);
01799         bool scrSpeak(void);
01800         bool scrMap(void);
01801         bool scrModule(void);
01802         bool scrSchedule(void);
01803         bool scrSignal(void);
01804         bool scrIdle(void);
01805 
01806 protected:
01807         static ScriptSymbol globals;
01808         static char digit[16];
01809         ScriptInterface *script;
01810         TrunkGroup *group;
01811         PortManager *manager;
01812         int id;
01813         time_t start, idle;
01814 
01815         int idle_timer;
01816         int rings;
01817         int digits;
01818 
01819         Service *thread;
01820         trunkdata_t data;
01821         execdata_t tgi;
01822         digitsymbol_t dtmf;
01823         char buffer[65];
01824 
01825         struct
01826         {
01827                 bool offhook: 1;
01828                 bool dtmf: 1;
01829                 bool script: 1;
01830                 bool reset: 1;
01831                 bool timer : 1;
01832                 bool audio: 1;
01833                 bool once : 1;
01834                 bool ready : 1;
01835                 bool echo : 1;
01836                 unsigned temp : 1;
01837                 trunkmode_t trunk: 2;
01838                 dspmode_t dsp: 4;
01839         } flags;
01840 
01846         unsigned long getTrapDefault(void)
01847                 {return 0x00000007;};
01848 
01857         void setConstant(const char *id, const char *data);
01858 
01865         void repSymbol(const char *id, const char *data);
01866 
01874         scriptsymbol_t *getEntry(const char *symname, int size);
01875 
01881         void Commit(scriptsymbol_t *sym);
01882 
01889         int getTimeout(void);
01890 
01897         int getInterdigit(void);
01898 
01904         unsigned short getDigitMask(void);
01905 
01911         bool TrunkSignal(trunksignal_t);
01912 
01919         virtual void setDTMFDetect(void);
01920 
01929         virtual void setDTMFDetect(bool enable)
01930                 {flags.dtmf = enable;};
01931 
01937         virtual void stopServices(void);
01938 
01949         virtual void TrunkStep(trunkstep_t step) = 0;
01950 
01956         bool idleHangup();
01957 
01964         virtual unsigned long getIdleTime(void) = 0;
01965 
01969         bool ScriptStep(void);
01970 
01979         bool Attach(const char *scrname);
01980 
01985         void Detach(void);
01986 
01990         unsigned long getMask(void);
01991 
01998         char **getInitial(char **args);
01999 
02006         void setList(char **list);
02007 
02008         Trunk(int port);
02009 public:
02015         virtual unsigned long getCapabilities(void)
02016                 {return TRUNK_CAP_VOICE | TRUNK_CAP_DIAL;};
02017 
02023         virtual void getName(char *buffer) = 0;
02024 
02032         virtual bool postEvent(TrunkEvent *event) = 0;
02033 
02039         int getDigit(char digit);
02040 
02046         bool isReady(void);
02047 
02055         void libexec(char **argv, unsigned timeout);
02056 
02060         inline bool getOnce(void)
02061                 {return ScriptInterp::getOnce();};
02062 
02068         inline unsigned getMember(void)
02069                 {return member;};
02070 
02071 };
02072 
02081 class PortManager
02082 {
02083 private:
02084         Trunk *trunk;
02085 
02086 protected:
02087         ~PortManager()
02088                 {trunk->manager = NULL;};
02089 
02095         PortManager(Trunk *trk);
02096 
02102         inline void postStep(trunkstep_t step)
02103                 {trunk->TrunkStep(step);};
02104 
02111         inline bool postEvent(TrunkEvent *event)
02112                 {return trunk->postEvent(event);};
02113 
02119         inline trunkdata_t *getData(void)
02120                 {return &trunk->data;};
02121 
02127         inline execdata_t *getExec(void)
02128                 {return &trunk->tgi;};
02129 public:
02133         virtual bool Step(void) = 0;
02134 
02140         virtual unsigned long getMask(void) = 0;
02141         
02148         virtual bool postSignal(trunksignal_t signal) = 0;
02149 
02156         virtual bool postAccept(const char *name) = 0;
02157 
02161         virtual void postDetach(void) = 0;
02162 };
02163 
02173 class Fifo : public fifostream, public Mutex
02174 {
02175 protected:
02176         char schedule[33];
02177 
02178         bool exitPid(char **args);
02179         bool waitPid(char **args);
02180         bool setSymbol(char **argv);
02181         bool putSymbol(char **argv);
02182 
02183         bool login(char **argv);
02184         bool startScript(char **argv);
02185         bool ringScript(char **argv);
02186         bool redirectScript(char **argv);
02187         bool busyLine(char **argv);
02188         bool idleLine(char **argv);
02189         bool hangupLine(char **argv);
02190         bool reqScript(char **argv);
02191         bool setSchedule(char **argv);
02192         bool postKey(char **argv);
02193         bool setMixer(char **argv);
02194         bool setLimit(char **argv);
02195         bool mapFiles(char **argv);
02196         bool submit(char **argv);
02197         bool reload(char **argv);
02198 
02199 public:
02208         bool Command(const char *cmdstring, ostream *fd = NULL);
02209 };
02210 
02224 class Audit : public Mutex
02225 {
02226 private:
02227         friend void audit(Trunk *trunk, char *detail);
02228         friend void alog(Trunk *trunk, char *detail);
02229         friend class Scheduler;
02230 
02231         static Audit *first;
02232         Audit *next;
02233 
02234 protected:
02235         static Auditdata keys;
02236 
02242         virtual void ReportAudit(Trunk *trunk, char *detail) = 0;
02243 
02249         virtual void ReportCDR(Trunk *trunk, char *detail)
02250                 {ReportAudit(trunk, detail);};
02251 
02255         virtual void ReportStats(void)
02256                 {return;};
02257 
02263         inline TrunkGroup *getFirst(void)
02264                 {return TrunkGroup::first;};
02265 
02272         inline TrunkGroup *getNext(TrunkGroup *grp)
02273                 {return grp->next;};
02274 
02278         Audit();
02279 };
02280 
02288 class Driver : public aaScript
02289 {
02290 protected:
02291         friend class TrunkGroup;
02292 
02293         TrunkGroup **groups;
02294         char *status;
02295         bool active;
02296 
02297 public:
02301         Driver();
02302 
02309         virtual int Start(void) = 0;
02310 
02314         virtual void Stop(void) = 0;
02315 
02321         void getStatus(char *buffer);
02322 
02329         virtual aaImage *getImage(void);
02330 
02337         virtual int getTrunkCount(void) = 0;
02338 
02345         virtual int getTrunkUsed(void) 
02346                 {return getTrunkCount();};
02347 
02354         TrunkGroup *getTrunkGroup(int id)
02355                 {return groups[id];}; 
02356 
02364         int getTrunkMember(TrunkGroup *grp, unsigned member);
02365         
02371         virtual Trunk *getTrunkPort(int id) = 0;
02372 
02378         virtual Conference *getConference(int id)
02379                 {return NULL;};
02380 
02386         virtual Mixer *getMixer(int id)
02387                 {return NULL;};
02388 
02394         virtual unsigned getMixers(void)
02395                 {return 0;};
02396 
02402         virtual unsigned getGroups(void)
02403                 {return 0;};
02404 };
02405 
02412 class Debug : protected Mutex
02413 {
02414 public:
02418         Debug();
02419 
02425         virtual bool DebugTest(void)
02426                 {return false;};
02427 
02431         virtual void DebugEvent(Trunk *trunk, TrunkEvent *event)
02432                 {return;};
02433 
02437         virtual void DebugState(Trunk *trunk, char *state)
02438                 {return;};
02439 
02443         virtual void DebugService(Trunk *trunk, char *msg)
02444                 {return;};
02445 
02449         virtual void DebugScript(Trunk *trunk, char *msg)
02450                 {return;};
02451 
02455         virtual void DebugStep(Trunk *trunk, scriptline_t *line)
02456                 {DebugState(trunk, "step");};
02457 
02461         virtual bool DebugFifo(char **argv)
02462                 {return true;};
02463 };
02464 
02471 class AudioService
02472 {
02473 private: 
02474         char filename[256];
02475 
02476 protected:
02477         Trunk *trunk;
02484         char *getPrompt(char *name);
02485 
02491         char *getPlayfile(void);
02492 
02496         AudioService(void);
02497 };
02498 
02506 class Service : public Semaphore, public Thread, public AudioService
02507 {
02508 protected:
02509         volatile bool stopped;
02510         trunkdata_t *data;
02511         TrunkGroup *group;
02512 
02516         void Success(void);
02517 
02521         void Failure(void);
02522 
02526         inline void dspReset(void)
02527                 {trunk->flags.reset = true;};
02528 
02532         inline void setAudio(void)
02533                 {trunk->flags.audio = true;};
02534 
02538         inline void clrAudio(void)
02539                 {trunk->flags.audio = false;};
02540 
02541 public:
02548         Service(Trunk *trunk, int pri);
02549 
02556         virtual timeout_t Stop(void);
02557 
02565         virtual bool isExiting(void)
02566                 {return true;};
02567 
02571         void endService(void)
02572                 {Terminate();};
02573 
02577         virtual ~Service()
02578                 {Terminate();}
02579 };
02580 
02590 class Server : public Thread
02591 {
02592 private:
02593         static Server *first;
02594         Server *next;
02595         friend void startServers(void);
02596         friend void stopServers(void);
02597 
02598 protected:
02599         Server(int pri);
02600 
02604         virtual void Stop(void)
02605                 {Terminate();};
02606 };
02607 
02614 class Sync
02615 {
02616 private:
02617         friend class Scheduler;
02618 
02619         static Sync *first;
02620         Sync *next;
02621         time_t runtime;
02622 
02623 protected:
02627         Sync(void);
02628 
02633         virtual bool isScheduled(void) = 0;
02634 
02639         virtual unsigned getInterval(void)
02640                 {return 10;};
02641 
02645         virtual void Schedule(void) = 0;
02646 
02650         virtual char *getName(void) = 0;
02651 };
02652 
02661 class phTone
02662 {
02663 private:
02664         friend phTone *getphTone(const char *name);
02665         static phTone *first;
02666         static int ulaw[256];
02667         phTone *next;
02668         char name[33];
02669         unsigned char *samples;
02670         timeout_t duration;
02671         unsigned freq1, freq2;
02672 
02673 public:
02681         phTone(const char *name, timeout_t duration, unsigned f);
02682 
02691         phTone(const char *name, timeout_t duration, unsigned f1, unsigned f2);
02692 
02693         ~phTone();
02694 
02700         void Clear(void);
02701 
02707         inline unsigned char *getSamples(void)
02708                 {return samples;};
02709 
02715         inline timeout_t getDuration(void)
02716                 {return duration;};
02717 };
02718 
02725 class TGI
02726 {
02727 private:
02728         static TGI *first;
02729         TGI *next;
02730 
02731 protected:
02732         TGI();
02733 
02741         virtual bool getExtension(char *ext)
02742                 {return false;};
02743 
02744 public:
02754         virtual void Script(char *cmd, char **args)
02755                 {return;};
02756 
02765         virtual int Parse(int fd, int port, char *cmd)
02766                 {return -1;};   
02767 
02768         friend void getInterp(char *cmd, char **args);
02769         friend TGI *getInterp(char *cmd);
02770 };
02771 
02772 extern Module *tts, *asr;
02773 
02783 class Module
02784 {
02785 private:
02786         friend class Fifo;
02787         friend class AudioService;
02788         friend class TrunkGroup;
02789         friend class Network;
02790 
02791         static Module *modFirst, *sesFirst, *cmdFirst, *urlFirst, *reqFirst, *netFirst;
02792         Module *modNext, *sesNext, *cmdNext, *urlNext, *reqNext, *netNext;
02793 
02794 protected:
02795         Module();
02796 
02797         inline Module *getFirst(void)
02798                 {return modFirst;};
02799 
02805         virtual modtype_t getType(void) = 0;
02806 
02810         void addSession(void);
02811 
02815         void addCommand(void);
02816 
02820         void addPrompts(void);
02821 
02825         void addNetwork(void);
02826 
02830         void addRequest(void);
02831         
02835         inline void enableTTS(void)
02836                 {tts = this;};
02837 
02841         inline void enableASR(void)
02842                 {asr = this;};
02843 
02844 
02845 
02849         virtual char *getPrompt(const char *original)
02850                 {return NULL;};
02851 
02855         virtual void Expires(Request *request)
02856                 {return;};
02857 
02861         virtual void Running(Request *request)
02862                 {return;};
02863 
02867         virtual void Cancelled(Request *request)
02868                 {return;};
02869 
02879         virtual int Accept(char *buffer, socklen_t len, statnode_t *node)
02880                 {return 0;};
02881 
02887         virtual void Failover(statnode_t *node)
02888                 {return;};
02889 
02893         virtual void Broadcast(void)
02894                 {return;};
02895 
02896         friend void broadcast(char *msgbuf, unsigned msglen);
02897         friend void cancel(TrunkGroup *grp, const char *tag);
02898 public:
02899         inline Module *getNext(void)
02900                 {return modNext;};
02901 
02907         virtual char *getName(void) = 0;
02908 
02916         virtual char *Dispatch(Trunk *trunk)
02917                 {return NULL;};
02918 
02926         virtual unsigned Sleep(Trunk *trunk)
02927                 {return 0;};
02928 
02935         virtual void Detach(Trunk *trunk)
02936                 {return;};
02937 
02945         virtual void Attach(Trunk *trunk)
02946                 {return;};
02947 
02955         virtual AudioSample *getPhrase(Trunk *trunk, const char *phrase)
02956                 {return NULL;};
02957 
02968         virtual const char *getSpeech(Trunk *trunk, char **domain, unsigned long mask, AudioSample *sample)
02969                 {return NULL;};
02970 
02974         virtual void Reload(void)
02975                 {return;};
02976 
02980         virtual bool Command(char **argv, ostream *out)
02981                 {return false;};
02982 
02983         friend Module *getModule(modtype_t mod, const char *name = NULL);
02984         friend void detachModules(Trunk *trunk);
02985         friend void attachModules(Trunk *trunk);
02986 };
02987 
02997 class Session
02998 {
02999 private:
03000         friend class Scheduler;
03001         static Mutex mutex;
03002         static Session *first;
03003         static Session *last;
03004         Session *next, *prev;
03005         static void Clean(void);
03006 
03007 protected:
03008         Session();
03009         virtual ~Session()
03010                 {Unlink();};
03011 
03015         void Unlink(void);
03016 
03023         virtual time_t getExpires(void) = 0;
03024 };
03025 
03034 class AudioFeed : private ThreadLock
03035 {
03036 private:
03037         static AudioFeed *first;
03038         AudioFeed *next;
03039         unsigned char *buffers;
03040         volatile unsigned char *current;
03041         size_t feedsize, bufsize;
03042         bool active;
03043 
03044 protected:
03045         const char *name;
03046 
03047 public:
03048         AudioFeed(const char *name, unsigned buffers);
03049         ~AudioFeed();
03050         bool Enable(void);
03051         void Disable(void);
03052         unsigned char *getBuffer(unsigned char *prior = NULL, unsigned size = 120);
03053         void putBuffer(unsigned char *buffer, unsigned size = 120);
03054 
03055         friend AudioFeed *getAudioFeed(const char *name);
03056 };
03057 
03066 class Map : private MemPager
03067 {
03068 private:
03069         static ThreadLock lock;
03070         static Map *first, *last;
03071 
03072         typedef struct _sym
03073         {
03074                 struct _sym *next;
03075                 char *key;
03076                 char **values;
03077         }       mapsym_t;
03078 
03079         typedef struct
03080         {
03081                 mapsym_t *keys[127];
03082         } mapkey_t;
03083 
03084         mapkey_t *digits[32];
03085 
03086         Map *next, *prev;
03087         char *name;
03088 
03089         unsigned getKey(const char *key, unsigned len = 0);
03090         char **getList(const char *key, unsigned len);
03091         ~Map();
03092 
03093 public:
03094         Map(const char *path, const char *name);
03095 
03096         friend char **getMap(const char *map, const char *key);
03097         friend void endMaps(void);
03098 };
03099 
03108 class Protocol : public Keydata, public InetHostAddress, public ThreadLock
03109 {
03110 private:
03111         friend class Resolver;
03112         static Protocol *first;
03113         Protocol *next;
03114         Semaphore *sessions;
03115         tpport_t port;
03116 
03117         void Update(InetHostAddress addr);
03118 public:
03119         Protocol(const char *keypath, tpport_t port);
03120         ~Protocol();
03121 
03127         InetHostAddress getAddress(void);
03128 
03134         inline tpport_t getPort(void)
03135                 {return port;};
03136 
03143         inline Semaphore *getSessions(void)
03144                 {return sessions;};
03145 };
03146 
03147 statnode_t *getNodes(const char *name);
03148 
03149 extern bool running;
03150 extern KeyServer keyserver;
03151 extern KeyThreads keythreads;
03152 extern KeyMemory keymemory;
03153 extern KeyPaths keypaths;
03154 extern KeyLocal keylocal;
03155 extern KeyNetwork keynetwork;
03156 extern KeyMailbox keymailbox;
03157 extern KeyTones keytones;
03158 extern KeyFeed keyfeed;
03159 extern Plugins plugins;
03160 extern Driver *driver;
03161 extern Debug *debug;
03162 extern Module *asr, *tts;
03163 extern Fifo fifo;
03164 #endif
03165 

Generated at Sat Mar 10 21:03:02 2001 for Bayonne by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000