Exemplo n.º 1
0
  public void acceptCall(View view) {
    CallOpParam prm = new CallOpParam();
    prm.setStatusCode(pjsip_status_code.PJSIP_SC_OK);
    try {
      MainActivity.currentCall.answer(prm);
    } catch (Exception e) {
      System.out.println(e);
    }

    view.setVisibility(View.GONE);
  }
Exemplo n.º 2
0
  public void hangupCall(View view) {
    handler_ = null;
    finish();

    if (MainActivity.currentCall != null) {
      CallOpParam prm = new CallOpParam();
      prm.setStatusCode(pjsip_status_code.PJSIP_SC_DECLINE);
      try {
        MainActivity.currentCall.hangup(prm);
      } catch (Exception e) {
        System.out.println(e);
      }

      MainActivity.currentCall = null;
    }
  }