Ignore:
Timestamp:
Jan 25, 2010 5:38:07 PM (15 years ago)
Author:
bennylp
Message:

Misc fix (#1026): incoming call event is not detected by PocketPJ sample application

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pocketpj/PocketPJDlg.cpp

    r3036 r3073  
    395395} 
    396396 
     397void CPocketPJDlg::OnIncomingCall() 
     398{ 
     399    pjsua_call_info ci; 
     400 
     401    pjsua_call_get_info(0, &ci); 
     402 
     403    PopUp_Show(POPUP_CALL, "Incoming call..", ci.remote_info.ptr, "", 
     404               "Answer", "Hangup", 0); 
     405    pjsua_call_answer(0, 180, NULL, NULL); 
     406    if (m_Cfg.m_AutoAnswer) 
     407        OnPopUpButton(1); 
     408} 
     409 
    397410void CPocketPJDlg::OnCallState() 
    398411{ 
     
    409422        break; 
    410423    case PJSIP_INV_STATE_INCOMING:  /**< After INVITE is received.          */ 
    411         PopUp_Show(POPUP_CALL, "Incoming call..", ci.remote_info.ptr, "", 
    412                    "Answer", "Hangup", 0); 
    413         pjsua_call_answer(0, 180, NULL, NULL); 
    414         if (m_Cfg.m_AutoAnswer) 
    415             OnPopUpButton(1); 
     424        OnIncomingCall(); 
    416425        break; 
    417426    case PJSIP_INV_STATE_EARLY:     /**< After response with To tag.        */ 
     
    455464    PJ_UNUSED_ARG(call_id); 
    456465    PJ_UNUSED_ARG(rdata); 
     466 
     467    theDlg->OnIncomingCall(); 
    457468} 
    458469 
Note: See TracChangeset for help on using the changeset viewer.