[TypeError: null is not an object (evaluating 'constraints.optional')] when call sipUa.call

38 views
Skip to first unread message

Ivan Hutomo

unread,
Apr 12, 2023, 4:15:11 AM4/12/23
to JsSIP

Hi everyone, I have a problem when trying to run sipUA.call. Below is my configuration, until now I am still not sure what's wrong.

let options = { "eventHandlers": { failed: e => _eventCallback("failed", e), ended: e => _eventCallback("ended", e), }, "mediaConstraints": { audio: true, video: true }, }; 
this.sipUA.call(callNumber, options);

Here is the log:

[TypeError: null is not an object (evaluating 'constraints.optional')]


Thank you so much for help

Paulo Eduardo

unread,
Apr 12, 2023, 10:46:59 AM4/12/23
to JsSIP
Hello Ivan,

Try this in your options variable

{ "eventHandlers": { failed: e => _eventCallback("failed", e), ended: e => _eventCallback("ended", e) }, "mediaConstraints": { audio: true, video: true } }

or

{ "eventHandlers": { failed: (e) => { _eventCallback("failed", e); }, ended: (e) => { _eventCallback("ended", e); } }, "mediaConstraints": { audio: true, video: true } }

Ivan Hutomo

unread,
Apr 12, 2023, 9:46:46 PM4/12/23
to JsSIP
I already try both of them but the error still stays the same, this happens on my phone with Android 10 and iPhone with ios 16.4.1. But on my phone with Android 9, it runs normally without any errors. In my Android 9 phone, it will request permission to microphone and my camera as well. I still could not figure out this error. Been stuck here a few days and I think everything is already correct. I also already upgrade react-native-jssip to the newest version but still the same. Thank you so much for helping.

mah kho

unread,
Apr 17, 2023, 6:22:29 AM4/17/23
to js...@googlegroups.com
u need to handle get permission first if u want i can help you
i had this issue before

--
You received this message because you are subscribed to the Google Groups "JsSIP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jssip+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jssip/75536ebc-e331-4bcf-bedf-80cedac71fben%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages