Many unexpected outgoing calls occur when you do not flip on the lock screen when shoving the phone in a purse or pocket. Without the lock screen to temporarily disable input to the phone’s screen or buttons, accidental brushes, taps or bumps can trigger a phone call or garbled text message, especially if the phone was left with the contacts app or keyboard open. (When unlocked phones shoved in a back pocket make a call this way, the incident is colloquially referred to a “butt dial.”)

If your phone seems to be accidentally dialing someone because of screen bumps or inadvertent voice commands, check the settings to make sure the device’s lock screen is enabled and voice-activated calling is not.

Glitchy system software and malfunctioning screens can also cause unplanned communications. Apple’s Siri, Google Assistant, Microsoft’s Cortana or any voice-activated apps may jump in and make a phone call if the software is set to listen for spoken commands and misinterprets your words.

To help prevent accidental calls and text messages, make sure you hit the Power/Sleep/Wake button to turn off the screen before putting your phone away. In your phone’s display settings, you should also be able to set the amount of time before the phone shuts itself off, and choosing a minimal period helps if you forget to manually switch off the screen.

If you do not have a lock screen and passcode set on the phone, you should add one to prevent unauthorized access to your device from other people (as well as your own body parts). On the iPhone, open the Settings app and choose Touch ID & Passcode, to get to the relevant controls. On an Android phone, go to settings to Security & Location to set up the screen-lock method of your choice.

If you your phone is set to respond to spoken input, like voice dialing or waking up when you say “Hey, Siri,” “O.K. Google” or “Hey, Cortana,” your device may also be more prone to accidentally calling out on its own. These features can be controlled in the phone’s settings as well.