taksan / skype-java-api

Skype API for Java, based on Skype4Java library
128 stars 60 forks source link

Can't detect is i call to parner or partner call to me #37

Closed sashok7241 closed 11 years ago

sashok7241 commented 11 years ago
    Skype.addCallMonitorListener(new CallMonitorListener()
    {
        @Override public void callMonitor(Call call, Status status) throws SkypeException
        {
            if(call.getStatus() == Call.Status.RINGING && ... what i need to wrote for detect?)
            {
                call.getPartner().send("Please, stop calling!");
                call.cancel();
            }
        }
    });
fabiodepin commented 11 years ago

Hi,

See Call.Type.

Example:

Skype.addCallMonitorListener(new CallMonitorListener() {
  @Override
  public void callMonitor(Call call, Call.Status status) throws SkypeException {
    if (status.equals(Call.Status.RINGING) && call.getType().equals(Call.Type.OUTGOING_P2P)){
      call.getPartner().send("Please, stop calling!");
      call.cancel();
    }
  }
});
sashok7241 commented 11 years ago

Thank you!