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-day47--pymysql模块
一.安装导入 #安装 pip3 install pymysql 二.使用 1 .基本使用 import pymysql # 链接,拿到游标 conn=pymysql.connect(host='loc ...
- notepad++设置右键
Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\*\Shell\NotePad++][HKEY_CLASSES_ROOT\*\Shell\ ...
- swiper中的默认值的属性和作用(小程序交流群:604788754)
swiper中的重要属性: vertical:属性,控制swiper效果是水平切换滚动,还是垂直切换滚动.如果不设置此属性,默认是水平滚动,如果设置:vertical="true" ...
- 字符串 date 转标准 yyyyMMdd 格式
学习转换成数字相加的思想 public static int ToDateInt(string dateStr) { if (string.IsNullOrEmpt ...
- 网络协议栈学习(一)socket通信实例
网络协议栈学习(一)socket通信实例 该实例摘自<linux网络编程>(宋敬彬,孙海滨等著). 例子分为服务器端和客户端,客户端连接服务器后从标准输入读取输入的字符串,发送给服务器:服 ...
- re 正则
如果直接给出字符,就是精确匹配.对于特殊字符- ,在正则表达式中要用转义字符\转义. \d 一个数字, \w 任意单个字符,空白符除外(例 字母.数字或下划线 . 英 ...
- DevExpress v17.2新版亮点—DevExtreme篇(三)
用户界面套包DevExpress DevExtreme v17.2终于正式发布,本站将以连载的形式为大家介绍各版本新增内容.本文将介绍了DevExtreme v17.2 的New Color Sche ...
- log4j的配置详解(转)
转自:http://blog.sina.com.cn/s/blog_5ed94d710101go3u.html 最近使用log4j写log时候发现网上的写的都是千篇一律,写的好的嘛不全,写的全一点的嘛 ...
- Final阶段第1周/共1周 Scrum立会报告+燃尽图 01
作业要求[https://edu.cnblogs.com/campus/nenu/2018fall/homework/2411] 版本控制:https://git.coding.net/liuyy08 ...
- UITableView简述
原帖:http://blog.csdn.net/totogo2010/article/details/7642908 Table View简单描述: 在iPhone和其他iOS的很多程序中都会看到Ta ...