Ignore:
Timestamp:
Jul 15, 2013 4:23:31 AM (11 years ago)
Author:
ming
Message:

Re #817: Initial work for allowing application to respond to re-INVITE manually.

Patches integrated in this fix (with some modifications for adjustment to the current trunk):

  • sip_inv-on_rx_reinvite.patch


Move the place where to call the callback so the callback will still be called when the re-invite contains no SDP

  • sdp_neg_cancel_remote_offer


pjmedia_sdp_neg_cancel_remote_offer() is no longer necessary since pjmedia_sdp_neg_cancel_offer() can already handle that. Only integrate the chart for sdp negotiation doc.

  • sip_inv-terminate-reinvite-tsx-on-cancel
  • sip_inv-cancel_sdp_neg_on_sending_negative_reply_to_reinvite
  • pjsip-allow_cancel_reinvite
File:
1 edited

Legend:

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

    r4556 r4562  
    160160    void (*on_rx_offer)(pjsip_inv_session *inv, 
    161161                        const pjmedia_sdp_session *offer); 
     162 
     163    /** 
     164     * This callback is optional, and is called when the invite session has 
     165     * received a re-INVITE from the peer. It will be called after 
     166     * on_rx_offer() callback and works only for re-INVITEs. It allows more 
     167     * fine-grained control over the response to a re-INVITE, e.g. sending 
     168     * a provisional response first. Application can return PJ_SUCCESS and 
     169     * send a reply using the function #pjsip_inv_initial_answer() or 
     170     * #pjsip_inv_answer(), as with the initial INVITE. If application 
     171     * returns non-PJ_SUCCESS, it needs to set the SDP answer with 
     172     * #pjsip_inv_set_sdp_answer() and the re-INVITE will be answered 
     173     * automatically. 
     174     * 
     175     * @param inv       The invite session. 
     176     * @param offer     Remote offer. 
     177     * @param rdata     The received re-INVITE request. 
     178     * 
     179     * @return          - PJ_SUCCESS: application will answer the re-INVITE 
     180     *                    manually 
     181     *                  - non-PJ_SUCCESS: answer the re-INVITE automatically 
     182     *                    using the SDP set via #pjsip_inv_set_sdp_answer() 
     183     */ 
     184    pj_status_t (*on_rx_reinvite)(pjsip_inv_session *inv, 
     185                                  const pjmedia_sdp_session *offer, 
     186                                  pjsip_rx_data *rdata); 
    162187 
    163188    /** 
     
    699724 
    700725/** 
    701  * Create a response message to the initial INVITE request. This function 
    702  * can only be called for the initial INVITE request, as subsequent 
    703  * re-INVITE request will be answered automatically. 
     726 * Create a response message to an INVITE request. 
    704727 * 
    705728 * @param inv           The UAS invite session. 
     
    798821 
    799822 
     823/** 
     824 * Create a CANCEL request for an ongoing re-INVITE transaction. If no 
     825 * provisional response has been received, the function will not create 
     826 * CANCEL request (the function will return PJ_SUCCESS but the \a p_tdata 
     827 * will contain NULL) because we cannot send CANCEL before receiving 
     828 * provisional response. If then a provisional response is received, 
     829 * the invite session will send CANCEL automatically. 
     830 * 
     831 * @param inv           The invite session. 
     832 * @param p_tdata       Pointer to receive the message to be created. Note 
     833 *                      that it's possible to receive NULL here while the 
     834 *                      function returns PJ_SUCCESS, see the description. 
     835 * 
     836 * @return              PJ_SUCCESS if termination is initiated. 
     837 */ 
     838PJ_DECL(pj_status_t) pjsip_inv_cancel_reinvite( pjsip_inv_session *inv, 
     839                                                pjsip_tx_data **p_tdata ); 
     840 
    800841 
    801842/** 
Note: See TracChangeset for help on using the changeset viewer.