Freyabee
Clearly you have a 'Text enabled Phone' and you have subscribed to BT's Called Display feature.
The message on your cordless phone was a result of your friend having 'auto-send template message' enabled. The proviso being for this to work, the appropriate App is installed.
Unwittingly it would appear, your friend has been party to setting up this facility on his mobile phone.
NB: Had you not subscribed to BT's Called Display the SMS text from your phone would have terminated as a voice mail. Subsequently a BOT would have read back the message.