Get input from the receiver

I am trying to write a script that will call a user, and then based on the receivers input do different things. I am new to this and have

mangaged to write a script that will place a call and then wait for the users input. The only problem is that it is waiting for the callers

input and not the receivers. How can I change the script to listen to the receivers input instead of the callers?

Thank You

Recommended Reading: