Ignore:
Timestamp:
Nov 11, 2006 4:16:04 PM (17 years ago)
Author:
bennylp
Message:

Attended call transfer implementation. The changes involves:

  • Added support for SIP Replaces extension (RFC 3891)
  • Added pjsua_call_xfer_replaces() to perform attended call transfer.
  • PJSUA checks and process Replaces header in incoming calls
  • Added pjsip_ua_find_dialog() API.
  • Added pjsip_endpt_has_capability() API.
  • Added pjsip_endpt_send_response2() API.
  • etc.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r785 r797  
    338338 
    339339    /** 
     340     * Notify application about incoming INVITE with Replaces header. 
     341     * Application may reject the request by setting non-2xx code. 
     342     * 
     343     * @param call_id       The call ID to be replaced. 
     344     * @param rdata         The incoming INVITE request to replace the call. 
     345     * @param st_code       Status code to be set by application. Application 
     346     *                      should only return a final status (200-699). 
     347     * @param st_text       Optional status text to be set by application. 
     348     */ 
     349    void (*on_call_replace_request)(pjsua_call_id call_id, 
     350                                    pjsip_rx_data *rdata, 
     351                                    int *st_code, 
     352                                    pj_str_t *st_text); 
     353 
     354    /** 
     355     * Notify application that an existing call has been replaced with 
     356     * a new call. This happens when PJSUA-API receives incoming INVITE 
     357     * request with Replaces header. 
     358     * 
     359     * After this callback is called, normally PJSUA-API will disconnect 
     360     * \a old_call_id and establish \a new_call_id. 
     361     * 
     362     * @param old_call_id   Existing call which to be replaced with the 
     363     *                      new call. 
     364     * @param new_call_id   The new call. 
     365     * @param rdata         The incoming INVITE with Replaces request. 
     366     */ 
     367    void (*on_call_replaced)(pjsua_call_id old_call_id, 
     368                             pjsua_call_id new_call_id); 
     369 
     370 
     371    /** 
    340372     * Notify application when registration status has changed. 
    341373     * Application may then query the account info to get the 
     
    17531785 
    17541786/** 
    1755  * Initiate call transfer to the specified address. 
    1756  * 
    1757  * @param call_id       Call identification. 
     1787 * Initiate call transfer to the specified address. This function will send 
     1788 * REFER request to instruct remote call party to initiate a new INVITE 
     1789 * session to the specified destination/target. 
     1790 * 
     1791 * @param call_id       The call id to be transfered. 
    17581792 * @param dest          Address of new target to be contacted. 
    17591793 * @param msg_data      Optional message components to be sent with 
     
    17651799                                     const pj_str_t *dest, 
    17661800                                     const pjsua_msg_data *msg_data); 
     1801 
     1802/** 
     1803 * Flag to indicate that "Require: replaces" should not be put in the 
     1804 * outgoing INVITE request caused by REFER request created by  
     1805 * #pjsua_call_xfer_replaces(). 
     1806 */ 
     1807#define PJSUA_XFER_NO_REQUIRE_REPLACES  1 
     1808 
     1809/** 
     1810 * Initiate attended call transfer. This function will send REFER request 
     1811 * to instruct remote call party to initiate new INVITE session to the URL 
     1812 * of \a dest_call_id. The party at \a dest_call_id then should "replace" 
     1813 * the call with us with the new call from the REFER recipient. 
     1814 * 
     1815 * @param call_id       The call id to be transfered. 
     1816 * @param dest_call_id  The call id to be replaced. 
     1817 * @param options       Application may specify PJSUA_XFER_NO_REQUIRE_REPLACES 
     1818 *                      to suppress the inclusion of "Require: replaces" in 
     1819 *                      the outgoing INVITE request created by the REFER 
     1820 *                      request. 
     1821 * @param msg_data      Optional message components to be sent with 
     1822 *                      the request. 
     1823 * 
     1824 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     1825 */ 
     1826PJ_DECL(pj_status_t) pjsua_call_xfer_replaces(pjsua_call_id call_id,  
     1827                                              pjsua_call_id dest_call_id, 
     1828                                              unsigned options, 
     1829                                              const pjsua_msg_data *msg_data); 
    17671830 
    17681831/** 
Note: See TracChangeset for help on using the changeset viewer.