Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stoped in PJSIP_INV_STATE_CONNECTING #241

Open
maurojones opened this issue Jul 12, 2021 · 1 comment
Open

Stoped in PJSIP_INV_STATE_CONNECTING #241

maurojones opened this issue Jul 12, 2021 · 1 comment

Comments

@maurojones
Copy link

maurojones commented Jul 12, 2021

I receive the call, display the call but I can't finish the connecting and answer the call:

My code:

  endpoint.on("call_received", (call) => {
    console.info('call_received', _myCall);
    if (_myCall != null) {
      declineCall(call) // Decline call when more that one calls are ringing
    }
    _myCall = call;
    _myId = uuid.v1();
    RNCallKeep.displayIncomingCall(_myId, call.getRemoteFormattedNumber(), 'Portaria');
  })

  endpoint.on("call_changed", (call) => {
    console.info('call_changed', call.getState());
  })

  endpoint.on("call_terminated", (call) => {
    activeCall = null;
    RNCallKeep.endCall(_myId);
    _myId = '';
    console.info('call_terminated');
  })

  RNCallKeep.addEventListener('answerCall', () => {
    endpoint.answerCall(_myCall)
      .then(x => {
        console.info('answerCall Ok', x);
        activeCall = _myCall;
        console.info('start call');
        endpoint.useSpeaker(_myCall);
        RNCallKeep.startCall(_myId, _myCall.getRemoteFormattedNumber());
      })
      .catch(x => console.info('answerCall error', x));
  })

  RNCallKeep.addEventListener('endCall', () => {
    declineCall(_myCall);
  })

My console:
INFO call_received null
INFO call_changed PJSIP_INV_STATE_INCOMING
INFO call_changed PJSIP_INV_STATE_CONNECTING
INFO answerCall Ok true
INFO start call

How I made de call CONNECTING ???

@m4r00p
Copy link

m4r00p commented Sep 2, 2021

for me it was the issue with codes please try:

endpoint.changeCodecSettings({
'G722/16000/1': 0,
'G7221/16000/1': 0,
'G7221/32000/1': 0,
'GSM/8000/1': 80,
'PCMA/8000/1': 100,
'PCMU/8000/1': 120,
'iLBC/8000/1': 0,
'opus/48000/2': 0,
'speex/16000/1': 0,
'speex/32000/1': 0,
'speex/8000/1': 0,
})

Also check if you don't have issue with libsrtp if so please take a look at the podfile and get rid of (if possible) openssl. (pjsip has conflict with openssl 1.1.0 and it need to be compiled in the other way to support both openssl and libsrtp)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants