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 显示尚在开发中或尚未完 ...
随机推荐
- hdu-4678-sg
Mine Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submis ...
- spark collect获取所有元素
from pyspark import SparkConf, SparkContext conf = SparkConf().setMaster("local").setAppNa ...
- 微信小程序--登录流程梳理
前言 微信小程序凡是需要记录用户信息都需要登录,但是也有几种不同的登录方式,但是在小程序部分的登录流程是一样的.之前就朦朦胧胧地用之前项目的逻辑改改直接用了,这个新项目要用就又结合官方文档重新梳理了下 ...
- 使用axios发送post请求,将JSON数据改为为form类型
我的github(PS:希望star):https://github.com/thWinterSun/v-admin 通常前端通过POST请求向服务器端提交数据格式有4中,分别是"appli ...
- spring boot 学习(十四)SpringBoot+Redis+SpringSession缓存之实战
SpringBoot + Redis +SpringSession 缓存之实战 前言 前几天,从师兄那儿了解到EhCache是进程内的缓存框架,虽然它已经提供了集群环境下的缓存同步策略,这种同步仍然需 ...
- Visual C++ 使用纪要
1.取消在查找中标记的蓝色小方块 Ctrl+Shift+F2 取消所有标记 2.出现LINK错误 : fatal error LNK1168: cannot open Debug/x.exe for ...
- Unity5.2如何使用VS调试
今天不想使用Mono了,想用VS调试Unity,上百度搜了很久无果,VPN又连不上,结果搞两个小时没搞定.11点终于可以上谷歌了,十分钟搞定.由此可见,百度真的很坑爹...废话不多说下面上正文. 误区 ...
- Supervisor 配置过程
Supervisor 配置过程 (转自https://www.izixia.cn/2016/01/03/supervisor-pei-zhi-guo-cheng/) 1.安装 pip install ...
- L217
China has announced that it will further simplify the approval procedures for the private sector to ...
- Alpha版本展示
一.团队成员的简介和个人博客地址,团队的源码仓库地址. 1.团队的源码仓库地址 我们主要通过码云来管理代码,码云地址:https://gitee.com/ljl36/team_programming ...