织梦CMS - 轻松建站从此开始!

罗索

Osip/eXosip Source Code Analysis(2)

落鹤生 发布于 2011-05-13 09:25 点击:次 
eXosip_call_build_initial_invite eXosip_call_send_initial_invite eXosip_call_init osip_transaction_init to init a ICT transaction osip_new_outgoing_sipmessage to create a osip event osip_transaction_a
TAG:

eXosip_call_build_initial_invite

eXosip_call_send_initial_invite

eXosip_call_init

osip_transaction_init to init a ICT transaction

osip_new_outgoing_sipmessage to create a osip event

osip_transaction_add_event to add event to transaction FIFO

__eXosip_wakeup to wake up _eXosip_thread to handle the event

            _eXosip_thread call osip_ict_execute, osip_ict_execute call osip_transaction_execute to find the type of event, get that type of fsm, and then call fsm_callmethod to handle the event. As the above description, fsm_callmethod will find the transition according to event type and transaction state, and the call transition->method. For ICT transaction in ICT_PRE_CALLING state, __ict_load_fsm set method to ict_snd_invite

            ict_snd_invite will call osip-> cb_send_message, which is set by eXosip_set_callbacks as cb_snd_message

            cb_snd_message will send the message to remote peer. _eXosip_thread will wait for remote response, and call osip_ict_execute to handle the response. The transaction state machine will be changed to different state according to the response. Meanwhile, the state machine will call callback set by eXosip_set_callbacks to notify eXosip state change. When eXosip receive the notification, eXosip will send eXosip-defined event to upper layer by  queuing it to j_events. Upper layer applilcation which should call eXosip_event_wait to wait for events will get event, and handle it. Please refer to the example application  UCT IMS Client.

 

4 The process to receive an incoming message

It is processed in _eXosip_thread:

receives the incoming message

eXosip_process_newrequest to create a new transaction, put to transaction FIFO

osip_ist_execute will handle the event

the following process is similar to osip_ict_execute described on the section 3.

(zblue78)
本站文章除注明转载外,均为本站原创或编译欢迎任何形式的转载,但请务必注明出处,尊重他人劳动,同学习共成长。转载请注明:文章转载自:罗索实验室 [http://www.rosoo.net/a/201105/11670.html]
本文出处:CSDN博客 作者:zblue78
顶一下
(1)
100%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
将本文分享到微信
织梦二维码生成器
推荐内容