ATD SIM900 response.?
First

Use original manufacturer site as source of information about what happening and when and why. You can use SIM800 manuals, generally all GSM/GPRS modules are similar. And then try to do all possible variants of AT commands by hand to form your algorithm. 

Second

There exist AT+CLCC command and it's unsolicited response +CLCC that can be enabled with command AT+CLCC=1\r\n. This response give full information about call state incoming or outgoing and incoming wait calls too. Response format as it described in SIM800 Series_AT Command Manual_V1.09

+CLCC: &lt;id1&gt;,&lt;dir&gt;,&lt;stat&gt;,&lt;mode&gt;,&lt;mpty&gt;[,&lt;number&gt;,&lt;type&gt;,&lt;alphaID&gt;]


where:


id is call identification number 1..7
dir is call cirection 0 - is outgoing, 1 - is incoming
stat is current call state that can be: active (connected), held, dialing (for outgoing call), alert (after originated or terminated hangup), inconimg (while ring), wait (state of incoming call when another call already active), disconnected (call end)
mode is voice or data call
mpty is multiparty (conference) call or not


and in addition


number, type it is number of mobile terminated and alphaID it is related name from phone book if any found.


Third

And now you need to implement your own algorithm for maintenance incoming and outgoing calls at the deep what you need. There can be event model and timers and a lot of more. 

Anyway you need good parser and modem state monitor algorithm, because in my experience this modem can stop send solicited responses, at any time by some undefined causes. And sometimes only power cycle can help =-).