finally found something which worked, really happy, now I'm sharing it... we can user java timers as well.. :)
if(intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(
TelephonyManager.EXTRA_STATE_OFFHOOK)){
//the handler runs once the user specified time period exceeds
Handler handler=new Handler();handler.postDelayed(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
// write the code here that will be executed after desired milliseconds.
try {
telephonyService.endCall();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}, userSeconds);
}