Below is my source code for pjsip calling -
String buddy_uri = item.get("uri");
SipHeaderVector sipHeaderVector = new SipHeaderVector(2);
SipHeader sipHeader1 = new SipHeader();
sipHeader1.setHName("Header1");
sipHeader1.setHValue("Value1");
SipHeader sipHeader2 = new SipHeader();
sipHeader.setHName("Header2");
sipHeader.setHValue("Value2");
sipHeaderVector.set(0,sipHeader1);
sipHeaderVector.set(1,sipHeader2);
MyCall call = new MyCall(account, -1);
CallOpParam prm = new CallOpParam(true);
SipTxOption sipTxOption = new SipTxOption();
sipTxOption.setHeaders(sipHeaderVector);
prm.setTxOption(sipTxOption);
try {
call.makeCall(buddy_uri, prm);
} catch (Exception e) {
call.delete();
return;
}
Above is a code for PJSIP calling by passing custom headers. Unfortunately, authentication is failing as it seems header values are not going in request.
Is above code correct for passing custom headers and their respective values as followed all the documentation of C++ provided by pjsua to pass headers but seems call is not established and asking for some pin which is required on server for authentication via headers.
can some one help???