- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Asterisk1.2
配置文件参数读取相关的
ast_config_engine_register
reload_queues-ast_config_load-ast_config_internal_load-load_func(queues.conf时就是config_text_file_load)- process_text_line
- ast_category_browse
- ast_variable_browse
- queue_set_param
asterisk.c/main- read_config_maps- ast_config_internal_load- config_text_file_load
- ast_variable_browse
- append_mapping
chan_sip.c/ do_monitor
do_monitor - ast_io_add
- sip_do_reload- sip_poke_all_peers
- sip_send_all_registers
- ast_softhangup_nolock- ast_queue_frame
- pthread_testcancel
- ast_sched_wait
- ast_io_wait- sipsock_read
- ast_sched_runq //在调用callback时调用的函数是用ast_sched_add 时设置的回调。
收到一个invite时的处理函数:
系统初始化时:
load_module -restart_monitor 起一个线程–do_monitor一个死循环,接收sip信令,\
This thread monitors all the SIP sessions and peers that needs notification of mwi (and thus do not have a separate thread) indefinitely\
-ast_io_add//设置回调函数sipsock_read, Add an I/O event to our SIP UDP socket, 有事件时则回调sipsock_read 读取socket数据
-rtp.c/ast_rtp_sendcng
-ast_sched_wait
-ast_io_wait//将调用sipsock_read
-ast_sched_runq
- sip_send_mwi_to_peer
在reload- sip_reload- restart_monitor 也会调用restart_monitor
*************Chan_sip.c/ sip_tech
收到一个invite时的处理函数:
sipsock_read -parse_request//解析了消息的头部和体部,解析方法名
- find_sip_method//找到方法名对应的ID
- find_call-get_header
-gettag
-sip_alloc//找不到/不存在,就分配一个,这里的是主叫的sip_pvt
-handle_request- get_header
//当收到响应消息时,会调用handle_response
-handle_response- hangup_sip2cause
- __sip_semi_ack
- __sip_ack
- handle_response_peerpoke- transmit_request- reqprep
- send_request- __sip_xmit- sendto
- handle_response_invite
- handle_request_options
- handle_request_refer
- handle_request_cancel
- handle_request_bye
- handle_request_message
- handle_request_subscribe
- handle_request_register
- handle_request_info
//当收到invite时,会调用handle_request_invite
- handle_request_inv
您可能关注的文档
最近下载
- 领读经典-外国文学(1)(山东大学)中国大学MOOC慕课 章节测验期末考试客观题答案.docx VIP
- 《电机与拖动基础》课件(共十一章).ppt VIP
- 《PyTorch与深度学习实战》第2章 PyTorch深度学习通用流程.pptx VIP
- 简谱D 想着我Think of Me简谱歌剧魅影.pdf VIP
- 2023-2024学年安徽省马鞍山市第八中学九年级上学期期中考试化学试卷.pdf VIP
- 《PyTorch与深度学习实战》第3章 PyTorch深度学习基础.pptx VIP
- 好书推荐《朝花夕拾》读书分享名著导读PPT课件.pptx VIP
- 22个专业95个病种中医临床诊疗方案目录44.pdf VIP
- 精品解析:天津市第四十三中学2024-2025学年高一上学期第一次月考英语试题(解析版).docx VIP
- 2025年北京市东城区九年级初三一模语文试卷(含答案).docx
文档评论(0)