Asterisk(PBX)通道驱动read()回调函数始终未触发的问题求助
Asterisk(PBX)通道驱动read()回调函数始终未触发的问题求助
各位好,我最近在开发Asterisk的自定义通道驱动,卡了好几天的问题实在搞不定了——驱动里的read()回调函数完全没被触发,试了好几种排查思路都没进展,想请大家帮忙分析下可能的原因。
先贴一下我定义的通道驱动结构体代码:
struct ast_channel_tech custom_tech = { .type = "Custom", .description = "Custom Channel Driver", .requester = custom_request, .call = custom_call, .hangup = custom_hangup, .answer = custom_answer, .read = custom_read, .write = custom_write, };
这是模块加载的代码片段:
static int load_module(void) { ast_log(LOG_NOTICE, "Loading Custom Channel Driver\n"); if (!(custom_tech.capabilities =
(注:上面的加载代码还没写完,是我当前实现到一半的状态)
目前模块已经能成功加载,日志里能看到加载成功的提示,通道的其他回调比如answer()、write()都能正常触发,唯独read()完全没动静。我检查过通道的状态,也确认了有媒体数据应该被读取,但就是没触发这个回调。有没有大佬能给点排查方向或者指出我可能忽略的点?
内容来源于stack exchange
相关产品推荐
相关产品推荐

