That is what I would expect. The ring pulse is 120 ms in length. You have the ring connected to D2, which can generate an interrupt to the micro. You need to write an ISR (Interrupt Service Routine) and enable the interrupt. To do it properly your ISR should set a flag and you process and clear the flag in your main code. Remember the flag has to be global.