Detect phone call termination
Something like this should get you started. You will need to iron out several details. I would suggest installing LTspice if you haven't already and simulate it to get the details. 







simulate this circuit &ndash; Schematic created using CircuitLab