00001 /* 00002 * SpanDSP - a series of DSP components for telephony 00003 * 00004 * private/adsi.h - Analogue display services interface and other call ID related handling. 00005 * 00006 * Written by Steve Underwood <steveu@coppice.org> 00007 * 00008 * Copyright (C) 2003 Steve Underwood 00009 * 00010 * All rights reserved. 00011 * 00012 * This program is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 2.1, 00014 * as published by the Free Software Foundation. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public 00022 * License along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00024 * 00025 * $Id: adsi.h,v 1.1 2008/10/13 13:14:01 steveu Exp $ 00026 */ 00027 00028 /*! \file */ 00029 00030 #if !defined(_SPANDSP_PRIVATE_ADSI_H_) 00031 #define _SPANDSP_PRIVATE_ADSI_H_ 00032 00033 /*! 00034 ADSI transmitter descriptor. This contains all the state information for an ADSI 00035 (caller ID, CLASS, CLIP, ACLIP) transmit channel. 00036 */ 00037 struct adsi_tx_state_s 00038 { 00039 int standard; 00040 00041 tone_gen_descriptor_t alert_tone_desc; 00042 tone_gen_state_t alert_tone_gen; 00043 fsk_tx_state_t fsktx; 00044 dtmf_tx_state_t dtmftx; 00045 async_tx_state_t asynctx; 00046 00047 int tx_signal_on; 00048 00049 int byte_no; 00050 int bit_pos; 00051 int bit_no; 00052 uint8_t msg[256]; 00053 int msg_len; 00054 int preamble_len; 00055 int preamble_ones_len; 00056 int postamble_ones_len; 00057 int stop_bits; 00058 int baudot_shift; 00059 00060 logging_state_t logging; 00061 }; 00062 00063 /*! 00064 ADSI receiver descriptor. This contains all the state information for an ADSI 00065 (caller ID, CLASS, CLIP, ACLIP, JCLIP) receive channel. 00066 */ 00067 struct adsi_rx_state_s 00068 { 00069 int standard; 00070 put_msg_func_t put_msg; 00071 void *user_data; 00072 00073 fsk_rx_state_t fskrx; 00074 dtmf_rx_state_t dtmfrx; 00075 async_rx_state_t asyncrx; 00076 00077 int consecutive_ones; 00078 int bit_pos; 00079 int in_progress; 00080 uint8_t msg[256]; 00081 int msg_len; 00082 int baudot_shift; 00083 00084 /*! A count of the framing errors. */ 00085 int framing_errors; 00086 00087 logging_state_t logging; 00088 }; 00089 00090 #endif 00091 /*- End of file ------------------------------------------------------------*/