Unable To Route Direct Calling Audio To Speaker

When the defaultLayout is true, the call sound comes from the speaker. However, when it is set to false, the sound comes from the earpiece and the setAudioMode doesn’t work as well. I tried using setAudioMode as given below:

<TouchableOpacity onPress={() => {
      let callController = CometChat.CallController.getInstance();
                name={true ? 'volume-high' : 'volume-off'}

My call setting are set as:

let callSettings = new CometChat.CallSettingsBuilder()

I am currently using
@cometchat-pro/react-native-calls”: “1.0.8”,
@cometchat-pro/react-native-chat”: “2.2.1”,
“react-native”: “0.63.3”,