root/src/ftmod/ftmod_analog/ftdm_analog.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2007, Anthony Minessale II
   3  * All rights reserved.
   4  * 
   5  * Redistribution and use in source and binary forms, with or without
   6  * modification, are permitted provided that the following conditions
   7  * are met:
   8  * 
   9  * * Redistributions of source code must retain the above copyright
  10  * notice, this list of conditions and the following disclaimer.
  11  * 
  12  * * Redistributions in binary form must reproduce the above copyright
  13  * notice, this list of conditions and the following disclaimer in the
  14  * documentation and/or other materials provided with the distribution.
  15  * 
  16  * * Neither the name of the original author; nor the names of any contributors
  17  * may be used to endorse or promote products derived from this software
  18  * without specific prior written permission.
  19  * 
  20  * 
  21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24  * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER
  25  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  26  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  27  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  28  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  29  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  30  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  31  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32  */
  33 
  34 #ifndef FTDM_ANALOG_H
  35 #define FTDM_ANALOG_H
  36 #include "freetdm.h"
  37 
  38 typedef enum {
  39         FTDM_ANALOG_RUNNING = (1 << 0),
  40         FTDM_ANALOG_CALLERID = (1 << 1),
  41         FTDM_ANALOG_ANSWER_POLARITY_REVERSE = (1 << 2),
  42         FTDM_ANALOG_HANGUP_POLARITY_REVERSE = (1 << 3)
  43 } ftdm_analog_flag_t;
  44 
  45 #define FTDM_MAX_HOTLINE_STR            20
  46 #define MAX_DTMF 256
  47 
  48 struct ftdm_analog_data {
  49         uint32_t flags;
  50         uint32_t max_dialstr;
  51         uint32_t wait_dialtone_timeout;
  52         uint32_t polarity_delay;
  53         uint32_t digit_timeout;
  54         char hotline[FTDM_MAX_HOTLINE_STR];
  55 };
  56 
  57 /* Analog flags to be set in the sflags (signaling flags) channel memeber */
  58 #define AF_POLARITY_REVERSE (1 << 0)
  59 
  60 static void *ftdm_analog_run(ftdm_thread_t *me, void *obj);
  61 typedef struct ftdm_analog_data ftdm_analog_data_t;
  62 
  63 #endif
  64 
  65 /* For Emacs:
  66  * Local Variables:
  67  * mode:c
  68  * indent-tabs-mode:t
  69  * tab-width:4
  70  * c-basic-offset:4
  71  * End:
  72  * For VIM:
  73  * vim:set softtabstop=4 shiftwidth=4 tabstop=4:
  74  */

/* [<][>][^][v][top][bottom][index][help] */