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();
      callController.setAudioMode(CometChat.AUDIO_MODE.SPEAKER);
      }}>
              <Icon
                name={true ? 'volume-high' : 'volume-off'}
                color="white"
              />
</TouchableOpacity>

My call setting are set as:

let callSettings = new CometChat.CallSettingsBuilder()
.enableDefaultLayout(false)
.setSessionID(sessionID)
.setCallEventListener(callListener)
.build();

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”,