Ignore:
Timestamp:
Nov 25, 2007 4:40:07 AM (13 years ago)
Author:
bennylp
Message:

Ticket #416: Allow application to handle sending ACK manually

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip-ua/sip_inv.h

    r1477 r1598  
    191191    void (*on_media_update)(pjsip_inv_session *inv_ses,  
    192192                            pj_status_t status); 
     193 
     194    /** 
     195     * This callback is called when the framework needs to send 
     196     * ACK request after it receives incoming  2xx response for  
     197     * INVITE. It allows application to manually handle the  
     198     * transmission of ACK request, which is required by some 3PCC 
     199     * scenarios. If this callback is not implemented, the framework 
     200     * will handle the ACK transmission automatically. 
     201     * 
     202     * When this callback is overridden, application may delay the 
     203     * sending of the ACK request (for example, when it needs to  
     204     * wait for answer from the other call leg, in 3PCC scenarios).  
     205     * 
     206     * Application creates the ACK request 
     207     * 
     208     * Once it has sent the ACK request, the framework will keep  
     209     * this ACK request in the cache. Subsequent receipt of 2xx response 
     210     * will not cause this callback to be called, and instead automatic 
     211     * retransmission of this ACK request from the cache will be done 
     212     * by the framework. 
     213     * 
     214     * This callback is optional. 
     215     */ 
     216    void (*on_send_ack)(pjsip_inv_session *inv, pjsip_rx_data *rdata); 
    193217 
    194218} pjsip_inv_callback; 
     
    588612 
    589613/** 
     614 * Create an ACK request. Normally ACK request transmission is handled 
     615 * by the framework. Application only needs to use this function if it 
     616 * handles the ACK transmission manually, by overriding \a on_send_ack() 
     617 * callback in #pjsip_inv_callback. 
     618 * 
     619 * Note that if the invite session has a pending offer to be answered  
     620 * (for example when the last 2xx response to INVITE contains an offer),  
     621 * application MUST have set the SDP answer with #pjsip_create_sdp_body() 
     622 * prior to creating the ACK request. In this case, the ACK request 
     623 * will be added with SDP message body. 
     624 * 
     625 * @param inv           The invite session. 
     626 * @param cseq          Mandatory argument to specify the CSeq of the 
     627 *                      ACK request. This value MUST match the value 
     628 *                      of the INVITE transaction to be acknowledged. 
     629 * @param p_tdata       Pointer to receive the ACK request message to 
     630 *                      be created. 
     631 * 
     632 * @return              PJ_SUCCESS if ACK request has been created. 
     633 */ 
     634PJ_DECL(pj_status_t) pjsip_inv_create_ack(pjsip_inv_session *inv, 
     635                                          int cseq, 
     636                                          pjsip_tx_data **p_tdata); 
     637 
     638 
     639/** 
    590640 * Send request or response message in tdata.  
    591641 * 
     
    603653 
    604654 
    605  
    606655/** 
    607656 * Get the invite session for the dialog, if any. 
Note: See TracChangeset for help on using the changeset viewer.