pjsua2 doesn't answer invite challenge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm using pjsua2, version 2.2.1, built for Android.

It's registering correctly but when it makes outgoing calls the server 
responds UNAUTHORIZED and pjsua2 doesn't understands this and doesn't 
resend INVITE with the challenge answer.

My server must authenticate the INVITE.

accCfg.setIdUri("sip:" + user + "@" + domain + ":" + port);
accCfg.getNatConfig().setIceEnabled(true);
accCfg.getRegConfig().setRegistrarUri("sip:" + domain + ":" + port);
accCfg.getRegConfig().setTimeoutSec(timeout);
AuthCredInfoVector creds = accCfg.getSipConfig().getAuthCreds();
creds.clear();
creds.add(new AuthCredInfo("Digest", "*", user, 0, password));
try {
     account.modify(accCfg);
} catch (Exception e) {
     e.printStackTrace();
}

MyCall call = new MyCall(account, -1);
CallOpParam prm = new CallOpParam(true);
CallSetting opt = prm.getOpt();
opt.setAudioCount(1);
opt.setVideoCount(0);
try {
     call.makeCall("sip:" + dialedNumber + "@" + domain, prm);
} catch (Exception e) {
     e.printStackTrace();
     call.delete();
     return;
}

Aduilio




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux