You can not talk to someone who is deceased but as you talk, you are thinking and that is psychic talk. A deceased person can also do such thinking. If you are thinking back and forth to someone, more than likely you are talking to that person on the psychic level.
Consider that the only difference between a so called dead person and the same person living is that in the dead state, the person has lost his or her most efficient method of communication with people on the physical side. That method is the one of using a physical body to relate. Once you lose that physical body, your ability to communicate on this side of existence becomes limited to thinking only. That means that unless the person on the physical side is accustomed to receiving thoughts with or without the support of physical speech and physical hearing, that person will be unable to communicate with the deceased and will be doubtful that such communication can take place.
Astral projection if done in fact, and if it is not just your imagination, would be your shift over to the side of existence where a person is permanently shifted and restricted after losing the physical body. But realize that the same astral body and the same astral world exist side by side with the living physical body. When you are awake as the physical system, you are simultaneously in the astral system, but your astral awareness is focused into the physical world. If that focus is very strong, then you lose track of the astral world. If somehow you can slacken and decrease the physical focus while using the physical body, you would become more aware of the astral world and would have seamless communication with those who are restricted to that side of existence.