datso / react-native-pjsip

A PJSIP module for React Native.
http://datso.github.io/react-native-pjsip
GNU General Public License v3.0
272 stars 229 forks source link

App crashes when I run makeCall with headers (only iOS) #114

Closed max-konin closed 6 years ago

max-konin commented 6 years ago

Hello. I faced out with an issue only on iOS devices.I try to pass header with unique identificator to makeCall method.

const call = endpoint.makeCall(account, destination);

OK


const messageOptions = { headers: { 'yid': '1' }};
const call = endpoint.makeCall(account, destination, null, messageOptions);

OK


const messageOptions = { headers: { 'yid': '5b3365b394fa0000238a05c3' }};
const call = endpoint.makeCall(account, destination, null, messageOptions);

Crash in random native code like this image This does not always happen. approximately in one of two cases

Android works fine...

johnfree02 commented 6 years ago

I have some experiences about this.

Don't try to generate long text headers -> It will crash ios app or make bottlenek in app ( Animation will get stuck )

So i use just fews character with header, it works stable

max-konin commented 6 years ago

@johnfree02 but what if we pass a unique identifier? It can not be short

johnfree02 commented 6 years ago

@max-konin do you need to make unique header Or Do you have your server side Not Asterisk or PBK . You can send request to server .

Becase if you sent message with headers, sip will not stable

max-konin commented 6 years ago

@johnfree02 The uniq ID is generated in our server side (not SIP server) and we should pass it to SIP call. May be there is opportunity to set up custom SIP id in pjsip. That would solve our problem

anhtukhtn commented 6 years ago

I make call with header work properly endpoint.makeCall(account, destination, { audioCount: 1, videoCount: 0 }, options);

mehdinourollah commented 2 years ago

I make call with header work properly endpoint.makeCall(account, destination, { audioCount: 1, videoCount: 0 }, options);

I love you man ❤️