Plantronics + Polycom. Now together as Poly Logo

Audio+Video call Forbidden 403

Highlighted
Visitor

Audio+Video call Forbidden 403

Hello,
I'm trying to create a custom Android application using Polycom® RealPresence® Video App SDK API. And I'm trying to make an call via the existing API but i get a Forbiddent 403
Following the documentation i do the followings on the onCreate method:

this.requestPermissions();

final APP_EventQ eventQueue = new APP_EventQ();
final PLCM_MFW_KVList kv = this.createInitializationConfig();
Integer errno = new Integer(0);
final PLCM_MFW_CoreHandle sdkCoreHandle = PLCM_MFW_CoreHandle.Initialize(eventQueue, kv, errno);
if (sdkCoreHandle == null) {
Log.v("APP", "[Activity] Initialize failed with error number " + errno);
return;
}
if(sdkCoreHandle.getLastErrorCode()!= PLCM_MFW_ErrorNumber.PLCM_MFW_OK) {
System.out.println("Error occurrend during initialization!");
}
this.finishInitialization(kv, eventQueue, sdkCoreHandle);
if(isUserRegisterOn) {
this.handleRegistrationImmediateError(sdkCoreHandle.RegisterClient(prepareRegisterConfiguration()));
}
if(this.setVideoDevice(sdkCoreHandle) < 0) {
return;
}
this.setCameraLiveVideoToUISurface(sdkCoreHandle);
this.setCallButtonBehavior(sdkCoreHandle);

this.setEndCallButtonBehavior();
private PLCM_MFW_KVList createInitializationConfig() {
PLCM_MFW_KVList kv = PLCM_MFW_CoreHandle.CreateKVList();

kv.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_EnableSVC, "false");
kv.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_LogLevel, "DEBUG");
kv.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_User_Agent, "MFW_SDK");
kv.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_CallSettings_MaxCallNum, "2");
kv.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_SIP_ProxyServer, SIP_SERVER_IP_ADDRESS);
kv.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_SIP_Transport, "TCP");
kv.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_SIP_ServerType, "standard");
//registerClientKVList.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_SIP_Register_Expires_Interval, "");
kv.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_SIP_UserName, USER_NAME);
kv.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_SIP_Domain, SIP_SERVER_IP_ADDRESS);
kv.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_SIP_AuthorizationName, EMAIL);
kv.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_SIP_Password, PASSWORD);
kv.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_REG_ID, SIP_CALLER_URI);
return kv;
}

 

private void setCallButtonBehavior(final PLCM_MFW_CoreHandle sdkCoreHandle) {
final Button callButton = findViewById(R.id.callButton);
final MainActivity activity = this;
final View.OnClickListener buttonClickLisener = new View.OnClickListener() {

@Override
public void onClick(View v) {
System.out.println("Call was clicked!");

final String mCallUri = SIP_CALL_URI;//protocal + dialUri; // 551063
final PLCM_MFW_KVList kvCall = createCallConfiguration();
Integer errnoCall = new Integer(0);
final PLCM_MFW_CallHandle outCall =
PLCM_MFW_CallHandle.PlaceCall(sdkCoreHandle, mCallUri, PLCM_MFW_CallMode.PLCM_MFW_AUDIOVIDEO_CALL, kvCall, errnoCall);
if(outCall == null) {
System.out.println("Call handle is null");
}

//outCall.SetStreamWnd()
kvCall.Destroy();
if (errnoCall != 0) {
System.out.println("ERROR!");
System.out.print("PlaceCall " + mCallUri + ", result= " + errnoCall + "\n");
handleCallImmediateError(activity, errnoCall);
}
System.out.println("Call was clicked ended!");
}
};
callButton.setOnClickListener(buttonClickLisener);
}
private PLCM_MFW_KVList createCallConfiguration() {
final PLCM_MFW_KVList kvCall = PLCM_MFW_CoreHandle.CreateKVList();

kvCall.SetValue(PLCM_MFW_Key.PLCM_MFW_KVLIST_KEY_REG_ID, "");
return kvCall;
}



Log from the android app where the SIP messages are exchanged:
I/CC: [SIP]TCP:------->INVITE sip:CLIENT_USER_NAME@IP_ADDRESS_POLYCOM_SIP_SERVER;transport=tcp SIP/2.0
INVITE sip:CLIENT_USER_NAME@IP_ADDRESS_POLYCOM_SIP_SERVER;transport=tcp SIP/2.0
Via: SIP/2.0/TCP 192.168.1.2:5070;branch=z9hG4bK5DCE076B85aff920201a8c0
From: <sip:user1503@192.168.1.2>;tag=E8BC65-1523C978
To: <sip:CLIENT_USER_NAME@IP_ADDRESS_POLYCOM_SIP_SERVER>
CSeq: 1 INVITE
Call-ID: f66c223e-ec2245f1-5de41e84@192.168.1.2
Contact: <sip:user1503@192.168.1.2:5070;transport=tcp>
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,INFO,MESSAGE,SUBSCRIBE,NOTIFY,PRACK,UPDATE,REFER
Resource-Priority: dsn-000000.0
User-Agent: MFW_SDK
Supported: 100rel,timer,replaces,resource-priority
Multiplexing: EP
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 1670

v=0
o=- 1587731249 1587731249 IN IP4 192.168.1.2
s=MFW_SDK
c=IN IP4 192.168.1.2
b=AS:384
t=0 0
a=sendrecv
a=vnd.polycom.MBA.p2p:v=1.0.1
m=audio 3230 RTP/AVP 118 18 102 110 109 108 0 8 101 13 105 115 114 113
a=sendrecv
a=rtpmap:118 SIRENLPR/48000/1
a=fmtp:118 bitrate=64000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:102 iLBC/8000
a=rtpmap:110 G7221/16000
a=fmtp:110 bitrate=32000
a=r
D/CC: [EXIT]SipCallBack::OnEvSendMessage
I/CC: [SIP STACK]: INVITE sip:CLIENT_USER_NAME@IP_ADDRESS_POLYCOM_SIP_SERVER;transport=tcp SIP/2.0
Via: SIP/2.0/TCP 192.168.1.2:5070;branch=z9hG4bK5DCE076B85aff920201a8c0
From: <sip:user1503@192.168.1.2>;tag=E8BC65-1523C978
To: <sip:CLIENT_USER_NAME@IP_ADDRESS_POLYCOM_SIP_SERVER>
CSeq: 1 INVITE
Call-ID: f66c223e-ec2245f1-5de41e84@192.168.1.2
Contact: <sip:user1503@192.168.1.2:5070;transport=tcp>
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,INFO,MESSAGE,SUBSCRIBE,NOTIFY,PRACK,UPDATE,REFER
Resource-Priority: dsn-000000.0
User-Agent: MFW_SDK
Supported: 100rel,timer,replaces,resource-priority
Multiplexing: EP
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 1670

v=0
o=- 1587731249 1587731249 IN IP4 192.168.1.2
s=MFW_SDK
c=IN IP4 192.168.1.2
b=AS:384
t=0 0
a=sendrecv
a=vnd.polycom.MBA.p2p:v=1.0.1
m=audio 3230 RTP/AVP 118 18 102 110 109 108 0 8 101 13 105 115 114 113
a=sendrecv
a=rtpmap:118 SIRENLPR/48000/1
a=fmtp:118 bitrate=64000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:102 iLBC/8000
a=rtpmap:110 G7221/16000
a=fmtp:110 bitra
I/MP: dispatch_message message type:157, wParam=0x7fff, lParam=0x834ea858
D/MP: MediaControl_TimerCallback id:1 interval:100
I/CC: [SIP STACK]: <<< Data received TCP
D/CC: [ENTER]SipCallBack::OnEvRecvMessage
I/CC: [SIP]TCP:<-------SIP/2.0 403 Forbidden
D/CC: [EXIT]SipCallBack::OnEvRecvMessage
I/CC: [SIP STACK]: SIP/2.0 403 Forbidden
To: <sip:CLIENT_USER_NAME@IP_ADDRESS_POLYCOM_SIP_SERVER>
Via: SIP/2.0/TCP 192.168.1.2:5070;branch=z9hG4bK5DCE076B85aff920201a8c0;received=79.119.29.93
CSeq: 1 INVITE
Call-ID: f66c223e-ec2245f1-5de41e84@192.168.1.2
From: <sip:user1503@192.168.1.2>;tag=E8BC65-1523C978
Content-Length: 0
I/CC: [SIP STACK]: MsgSipTcpPacket
I/CC: [SIP STACK]: CTcpSocket::OnRecvData
[SIP STACK]: SipOnCommand: response 403,INVITE
[SIP STACK]: SipOnCommand: response 403,INVITE matches user 1 of 1 'user1503'
[SIP STACK]: m_CallList.size is 1 and m_NoCallList size is 0
[SIP STACK]: it is this call response
D/CC: [ENTER]SipCallBack::OnEvRecvFromMessage, message=0, isRequest=0
[ENTER]SipCallBack::OnEvRecvFromMessage: No SDP Flag is 0
SipTerminal::setEarlyMediaStatePhase(), terminalId=Term-2 call state: 8, status code: 403
SipCallBack::OnEvRecvFromMessage SipResponseCode 403,0
I/CC: [SIP STACK]: CResponse::CheckExpire m_nExpire:-1
I/CC: [SIP STACK]: UA Client INVITE INVITE trans state 'callingTrying'->'completed' by 403 resp 65 timeout(0x8a608380)
[SIP STACK]: CTrans:: INVITE InvTran reTrans ALREADY stopped in 'completed' state at retryCount 0 code 403, timeout=65 (0x8a608380)
[SIP STACK]: CCallBase::InitLocalIpAddress(192.168.1.2)
[SIP STACK]: SendCommand m_UriSendTo :0
[SIP STACK]: SendCommand m_uri IP_ADDRESS_POLYCOM_SIP_SERVER:0
[SIP STACK]: SendCommand2 last m_UriSendTo :0
[SIP STACK]: SendCommand2 last m_uri IP_ADDRESS_POLYCOM_SIP_SERVER:0
[SIP STACK]: CUser::NeedRegisterToThisServer CommandType is 0 and MethodType is 1
[SIP STACK]: CUser::NeedRegisterToThisServer no match for 'IP_ADDRESS_POLYCOM_SIP_SERVER' return FALSE
[SIP STACK]: CTcp::Send(TCP) address IP_ADDRESS_POLYCOM_SIP_SERVER port 5060 can Connect 1
[SIP STACK]: CTcp::Send find existing socket
I/CC: [SIP STACK]: >>> Data Send TCP IP_ADDRESS_POLYCOM_SIP_SERVER:5060
D/CC: [ENTER]SipCallBack::OnEvSendMessage
I/CC: [SIP]TCP:------->ACK sip:CLIENT_USER_NAME@IP_ADDRESS_POLYCOM_SIP_SERVER;transport=tcp SIP/2.0
ACK sip:CLIENT_USER_NAME@IP_ADDRESS_POLYCOM_SIP_SERVER;transport=tcp SIP/2.0
Via: SIP/2.0/TCP 192.168.1.2:5070;branch=z9hG4bK5DCE076B85aff920201a8c0
From: <sip:user1503@192.168.1.2>;tag=E8BC65-1523C978
To: <sip:CLIENT_USER_NAME@IP_ADDRESS_POLYCOM_SIP_SERVER>
CSeq: 1 ACK
Call-ID: f66c223e-ec2245f1-5de41e84@192.168.1.2
Contact: <sip:user1503@192.168.1.2:5070;transport=tcp>
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,INFO,MESSAGE,SUBSCRIBE,NOTIFY,PRACK,UPDATE,REFER
User-Agent: MFW_SDK
Max-Forwards: 70
Content-Length: 0
D/CC: [EXIT]SipCallBack::OnEvSendMessage
I/CC: [SIP STACK]: ACK sip:CLIENT_USER_NAME@IP_ADDRESS_POLYCOM_SIP_SERVER;transport=tcp SIP/2.0
Via: SIP/2.0/TCP 192.168.1.2:5070;branch=z9hG4bK5DCE076B85aff920201a8c0
From: <sip:user1503@192.168.1.2>;tag=E8BC65-1523C978
To: <sip:CLIENT_USER_NAME@IP_ADDRESS_POLYCOM_SIP_SERVER>
CSeq: 1 ACK
Call-ID: f66c223e-ec2245f1-5de41e84@192.168.1.2
Contact: <sip:user1503@192.168.1.2:5070;transport=tcp>
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,INFO,MESSAGE,SUBSCRIBE,NOTIFY,PRACK,UPDATE,REFER
User-Agent: MFW_SDK
Max-Forwards: 70
Content-Length: 0
[SIP STACK]: GetRemotePartyAddress from 'To'
[SIP STACK]: CStkCall::OnEvNewDest (0x8b9f3200) new display '' user 'CLIENT_USER_NAME' old 'From' new 'To' source
[SIP STACK]: SipOnEvNewDest 8b9f3200,84800000,CLIENT_USER_NAME@IP_ADDRESS_POLYCOM_SIP_SERVER,


Message 1 of 1