you would have to use some 3rd party service/API to do something like that... I'm sure you can probably find a free one out there. I used melissadata.com a few years ago but I'm not sure if they have that API up there or not. Even when they did it was outdated - as to what number was associated to what carrier.
doing a google search I found this place - "clubtexting.com". weird name but seems like it will accomplish what you're looking for.