Still costs money, but if you're sending a lot of messages, this would substantially reduce the costs.
curl -s -X GET "https://lookups.twilio.com/v1/PhoneNumbers/$number?Type=carrier&Type=caller-name" -u $accountsid:$authtoken | /usr/local/bin/jq '.'
Still costs money, but if you're sending a lot of messages, this would substantially reduce the costs.