SIM900 is controlled by a PIC18F25K20.
This is the initialitation
ATE0 //echo off
ATV0 //verbose off
AT+CMEE=0 //Disable +CME ERROR
AT+CLIP=1 //Enable +CLIP notification
AT+CPBS="SM" //Select SIM phonebook
AT+CMGF=1 //SMS Text mode
AT+CSCS="IRA" //Select TE Character Set
AT+CSMP=17,167,0,0 //Set SMS Text Mode Parameters
AT+CNMI=1,1,0,0,0 //New SMS Message Indications
AT+IPR=115200 //Baud rate
After initialization the software waits for unsolicited +CLIP notification due to incoming call. If incoming number is in the phonebook relay is switched and ATH is sent to reject the call.