Can asterisk pass variables to a php script?

I’m not sure if the subject of this thread is appropriate. So, here’s my goal and I’m having a difficult time accomplishing it:

User gets phone call (mind you, several users could get called at the same time). They are played a message like “Hello, this call is to remind you that you have a meeting tomorrow at 1PM in conference room B. Please press 1 to confirm or 2 to cancel”.

When the user presses 1, I want the table that maintains whether a room is booked to be updated with a 1 in the ‘booked’ column where the user_id column is the user_id of the user…

So, before a phone call is even placed to users, first of all…a select query is executed to retrieve the user_id of the person I’m calling.

Does this make sense?

Use PHPAGI to “melt” voice prompt and data user for make decisions, write in a BD etc.

Yes this is possible in many ways. How are you originating the calls to the user?