Ignore:
Timestamp:
Oct 17, 2018 4:38:39 AM (6 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/src/pjsua2/call.cpp

    r5878 r5899  
    450450 
    451451Call::Call(Account& account, int call_id) 
    452 : acc(account), id(call_id) 
     452: acc(account), id(call_id), userData(NULL), sdp_pool(NULL), child(NULL) 
    453453{ 
    454454    if (call_id != PJSUA_INVALID_ID) 
     
    503503{ 
    504504    Call *call = (Call*)pjsua_call_get_user_data(call_id); 
    505     if (call) 
    506         call->id = call_id; 
     505    if (call && call_id != call->id) { 
     506        if (call->child && call->child->id == PJSUA_INVALID_ID) { 
     507            /* This must be a new call from call transfer */ 
     508            call = call->child; 
     509            pjsua_call_set_user_data(call_id, call); 
     510        } 
     511        call->id = call_id; 
     512    } 
    507513    return call; 
    508514} 
     
    821827        } 
    822828        medias.clear(); 
     829 
     830        /* Remove this Call object association */ 
     831        pjsua_call_set_user_data(id, NULL); 
    823832    } 
    824833     
Note: See TracChangeset for help on using the changeset viewer.