61#define TDD_SPACE   1800.0       
   62#define TDD_MARK    1400.0       
   66    static char ltrs[32] = { 
'<',
'E',
'\n',
'A',
' ',
'S',
'I',
'U',
 
   67                             '\n',
'D',
'R',
'J',
'N',
'F',
'C',
'K',
 
   68                             'T',
'Z',
'L',
'W',
'H',
'Y',
'P',
'Q',
 
   69                             'O',
'B',
'G',
'^',
'M',
'X',
'V',
'^' };
 
   70    static char figs[32] = { 
'<',
'3',
'\n',
'-',
' ',
'\'',
'8',
'7',
 
   71                             '\n',
'$',
'4',
'\'',
',',
'!',
':',
'(',
 
   72                             '5',
'\"',
')',
'2',
'=',
'6',
'0',
'1',
 
   73                             '9',
'?',
'+',
'^',
'.',
'/',
';',
'^' };
 
 
  108#ifdef INTEGER_CALLERID 
 
  176    for (x = 0; x < 
len; x++)
 
  179    while (mylen >= 1320) { 
 
  183            ast_log(
LOG_ERROR, 
"fsk_serial made mylen < 0 (%d) (olen was %d)\n", mylen, olen);
 
  187        buf += (olen - mylen);
 
  198            if ((
c < 1) || (
c > 126))
 
 
  227    t = *cr * 
dr[bit] - *ci * 
di[bit];
 
  228    *ci = *cr * 
di[bit] + *ci * 
dr[bit];
 
  231    t = 2.0 - (*cr * *cr + *ci * *ci);
 
 
  237#define PUT_BYTE(a) do { \ 
 
  242#define PUT_AUDIO_SAMPLE(y) do { \ 
  243    int __pas_idx = (short)(rint(8192.0 * (y))); \ 
  244    *(buf++) = AST_LIN2MU(__pas_idx); \ 
 
  248#define PUT_TDD_MARKMS do { \ 
  250    for (x = 0; x < 8; x++) \ 
  251        PUT_AUDIO_SAMPLE(tdd_getcarrier(&cr, &ci, 1)); \ 
 
  254#define PUT_TDD_BAUD(bit) do { \ 
  255    while (scont < tddsb) { \ 
  256        PUT_AUDIO_SAMPLE(tdd_getcarrier(&cr, &ci, bit)); \ 
 
  262#define PUT_TDD_STOP do { \ 
  263    while (scont < (tddsb * 1.5)) { \ 
  264        PUT_AUDIO_SAMPLE(tdd_getcarrier(&cr, &ci, 1)); \ 
  267    scont -= (tddsb * 1.5); \ 
 
  271#define PUT_TDD(byte) do { \ 
  273    unsigned char b = (byte); \ 
  275    for (z = 0; z < 5; z++) { \ 
  276        PUT_TDD_BAUD(b & 1); \ 
 
  288    float scont = 0.0, cr = 1.0, ci=0.0;
 
  289    while (scont < 
tddsb * 10.0) {
 
 
  302    static unsigned char lstr[31] = 
"\000E\nA SIU\rDRJNFCKTZLWHYPQOBG\000MXV";
 
  304    static unsigned char fstr[31] = 
"\0003\n- \00787\r$4',!:(5\")2\0006019?+\000./;";
 
  310    for(x = 0; 
str[x]; x++) {
 
  312        if ( (tdd->
charnum++) % 72 == 0)
 
  317        printf(
"%c",
c); fflush(stdout);
 
  336        for (i = 0; i < 31; i++) {
 
  348        for (i = 0; i < 31; i++) {
 
  353            if (tdd->
mode != 1) { 
 
 
Asterisk main include file. File version handling, generic pbx functions.
#define ast_calloc(num, len)
A wrapper for calloc()
static unsigned char ecdisa[80]
int fsk_serial(fsk_data *fskd, short *buffer, int *len, int *outbyte)
Retrieve a serial byte into outbyte. Buffer is a pointer into a series of shorts and len records the ...
int fskmodem_init(fsk_data *fskd)
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
Support for logging to various files, console and syslog Configuration in file logger....
static int tdd_decode_baudot(struct tdd_state *tdd, unsigned char data)
static float tdd_getcarrier(float *cr, float *ci, int bit)
int tdd_feed(struct tdd_state *tdd, unsigned char *ubuf, int len)
#define PUT_AUDIO_SAMPLE(y)
int tdd_gen_holdtone(unsigned char *buf)
struct tdd_state * tdd_new(void)
void tdd_free(struct tdd_state *tdd)
int ast_tdd_gen_ecdisa(unsigned char *outbuf, int len)
int tdd_generate(struct tdd_state *tdd, unsigned char *buf, const char *str)
TTY/TDD Generation support.
Time-related functions and macros.
u-Law to Signed linear conversion