Ignore:
Timestamp:
Oct 17, 2018 4:38:39 AM (3 years ago)
Author:
nanang
Message:

Close #2158:

  • Added OnCallTransferRequestParam?.newCall to allow application to instantiate a new Call for the new outgoing call in transfer scenario.
  • Also added OnCallReplacedParam?.newCall mainly for informational purpose (that app should instantiate new Call for replace scenario).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua2/call.hpp

    r5877 r5899  
    785785     * The destination where the call will be transferred to. 
    786786     */ 
    787     string              dstUri; 
     787    string               dstUri; 
    788788     
    789789    /** 
    790790     * Status code to be returned for the call transfer request. On input, 
    791      * it contains status code 200. 
    792      */ 
    793     pjsip_status_code   statusCode; 
     791     * it contains status code 202. 
     792     */ 
     793    pjsip_status_code    statusCode; 
    794794     
    795795    /** 
     
    797797     * for the call being transferred. 
    798798     */ 
    799     CallSetting         opt; 
     799    CallSetting          opt; 
     800 
     801    /** 
     802     * New Call derived object instantiated by application when the call 
     803     * transfer is about to be accepted. 
     804     */ 
     805    Call                *newCall; 
    800806}; 
    801807 
     
    867873     * The new call id. 
    868874     */ 
    869     pjsua_call_id       newCallId; 
     875    pjsua_call_id        newCallId; 
     876 
     877    /** 
     878     * New Call derived object instantiated by application. 
     879     */ 
     880    Call                *newCall; 
    870881}; 
    871882 
     
    17171728    /** 
    17181729     * Notify application on call being transferred (i.e. REFER is received). 
    1719      * Application can decide to accept/reject transfer request 
    1720      * by setting the code (default is 202). When this callback 
    1721      * is not implemented, the default behavior is to accept the 
    1722      * transfer. 
     1730     * Application can decide to accept/reject transfer request by setting 
     1731     * the code (default is 202). When this callback is not implemented, 
     1732     * the default behavior is to accept the transfer. 
     1733     * 
     1734     * If application decides to accept the transfer request, it must also 
     1735     * instantiate the new Call object for the transfer operation and return 
     1736     * this new Call object to prm.newCall. 
     1737     *  
     1738     * If application does not specify new Call object, library will reuse the 
     1739     * existing Call object for initiating the new call (to the transfer 
     1740     * destination). In this case, any events from both calls (transferred and 
     1741     * transferring) will be delivered to the same Call object, where the call 
     1742     * ID will be switched back and forth between callbacks. Application must 
     1743     * be careful to not destroy the Call object when receiving disconnection 
     1744     * event of the transferred call after the transfer process is completed. 
    17231745     * 
    17241746     * @param prm       Callback parameter. 
     
    17531775     * 
    17541776     * After this callback is called, normally PJSUA-API will disconnect 
    1755      * this call and establish a new call \a newCallId. 
     1777     * this call and establish a new call. To be able to control the call, 
     1778     * e.g: hold, transfer, change media parameters, application must 
     1779     * instantiate a new Call object for the new call using call ID 
     1780     * specified in prm.newCallId, and return the Call object via 
     1781     * prm.newCall. 
    17561782     * 
    17571783     * @param prm       Callback parameter. 
     
    19531979    std::vector<Media *> medias; 
    19541980    pj_pool_t           *sdp_pool; 
     1981    Call                *child;     /* New outgoing call in call transfer.  */ 
    19551982}; 
    19561983 
Note: See TracChangeset for help on using the changeset viewer.