Ignore:
Timestamp:
Jul 23, 2018 7:32:54 AM (12 months ago)
Author:
riza
Message:

Close #2036: Support DTMF via SIP INFO.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua2/call.cpp

    r5828 r5834  
    181181    this->capDev = prm.cap_dev; 
    182182#endif 
     183} 
     184 
     185CallSendDtmfParam::CallSendDtmfParam() 
     186{ 
     187    pjsua_call_send_dtmf_param param; 
     188    pjsua_call_send_dtmf_param_default(&param); 
     189    fromPj(param); 
     190} 
     191 
     192pjsua_call_send_dtmf_param CallSendDtmfParam::toPj() const 
     193{ 
     194    pjsua_call_send_dtmf_param param; 
     195    pjsua_call_send_dtmf_param_default(&param); 
     196    param.method    = this->method; 
     197    param.duration  = this->duration; 
     198    param.digits    = str2Pj(this->digits); 
     199    return param; 
     200} 
     201 
     202void CallSendDtmfParam::fromPj(const pjsua_call_send_dtmf_param &param) 
     203{ 
     204    this->method    = param.method; 
     205    this->duration  = param.duration; 
     206    this->digits    = pj2Str(param.digits); 
    183207} 
    184208 
     
    583607} 
    584608 
     609void Call::sendDtmf(const CallSendDtmfParam &param) throw (Error) 
     610{ 
     611    pjsua_call_send_dtmf_param pj_param = param.toPj(); 
     612     
     613    PJSUA2_CHECK_EXPR(pjsua_call_send_dtmf(id, &pj_param)); 
     614} 
     615 
     616 
    585617void Call::sendInstantMessage(const SendInstantMessageParam& prm) 
    586618    throw(Error) 
Note: See TracChangeset for help on using the changeset viewer.