Help regarding php script for asterisk

i’m trying to write a phpagi script for asterisk call forwarding, but i want to know can we do two tasks simultaneously??

Actually what i want is that i want to do some task while the call is going on. IS that possible???According to me once the call is connected we can’t do any other task until the call is disconnected.Am I right??

If any suggestions regarding how the script executes, can we do two tasks simultaneously etc will be very helpful for me…

Thank you

During call you cant do nothing else. But there is going around - you can fire event, and AMI (Asterisk manager interface) - can start something else.
This way I play announces to both parties simultaneously during call on event which is fired through Features - res_features is modified by me.