⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 transport.h

📁 asterisk1.4.6版本下 7#信令驱动 源码
💻 H
字号:
/* transport.h - MTP/audio transport
 * Author: Anders Baekgaard <ab@dicea.dk>
 * This work is included with chan_ss7, see copyright below.
 */

/*
 * This file is part of chan_ss7.
 *
 * chan_ss7 is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * chan_ss7 is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with chan_ss7; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */


/* We read audio in chunks of 160 bytes = 20 msec. */
#define AUDIO_READSIZE 160
/* We run the signalling link in clear channel mode, since we have seen
   unreliable behaviour with the zaptel HDLC/FCS code, and since it gives
   more control of buffering and better diagnostics (raw bit dumps ...).

   Use 4 buffers of 16 bytes each; that amounts to around 8 msecs of
   latency of write and of read slack before packet loss. An 8 byte buffer
   size is the minimum allowed, giving maximum responsiveness.
*/
enum {
  NUM_ZAP_BUF = 4,
#ifdef MTP_OVER_UDP
  ZAP_BUF_SIZE = 64,
#else
  ZAP_BUF_SIZE = 16,
#endif
};

int openchannel(struct link* link, int channel);
void flushchannel(int fd, int cic);
int adjust_buffers(int fd, int cic);
int openschannel(struct link* link);
int io_get_zaptel_event(int fd, int* e);
int io_enable_echo_cancellation(int fd, int cic, int echocan_taps, int echocan_train);
void io_disable_echo_cancellation(int fd, int cic);
int io_send_dtmf(int fd, int cic, char digit);
void set_audiomode(int fd);
void clear_audiomode(int fd);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -