Is this possible? [Scenario2]


(Second Scenario)

I have two different scenarios which I’m wondering if is possible?
Both of the scenarios are generally about collecting information/voicemails on an Asterisk server through a VoIP-SIP setup and be able to process the data in PHP. I guess this is in general possible?

Second Scenario
The caller recieves a SMS (not from Asterisk) which tells the caller to ring to the Asterisk-number.
First I have to get the caller phonenumber (is it callerid?) to retrieve his userid from a record in a mysql table in a cms-system.
With this userid I will see if it matches a record in a poll-table, if it doesn’t the caller goes further, if not he should be disconnected.
Now the caller listens to a “voicepoll” which gives three choices 1,2 or 3.
When he presses 1,2 or 3 it should be saved in the poll-table.

Is this clear enough?