📄 osip.h
字号:
#ifndef DOXYGEN/** * Check if this transaction needs a TIMEOUT_A event * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param ict The element to work on. * @param state The actual state of the transaction. * @param transactionid The transaction id. */ sipevent_t *ict_need_timer_a_event (ict_t * ict, state_t state, int transactionid);/** * Check if this transaction needs a TIMEOUT_B event * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param ict The element to work on. * @param state The actual state of the transaction. * @param transactionid The transaction id. */ sipevent_t *ict_need_timer_b_event (ict_t * ict, state_t state, int transactionid);/** * Check if this transaction needs a TIMEOUT_D event * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param ict The element to work on. * @param state The actual state of the transaction. * @param transactionid The transaction id. */ sipevent_t *ict_need_timer_d_event (ict_t * ict, state_t state, int transactionid);/** * Allocate an nict_t element. (for outgoing NON-INVITE transaction) * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param nict The element to allocate. * @param osip The global instance of oSIP. * @param request The SIP request that initiate the transaction. */ int nict_init (nict_t ** nict, osip_t * osip, sip_t * request);/** * Free all resource in an nict_t element. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param nict The element to free. */ int nict_free (nict_t * nict);#endif/** * Set the host and port destination used for sending the SIP message. * This can be useful for an application with 'DIRECT ROOTING MODE' * NOTE: Instead, you should use the 'Route' header facility which * leads to the same behaviour. * @param nict The element to work on. * @param destination The destination host. * @param port The destination port. */ int nict_set_destination (nict_t * nict, char *destination, int port);#ifndef DOXYGEN/** * Check if this transaction needs a TIMEOUT_E event * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param nict The element to work on. * @param state The actual state of the transaction. * @param transactionid The transaction id. */ sipevent_t *nict_need_timer_e_event (nict_t * nict, state_t state, int transactionid);/** * Check if this transaction needs a TIMEOUT_F event * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param nict The element to work on. * @param state The actual state of the transaction. * @param transactionid The transaction id. */ sipevent_t *nict_need_timer_f_event (nict_t * nict, state_t state, int transactionid);/** * Check if this transaction needs a TIMEOUT_K event * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param nict The element to work on. * @param state The actual state of the transaction. * @param transactionid The transaction id. */ sipevent_t *nict_need_timer_k_event (nict_t * nict, state_t state, int transactionid);/** * Allocate an ist_t element. (for incoming INVITE transaction) * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param ist The element to allocate. * @param osip The global instance of oSIP. * @param invite The SIP invite that initiate the transaction. */ int ist_init (ist_t ** ist, osip_t * osip, sip_t * invite);/** * Free all resource in a ist_t element. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param ist The element to free. */ int ist_free (ist_t * ist); int ist_set_auto_send_100 (ist_t * ist, int abool);/** * Check if this transaction needs a TIMEOUT_G event * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param ist The element to work on. * @param state The actual state of the transaction. * @param transactionid The transaction id. */ sipevent_t *ist_need_timer_g_event (ist_t * ist, state_t state, int transactionid);/** * Check if this transaction needs a TIMEOUT_H event * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param ist The element to work on. * @param state The actual state of the transaction. * @param transactionid The transaction id. */ sipevent_t *ist_need_timer_h_event (ist_t * ist, state_t state, int transactionid);/** * Check if this transaction needs a TIMEOUT_I event * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param ist The element to work on. * @param state The actual state of the transaction. * @param transactionid The transaction id. */ sipevent_t *ist_need_timer_i_event (ist_t * ist, state_t state, int transactionid);/** * Allocate an nist_t element. (for incoming NON-INVITE transaction) * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param nist The element to allocate. * @param osip The global instance of oSIP. * @param request The SIP request that initiate the transaction. */ int nist_init (nist_t ** nist, osip_t * osip, sip_t * request);/** * Free all resource in a nist_t element. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param nist The element to free. */ int nist_free (nist_t * nist);#endif/** * Check if this transaction needs a TIMEOUT_J event * @param nist The element to work on. * @param state The actual state of the transaction. * @param transactionid The transaction id. */ sipevent_t *nist_need_timer_j_event (nist_t * nist, state_t state, int transactionid);/** * Allocate an transaction_t element. * @param transaction The element to allocate. * @param ctx_type The type of transaction. (ICT, IST, NICT, NIST) * @param osip The global instance of oSIP. * @param request The SIP request that initiate the transaction. */ int transaction_init (transaction_t ** transaction, context_type_t ctx_type, osip_t * osip, sip_t * request);/** * Free all resource in a transaction_t element. * @param transaction The element to free. */ int transaction_free (transaction_t * transaction);/** * Free all resource in a transaction_t element. * This method does the same than transaction_free() but it assumes * that the transaction is already removed from the list of transaction * in the osip stack. (to remove it use osip_xixt_remove(osip, transaction); * @param transaction The element to free. *//* */ int transaction_free2 (transaction_t * transaction);/** * Add a SIP event in the fifo of a transaction_t element. * @param transaction The element to work on. * @param evt The event to add. */ int transaction_add_event (transaction_t * transaction, sipevent_t * evt);/** * Consume one sipevent_t element previously added in the fifo. * NOTE: This method MUST NEVER be called within another call * of this method. (For example, you can't call transaction_execute() * in a callback registered in the osip_t element.) * @param transaction The element to free. * @param evt The element to consume. */ int transaction_execute (transaction_t * transaction, sipevent_t * evt);/** * Set a pointer to your personal context associated with this transaction. * NOTE: this is a very useful method that allow you to avoid searching * for your personal context inside the registered callbacks. * You can initialise this pointer to your context right after * the creation of the transaction_t element. Then, you'll be * able to get the address of your context by calling * transaction_get_your_instance(). * @param transaction The element to work on. * @param instance The address of your context. */ int transaction_set_your_instance (transaction_t * transaction, void *instance);/** * Get a pointer to your personal context associated with this transaction. * @param transaction The element to work on. */ void *transaction_get_your_instance (transaction_t * transaction);/** * Get target ip and port for this request. * (automaticly set by transaction_init() for ict and nict) * @param transaction The element to work on. * @param The host where to send initial request. * @param The port where to send initial request. */ int transaction_get_destination(transaction_t * transaction, char **ip, int *port);#ifndef DOXYGEN/** * Set the Top Via value associated to this transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param transaction The element to work on. * @param topvia The topvia header. */ int transaction_set_topvia (transaction_t * transaction, via_t * topvia);/** * Set the from value associated to this transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param transaction The element to work on. * @param from The from header. */ int transaction_set_from (transaction_t * transaction, from_t * from);/** * Set the to value associated to this transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param transaction The element to work on. * @param to The to header. */ int transaction_set_to (transaction_t * transaction, to_t * to);/** * Set the Call-Id value associated to this transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param transaction The element to work on. * @param call_id The Call-Id header. */ int transaction_set_call_id (transaction_t * transaction, call_id_t * call_id);/** * Set the cseq value associated to this transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param transaction The element to work on. * @param cseq The cseq header. */ int transaction_set_cseq (transaction_t * transaction, cseq_t * cseq);/** * Set the initial request associated to this transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param transaction The element to work on. * @param request The initial request. */ int transaction_set_orig_request (transaction_t * transaction, sip_t * request);/** * Set the last RESPONSE associated to this transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param transaction The element to work on. * @param last_response The last RESPONSE. */ int transaction_set_last_response (transaction_t * transaction, sip_t * last_response);/** * Set the ACK message associated to this transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param transaction The element to work on. * @param ack The ACK MESSAGE. */ int transaction_set_ack (transaction_t * transaction, sip_t * ack);/** * Set the state of the transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param transaction The element to work on. * @param state The new state. */ int transaction_set_state (transaction_t * transaction, state_t state);/** * Set the socket for incoming message. * NOTE: THIS HAS NEVER TESTED! Please send feedback. * @param transaction The element to work on. * @param sock The socket for incoming message. */ int transaction_set_in_socket (transaction_t * transaction, int sock);/** * Set the from value associated to this transaction. * NOTE: THIS HAS NEVER TESTED! Please send feedback. * @param transaction The element to work on. * @param sock The socket for outgoing message. */ int transaction_set_out_socket (transaction_t * transaction, int sock);/** * Set the from value associated to this transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param transaction The element to work on. * @param osip The osip_t element. */ int transaction_set_config (transaction_t * transaction, osip_t * osip);/** * Check if the response match a server transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param tr The transaction. * @param resp The SIP response received. */ int transaction_matching_response_to_xict_17_1_3 (transaction_t * tr, sip_t * resp);/** * Check if the request match a client transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param tr The transaction. * @param request The SIP request received. */ int transaction_matching_request_to_xist_17_2_3 (transaction_t * tr, sip_t * request);/** * Check if the tags in the From headers match. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param from1 The first From header. * @param from2 The second From header. */ int from_tag_match (from_t * from1, from_t * from2);/** * Check if the tags in the To headers match. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param to1 The first To header. * @param to2 The second To header. */ int to_tag_match (to_t * to1, to_t * to2);/** * Check if the Via headers match. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param via1 The first Via header. * @param via2 The second Via header. */ int via_match (via_t * via1, via_t * via2);/** * Check if the first 2 parameters match the other ones. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param to1 The initial to header. * @param from1 The initial from header. * @param to2 The new to header. * @param from2 The new from header.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -