Calls are not going to voicemail

I’ve been using the Google Voice gateway at without any issues at all for the past month or so. All calls come in 100% of the time, outgoing is 100% working, and call quality is excellent.

However, recently calls are not being transferred to the voicemail on Asterisk. The IP phone will ring for a while, and then the call stops, and on the phone I call with I hear the Google Voice voicemail start to play.

I’ve tried playing with the settings for the ringtime until voicemail in the configuration, but have been unsuccessful at getting it working.


There’s a question about this in the FAQ:

How do I prevent Google’s voicemail from answering the call?

The only way to do so is to answer the call before Google’s voicemail does. To guarantee this, have your system answer the call as soon as it arrives. In Asterisk, you will simply call the Answer() function as the first step. If you are using FreePBX, set the context for your trunk to this custom context, entered into extensions_custom.conf:

exten => _.,1,Answer()
exten => _.,n,Goto(from-pstn,${EXTEN},1)

So just enter those three lines into the extensions_custom.conf (at the top or bottom; not in the middle of some other context) and then in the Peer settings in FreePBX for your trunk, use context = custom-gv-answer