- 129
- 0
- 约 103页
- 2017-05-27 发布于河南
- 举报
asterisk代码学习笔记
Asterisk1.2配置文件参数读取相关的ast_config_engine_registerreload_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_paramasterisk.c/main- read_config_maps- ast_config_internal_load- config_text_file_load - ast_variable_browse - append_mappingchan_sip.c/ do_monitordo_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_invite- transmit_response_with_unsupported-respprep- init_resp- copy_via_headers- __get_header- add_header- copy_all_header - __get_header - add_header- copy_header-send_response- parse_copy-append_history- __sip_xmi
您可能关注的文档
最近下载
- 2024年潍坊护理职业学院高职单招(英语/数学/语文)笔试2018-2023历年真题摘选带答案解析.docx VIP
- 《智能管理系统创新与发展》课件.ppt VIP
- 仁爱版七年级下册英语单词默写表(中文版).pdf VIP
- 2025年潍坊护理职业学院单招笔试数学试题库含答案解析.docx VIP
- 2025郑州中考一模化学试卷.docx VIP
- 2025河北单招第七类综合素质真题 .pdf VIP
- 2025黑龙江林业职业技术学院单招《数学》经典例题含答案详解(能力提升).docx VIP
- 大病低保申请书.docx VIP
- 发热伴血小板减少综合征药物治疗指南(2025年版)解读PPT课件.pptx VIP
- 2020泰和安TG3100广播控制盘安装使用说明书.pdf VIP
原创力文档

文档评论(0)