00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef DAHDI_COMPAT_H
00023 #define DAHDI_COMPAT_H
00024
00025 #if defined(HAVE_DAHDI)
00026
00027 #include <dahdi/user.h>
00028
00029 #define DAHDI_DIR_NAME "/dev/dahdi"
00030 #define DAHDI_NAME "DAHDI"
00031
00032 #elif defined(HAVE_ZAPTEL)
00033
00034 #include <zaptel/zaptel.h>
00035
00036 #define DAHDI_DIR_NAME "/dev/zap"
00037 #define DAHDI_NAME "Zaptel"
00038
00039
00040
00041 #if defined(__ZT_SIG_FXO)
00042 #define __DAHDI_SIG_FXO __ZT_SIG_FXO
00043 #endif
00044 #if defined(__ZT_SIG_FXS)
00045 #define __DAHDI_SIG_FXS __ZT_SIG_FXS
00046 #endif
00047 #if defined(ZT_ALARM_BLUE)
00048 #define DAHDI_ALARM_BLUE ZT_ALARM_BLUE
00049 #endif
00050 #if defined(ZT_ALARM_LOOPBACK)
00051 #define DAHDI_ALARM_LOOPBACK ZT_ALARM_LOOPBACK
00052 #endif
00053 #if defined(ZT_ALARM_NONE)
00054 #define DAHDI_ALARM_NONE ZT_ALARM_NONE
00055 #endif
00056 #if defined(ZT_ALARM_NOTOPEN)
00057 #define DAHDI_ALARM_NOTOPEN ZT_ALARM_NOTOPEN
00058 #endif
00059 #if defined(ZT_ALARM_RECOVER)
00060 #define DAHDI_ALARM_RECOVER ZT_ALARM_RECOVER
00061 #endif
00062 #if defined(ZT_ALARM_RED)
00063 #define DAHDI_ALARM_RED ZT_ALARM_RED
00064 #endif
00065 #if defined(ZT_ALARM_YELLOW)
00066 #define DAHDI_ALARM_YELLOW ZT_ALARM_YELLOW
00067 #endif
00068 #if defined(ZT_AUDIOMODE)
00069 #define DAHDI_AUDIOMODE ZT_AUDIOMODE
00070 #endif
00071 #if defined(ZT_CHANNO)
00072 #define DAHDI_CHANNO ZT_CHANNO
00073 #endif
00074 #if defined(ZT_CHECK_HOOKSTATE)
00075 #define DAHDI_CHECK_HOOKSTATE ZT_CHECK_HOOKSTATE
00076 #endif
00077 #if defined(ZT_CONF_CONF)
00078 #define DAHDI_CONF_CONF ZT_CONF_CONF
00079 #endif
00080 #if defined(ZT_CONF_CONFANN)
00081 #define DAHDI_CONF_CONFANN ZT_CONF_CONFANN
00082 #endif
00083 #if defined(ZT_CONF_CONFANNMON)
00084 #define DAHDI_CONF_CONFANNMON ZT_CONF_CONFANNMON
00085 #endif
00086 #if defined(ZT_CONF_CONFMON)
00087 #define DAHDI_CONF_CONFMON ZT_CONF_CONFMON
00088 #endif
00089 #if defined(ZT_CONF_DIGITALMON)
00090 #define DAHDI_CONF_DIGITALMON ZT_CONF_DIGITALMON
00091 #endif
00092 #if defined(ZT_CONF_LISTENER)
00093 #define DAHDI_CONF_LISTENER ZT_CONF_LISTENER
00094 #endif
00095 #if defined(ZT_CONF_MONITORBOTH)
00096 #define DAHDI_CONF_MONITORBOTH ZT_CONF_MONITORBOTH
00097 #endif
00098 #if defined(ZT_CONF_NORMAL)
00099 #define DAHDI_CONF_NORMAL ZT_CONF_NORMAL
00100 #endif
00101 #if defined(ZT_CONF_PSEUDO_LISTENER)
00102 #define DAHDI_CONF_PSEUDO_LISTENER ZT_CONF_PSEUDO_LISTENER
00103 #endif
00104 #if defined(ZT_CONF_PSEUDO_TALKER)
00105 #define DAHDI_CONF_PSEUDO_TALKER ZT_CONF_PSEUDO_TALKER
00106 #endif
00107 #if defined(ZT_CONF_REALANDPSEUDO)
00108 #define DAHDI_CONF_REALANDPSEUDO ZT_CONF_REALANDPSEUDO
00109 #endif
00110 #if defined(ZT_CONF_TALKER)
00111 #define DAHDI_CONF_TALKER ZT_CONF_TALKER
00112 #endif
00113 #if defined(ZT_CONFDIAG)
00114 #define DAHDI_CONFDIAG ZT_CONFDIAG
00115 #endif
00116 #if defined(ZT_CONFMUTE)
00117 #define DAHDI_CONFMUTE ZT_CONFMUTE
00118 #endif
00119 #if defined(ZT_DEFAULT_NUM_BUFS)
00120 #define DAHDI_DEFAULT_NUM_BUFS ZT_DEFAULT_NUM_BUFS
00121 #endif
00122 #if defined(ZT_DIAL)
00123 #define DAHDI_DIAL ZT_DIAL
00124 #endif
00125 #if defined(ZT_DIALING)
00126 #define DAHDI_DIALING ZT_DIALING
00127 #endif
00128 #if defined(ZT_DIAL_OP_APPEND)
00129 #define DAHDI_DIAL_OP_APPEND ZT_DIAL_OP_APPEND
00130 #endif
00131 #if defined(ZT_DIAL_OP_REPLACE)
00132 #define DAHDI_DIAL_OP_REPLACE ZT_DIAL_OP_REPLACE
00133 #endif
00134 #if defined(ZT_ECHOCANCEL)
00135 #define DAHDI_ECHOCANCEL ZT_ECHOCANCEL
00136 #endif
00137 #if defined(ZT_ECHOTRAIN)
00138 #define DAHDI_ECHOTRAIN ZT_ECHOTRAIN
00139 #endif
00140 #if defined(ZT_EVENT_ALARM)
00141 #define DAHDI_EVENT_ALARM ZT_EVENT_ALARM
00142 #endif
00143 #if defined(ZT_EVENT_BITSCHANGED)
00144 #define DAHDI_EVENT_BITSCHANGED ZT_EVENT_BITSCHANGED
00145 #endif
00146 #if defined(ZT_EVENT_DIALCOMPLETE)
00147 #define DAHDI_EVENT_DIALCOMPLETE ZT_EVENT_DIALCOMPLETE
00148 #endif
00149 #if defined(ZT_EVENT_DTMFDOWN)
00150 #define DAHDI_EVENT_DTMFDOWN ZT_EVENT_DTMFDOWN
00151 #endif
00152 #if defined(ZT_EVENT_DTMFUP)
00153 #define DAHDI_EVENT_DTMFUP ZT_EVENT_DTMFUP
00154 #endif
00155 #if defined(ZT_EVENT_EC_DISABLED)
00156 #define DAHDI_EVENT_EC_DISABLED ZT_EVENT_EC_DISABLED
00157 #endif
00158 #if defined(ZT_EVENT_HOOKCOMPLETE)
00159 #define DAHDI_EVENT_HOOKCOMPLETE ZT_EVENT_HOOKCOMPLETE
00160 #endif
00161 #if defined(ZT_EVENT_NOALARM)
00162 #define DAHDI_EVENT_NOALARM ZT_EVENT_NOALARM
00163 #endif
00164 #if defined(ZT_EVENT_NONE)
00165 #define DAHDI_EVENT_NONE ZT_EVENT_NONE
00166 #endif
00167 #if defined(ZT_EVENT_ONHOOK)
00168 #define DAHDI_EVENT_ONHOOK ZT_EVENT_ONHOOK
00169 #endif
00170 #if defined(ZT_EVENT_POLARITY)
00171 #define DAHDI_EVENT_POLARITY ZT_EVENT_POLARITY
00172 #endif
00173 #if defined(ZT_EVENT_PULSEDIGIT)
00174 #define DAHDI_EVENT_PULSEDIGIT ZT_EVENT_PULSEDIGIT
00175 #endif
00176 #if defined(ZT_EVENT_PULSE_START)
00177 #define DAHDI_EVENT_PULSE_START ZT_EVENT_PULSE_START
00178 #endif
00179 #if defined(ZT_EVENT_REMOVED)
00180 #define DAHDI_EVENT_REMOVED ZT_EVENT_REMOVED
00181 #endif
00182 #if defined(ZT_EVENT_RINGBEGIN)
00183 #define DAHDI_EVENT_RINGBEGIN ZT_EVENT_RINGBEGIN
00184 #endif
00185 #if defined(ZT_EVENT_RINGEROFF)
00186 #define DAHDI_EVENT_RINGEROFF ZT_EVENT_RINGEROFF
00187 #endif
00188 #if defined(ZT_EVENT_RINGERON)
00189 #define DAHDI_EVENT_RINGERON ZT_EVENT_RINGERON
00190 #endif
00191 #if defined(ZT_EVENT_RINGOFFHOOK)
00192 #define DAHDI_EVENT_RINGOFFHOOK ZT_EVENT_RINGOFFHOOK
00193 #endif
00194 #if defined(ZT_EVENT_TIMER_EXPIRED)
00195 #define DAHDI_EVENT_TIMER_EXPIRED ZT_EVENT_TIMER_EXPIRED
00196 #endif
00197 #if defined(ZT_EVENT_TIMER_PING)
00198 #define DAHDI_EVENT_TIMER_PING ZT_EVENT_TIMER_PING
00199 #endif
00200 #if defined(ZT_EVENT_WINKFLASH)
00201 #define DAHDI_EVENT_WINKFLASH ZT_EVENT_WINKFLASH
00202 #endif
00203 #if defined(ZT_FLASH)
00204 #define DAHDI_FLASH ZT_FLASH
00205 #endif
00206 #if defined(ZT_FLUSH)
00207 #define DAHDI_FLUSH ZT_FLUSH
00208 #endif
00209 #if defined(ZT_FLUSH_ALL)
00210 #define DAHDI_FLUSH_ALL ZT_FLUSH_ALL
00211 #endif
00212 #if defined(ZT_FLUSH_BOTH)
00213 #define DAHDI_FLUSH_BOTH ZT_FLUSH_BOTH
00214 #endif
00215 #if defined(ZT_FLUSH_READ)
00216 #define DAHDI_FLUSH_READ ZT_FLUSH_READ
00217 #endif
00218 #if defined(ZT_FLUSH_WRITE)
00219 #define DAHDI_FLUSH_WRITE ZT_FLUSH_WRITE
00220 #endif
00221 #if defined(ZT_GET_BUFINFO)
00222 #define DAHDI_GET_BUFINFO ZT_GET_BUFINFO
00223 #endif
00224 #if defined(ZT_GETCONF)
00225 #define DAHDI_GETCONF ZT_GETCONF
00226 #endif
00227 #if defined(ZT_GETCONFMUTE)
00228 #define DAHDI_GETCONFMUTE ZT_GETCONFMUTE
00229 #endif
00230 #if defined(ZT_GETEVENT)
00231 #define DAHDI_GETEVENT ZT_GETEVENT
00232 #endif
00233 #if defined(ZT_GETGAINS)
00234 #define DAHDI_GETGAINS ZT_GETGAINS
00235 #endif
00236 #if defined(ZT_GET_PARAMS)
00237 #define DAHDI_GET_PARAMS ZT_GET_PARAMS
00238 #endif
00239 #if defined(ZT_HOOK)
00240 #define DAHDI_HOOK ZT_HOOK
00241 #endif
00242 #if defined(ZT_IOMUX)
00243 #define DAHDI_IOMUX ZT_IOMUX
00244 #endif
00245 #if defined(ZT_IOMUX_READ)
00246 #define DAHDI_IOMUX_READ ZT_IOMUX_READ
00247 #endif
00248 #if defined(ZT_IOMUX_SIGEVENT)
00249 #define DAHDI_IOMUX_SIGEVENT ZT_IOMUX_SIGEVENT
00250 #endif
00251 #if defined(ZT_IOMUX_WRITE)
00252 #define DAHDI_IOMUX_WRITE ZT_IOMUX_WRITE
00253 #endif
00254 #if defined(ZT_LAW_ALAW)
00255 #define DAHDI_LAW_ALAW ZT_LAW_ALAW
00256 #endif
00257 #if defined(ZT_LAW_DEFAULT)
00258 #define DAHDI_LAW_DEFAULT ZT_LAW_DEFAULT
00259 #endif
00260 #if defined(ZT_LAW_MULAW)
00261 #define DAHDI_LAW_MULAW ZT_LAW_MULAW
00262 #endif
00263 #if defined(ZT_MAX_NUM_BUFS)
00264 #define DAHDI_MAX_NUM_BUFS ZT_MAX_NUM_BUFS
00265 #endif
00266 #if defined(ZT_MAX_SPANS)
00267 #define DAHDI_MAX_SPANS ZT_MAX_SPANS
00268 #endif
00269 #if defined(ZT_OFFHOOK)
00270 #define DAHDI_OFFHOOK ZT_OFFHOOK
00271 #endif
00272 #if defined(ZT_ONHOOK)
00273 #define DAHDI_ONHOOK ZT_ONHOOK
00274 #endif
00275 #if defined(ZT_ONHOOKTRANSFER)
00276 #define DAHDI_ONHOOKTRANSFER ZT_ONHOOKTRANSFER
00277 #endif
00278 #if defined(ZT_POLICY_IMMEDIATE)
00279 #define DAHDI_POLICY_IMMEDIATE ZT_POLICY_IMMEDIATE
00280 #endif
00281 #if defined(ZT_POLICY_WHEN_FULL)
00282 #define DAHDI_POLICY_WHEN_FULL ZT_POLICY_WHEN_FULL
00283 #endif
00284 #if defined(ZT_RING)
00285 #define DAHDI_RING ZT_RING
00286 #endif
00287 #if defined(ZT_RINGOFF)
00288 #define DAHDI_RINGOFF ZT_RINGOFF
00289 #endif
00290 #if defined(ZT_SENDTONE)
00291 #define DAHDI_SENDTONE ZT_SENDTONE
00292 #endif
00293 #if defined(ZT_SET_BLOCKSIZE)
00294 #define DAHDI_SET_BLOCKSIZE ZT_SET_BLOCKSIZE
00295 #endif
00296 #if defined(ZT_SET_BUFINFO)
00297 #define DAHDI_SET_BUFINFO ZT_SET_BUFINFO
00298 #endif
00299 #if defined(ZT_SETCADENCE)
00300 #define DAHDI_SETCADENCE ZT_SETCADENCE
00301 #endif
00302 #if defined(ZT_SETCONF)
00303 #define DAHDI_SETCONF ZT_SETCONF
00304 #endif
00305 #if defined(ZT_SET_DIALPARAMS)
00306 #define DAHDI_SET_DIALPARAMS ZT_SET_DIALPARAMS
00307 #endif
00308 #if defined(ZT_SETGAINS)
00309 #define DAHDI_SETGAINS ZT_SETGAINS
00310 #endif
00311 #if defined(ZT_SETLAW)
00312 #define DAHDI_SETLAW ZT_SETLAW
00313 #endif
00314 #if defined(ZT_SETLINEAR)
00315 #define DAHDI_SETLINEAR ZT_SETLINEAR
00316 #endif
00317 #if defined(ZT_SET_PARAMS)
00318 #define DAHDI_SET_PARAMS ZT_SET_PARAMS
00319 #endif
00320 #if defined(ZT_SETTONEZONE)
00321 #define DAHDI_SETTONEZONE ZT_SETTONEZONE
00322 #endif
00323 #if defined(ZT_SIG_CAS)
00324 #define DAHDI_SIG_CAS ZT_SIG_CAS
00325 #endif
00326 #if defined(ZT_SIG_CLEAR)
00327 #define DAHDI_SIG_CLEAR ZT_SIG_CLEAR
00328 #endif
00329 #if defined(ZT_SIG_EM)
00330 #define DAHDI_SIG_EM ZT_SIG_EM
00331 #endif
00332 #if defined(ZT_SIG_EM_E1)
00333 #define DAHDI_SIG_EM_E1 ZT_SIG_EM_E1
00334 #endif
00335 #if defined(ZT_SIG_FXO)
00336 #define DAHDI_SIG_FXO ZT_SIG_FXO
00337 #endif
00338 #if defined(ZT_SIG_FXOGS)
00339 #define DAHDI_SIG_FXOGS ZT_SIG_FXOGS
00340 #endif
00341 #if defined(ZT_SIG_FXOKS)
00342 #define DAHDI_SIG_FXOKS ZT_SIG_FXOKS
00343 #endif
00344 #if defined(ZT_SIG_FXOLS)
00345 #define DAHDI_SIG_FXOLS ZT_SIG_FXOLS
00346 #endif
00347 #if defined(ZT_SIG_FXS)
00348 #define DAHDI_SIG_FXS ZT_SIG_FXS
00349 #endif
00350 #if defined(ZT_SIG_FXSGS)
00351 #define DAHDI_SIG_FXSGS ZT_SIG_FXSGS
00352 #endif
00353 #if defined(ZT_SIG_FXSKS)
00354 #define DAHDI_SIG_FXSKS ZT_SIG_FXSKS
00355 #endif
00356 #if defined(ZT_SIG_FXSLS)
00357 #define DAHDI_SIG_FXSLS ZT_SIG_FXSLS
00358 #endif
00359 #if defined(ZT_SIG_HARDHDLC)
00360 #define DAHDI_SIG_HARDHDLC ZT_SIG_HARDHDLC
00361 #endif
00362 #if defined(ZT_SIG_HDLCFCS)
00363 #define DAHDI_SIG_HDLCFCS ZT_SIG_HDLCFCS
00364 #endif
00365 #if defined(ZT_SIG_SF)
00366 #define DAHDI_SIG_SF ZT_SIG_SF
00367 #endif
00368 #if defined(ZT_SPANSTAT)
00369 #define DAHDI_SPANSTAT ZT_SPANSTAT
00370 #endif
00371 #if defined(ZT_SPECIFY)
00372 #define DAHDI_SPECIFY ZT_SPECIFY
00373 #endif
00374 #if defined(ZT_START)
00375 #define DAHDI_START ZT_START
00376 #endif
00377 #if defined(ZT_TC_ALLOCATE)
00378 #define DAHDI_TC_ALLOCATE ZT_TC_ALLOCATE
00379 #endif
00380 #if defined(ZT_TC_GETINFO)
00381 #define DAHDI_TC_GETINFO ZT_TC_GETINFO
00382 #endif
00383 #if defined(ZT_TIMERACK)
00384 #define DAHDI_TIMERACK ZT_TIMERACK
00385 #endif
00386 #if defined(ZT_TIMERCONFIG)
00387 #define DAHDI_TIMERCONFIG ZT_TIMERCONFIG
00388 #endif
00389 #if defined(ZT_TIMERPING)
00390 #define DAHDI_TIMERPING ZT_TIMERPING
00391 #endif
00392 #if defined(ZT_TIMERPONG)
00393 #define DAHDI_TIMERPONG ZT_TIMERPONG
00394 #endif
00395 #if defined(ZT_TONE_BUSY)
00396 #define DAHDI_TONE_BUSY ZT_TONE_BUSY
00397 #endif
00398 #if defined(ZT_TONE_CONGESTION)
00399 #define DAHDI_TONE_CONGESTION ZT_TONE_CONGESTION
00400 #endif
00401 #if defined(ZT_TONEDETECT)
00402 #define DAHDI_TONEDETECT ZT_TONEDETECT
00403 #endif
00404 #if defined(ZT_TONEDETECT_MUTE)
00405 #define DAHDI_TONEDETECT_MUTE ZT_TONEDETECT_MUTE
00406 #endif
00407 #if defined(ZT_TONEDETECT_ON)
00408 #define DAHDI_TONEDETECT_ON ZT_TONEDETECT_ON
00409 #endif
00410 #if defined(ZT_TONE_DIALRECALL)
00411 #define DAHDI_TONE_DIALRECALL ZT_TONE_DIALRECALL
00412 #endif
00413 #if defined(ZT_TONE_DIALTONE)
00414 #define DAHDI_TONE_DIALTONE ZT_TONE_DIALTONE
00415 #endif
00416 #if defined(ZT_TONE_DTMF_BASE)
00417 #define DAHDI_TONE_DTMF_BASE ZT_TONE_DTMF_BASE
00418 #endif
00419 #if defined(ZT_TONE_INFO)
00420 #define DAHDI_TONE_INFO ZT_TONE_INFO
00421 #endif
00422 #if defined(ZT_TONE_RINGTONE)
00423 #define DAHDI_TONE_RINGTONE ZT_TONE_RINGTONE
00424 #endif
00425 #if defined(ZT_TONE_STUTTER)
00426 #define DAHDI_TONE_STUTTER ZT_TONE_STUTTER
00427 #endif
00428 #if defined(ZT_vldtmf)
00429 #define DAHDI_vldtmf ZT_vldtmf
00430 #endif
00431 #if defined(ZT_WINK)
00432 #define DAHDI_WINK ZT_WINK
00433 #endif
00434 #if defined(HAVE_ZAPTEL)
00435 #define HAVE_DAHDI HAVE_ZAPTEL
00436 #endif
00437
00438 #define DAHDI_TONE_DTMF_A ZT_TONE_DTMF_A
00439 #define DAHDI_TONE_DTMF_p ZT_TONE_DTMF_p
00440 #define DAHDI_TONE_DTMF_s ZT_TONE_DTMF_s
00441
00442 #define dahdi_bufferinfo zt_bufferinfo
00443 #define dahdi_confinfo zt_confinfo
00444 #define dahdi_dialoperation zt_dialoperation
00445 #define dahdi_dialparams zt_dialparams
00446 #define dahdi_gains zt_gains
00447 #define dahdi_params zt_params
00448 #define dahdi_ring_cadence zt_ring_cadence
00449 #define dahdi_spaninfo zt_spaninfo
00450 #define dahdi_transcoder_info zt_transcoder_info
00451 #define dahdi_transcoder_formats zt_transcoder_formats
00452
00453 #endif
00454
00455 #define DAHDI_FILE_CHANNEL DAHDI_DIR_NAME "/channel"
00456 #define DAHDI_FILE_CTL DAHDI_DIR_NAME "/ctl"
00457 #define DAHDI_FILE_PSEUDO DAHDI_DIR_NAME "/pseudo"
00458 #define DAHDI_FILE_TIMER DAHDI_DIR_NAME "/timer"
00459 #define DAHDI_FILE_TRANSCODE DAHDI_DIR_NAME "/transcode"
00460
00461 #endif