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) |