In the text payload, a section called UDH (User Data Header) is optional but defines lot of advanced features not all mobiles are compatible with. One of these options enables the user to change the reply address of the text. If the destination mobile is compatible with it, and if the receiver tries to answer to the text, he will not respond to the original number, but to the specified one. Most carriers don't check this part of the message, which means one can write whatever he wants in this section: a special number like 911, or the number of somebody else. It's been a problem since the iPhone first came out five years ago.
source : http://pod2g-ios.blogspot.co.uk/2012/08/never-trust-sms-ios-text-spoofing.html