asterisk channel driver dev ref
入口函数load_module
load_config
ast_channel_register console_tech
ast_cli_register_multiple
console_tech需要提供一系列的毁掉函数,比如
static struct ast_channel_tech console_tech = {
.type = "Console",
.description = "Console Channel Driver",
.requester = console_request,
.send_digit_begin = console_digit_begin,
.send_digit_end = console_digit_end,
.send_text = console_text,
.hangup = console_hangup,
.answer = console_answer,
.read = console_read,
.call = console_call,
.write = console_write,
.indicate = console_indicate,
.fixup = console_fixup,
};
answer一般会启动monitor thread
sample: chan_console.c
http://svn.asterisk.org/svn/asterisk/trunk/channels/chan_oss.c
https://code.google.com/p/asterisk-chan-dongle/
讨论
http://lists.digium.com/pipermail/asterisk-dev/2008-January/031719.html
load_module
ast_calloc gpublic
pdiscovery_init
cache_init
AST_RWLIST_HEAD_INIT
public_state_init
reload_config
discovery_restart
ast_pthread_create_background( do_discovery )
the thread loops all devices
看看要做啥就做啥,比如
打开设备opentty
start_monitor monitor_thread do_monitor_phone
该线程监视data_fd和audio_fd
port_status
tcgetattr
at_wait
at_read
PVT_STAT
at_read_result_iov
at_read_result_classification
at_response
移除设备AST_RWLIST_REMOVE_CURRENT, pvt_free
ast_channel_register(&channel_tech)
cli_register
app_register
manager_register
discovery_stop
devices_destroy
public_state
devices
a list
AST_RWLIST_HEAD_INIT
AST_RWLIST_RDLOCK
AST_RWLIST_TRAVERSE
discovery_lock
a mutex
ast_mutex_init
ast_mutex_lock
ast_mutex_destroy
discovery_thread
a thread
?
asterisk channel driver dev ref的更多相关文章
- golang 中 channel 的详细使用、使用注意事项及死锁分析
目录 1.什么是 channel,介绍管道 2.channel 的基本使用 3.channel 的使用场景 4.使用 channel的注意事项及死锁分析 什么是 channel 管道 它是一个数据管道 ...
- openerp - asterisk connector(转载)
原文:http://www.akretion.com/open-source-contributions/openerp-asterisk-voip-connector OpenERP - Aster ...
- linux driver module
本文将对Linux系统中的sysfs进行简单的分析,要分析sysfs就必须分析内核的driver-model(驱动模型),两者是紧密联系的.在分析过程中,本文将以platform总线和spi主控制器的 ...
- 安装asterisk
在centos6.5上: yum -y install lynx mysql-server mysql mysql-devel php php-mysql php-mbstring tftp-serv ...
- Asterisk重要App
elastix82*CLI> core show application SoftHangup -= Info about application 'SoftHangup' =- [Synop ...
- Asterisk 代码架构概述
from:http://blog.csdn.net/yetyongjin/article/details/7594447 近日分析Asterisk 1.8源码.Asterisk trunk上有这篇架构 ...
- devices-list
转自:https://www.kernel.org/pub/linux/docs/lanana/device-list/devices-2.6.txt LINUX ALLOCATED DEVICES ...
- 【Python】 Django 怎么实现 联合主键?
unique_together¶ Options.unique_together¶ Sets of field names that, taken together, must be unique: ...
- Linux下编译内核配置选项简介
Code maturity level options代码成熟度选项 Prompt for development and/or incomplete code/drivers 显示尚在开发中或尚未完 ...
随机推荐
- python-day37--concurrent.futures模块 实现进程池与线程池
1.concurrent.futures模块 直接内置就是 异步的提交 ,如果你想同步也可以实现(p.submit(task,i).result()即同步执行) 2.属性和方法: 1.submit ...
- POJ-3635 Full Tank? (记忆化广搜)
Description After going through the receipts from your car trip through Europe this summer, you real ...
- C# / .NET 在类中使用Server.MapPath
直接在类中使用 Server.MapPath 会出现错误,这是由于类中不能直接使用 System.Web.UI.Page 的非静态函数造成的.解决方法有两种: 方法一.使类继承System.Web.U ...
- RabbitMQ脑裂问题解决方案调查
现象: RabbitMQ GUI上显示 Network partition detectedMnesia reports that this RabbitMQ cluster has experien ...
- WindowsLiveWriter安装步骤
WindowsLiveWriter 安装WindowsLiveWriter.exe http://www.cnblogs.com/rhxuza1993/
- Win32.com安装
Win32.com安装 http://sourceforge.net/projects/pywin32/files/pywin32
- CAS 服务端数据库认证
CAS-服务端数据库认证 数据认证需要相关的jar包: cas-server-support-jdbc-x.x.x.jar MySQL-connector-Java-x.x.x-bin.jar 修改C ...
- sgu101 欧拉路径 难度:1
101. Domino time limit per test: 0.25 sec. memory limit per test: 4096 KB Dominoes – game played wit ...
- Python Oracle数据库监控
有的时候无法使用Oracle自带的OEM监控,那么就需要确定一个监控方案. 此方案,使用Python+Prometheus+Grafana+Oracle 1.监控配置表 -- Create table ...
- Java——IO类,字节流读数据
body, table{font-family: 微软雅黑} table{border-collapse: collapse; border: solid gray; border-width: 2p ...