Call Files Get "Answered" Early

I currently have Asterisk set up with an analog gateway - the Grandstream GXW4104. I have no problems sending and receiving calls using sip and pstn phones, but call files get answered too early.

For example, let’s say I use a call file with the following information:

Channel: SIP/grandstream/XXXXXXXX Application: Playback Data: hello-world

Then the CLI output is as follows:

-- Attempting call on SIP/grandstream/XXXXXXXX for application Playback(hello-world) (Retry 1) == Using SIP RTP CoS mark 5 > Channel SIP/grandstream-0000000a was answered. > Launching Playback(hello-world) on SIP/grandstream-0000000a -- <SIP/grandstream-0000000a> Playing 'hello-world.gsm' (language 'en)

The problem is that this happens without me picking up the phone. When I do answer the phone, it could be partway through Playback or already finished.

I’m trying to figure out why Asterisk would think that the channel has been answered when it really hasn’t.

With SIP Asterisk does not decide that the remote side has answered, the remote side tells us. This would be something on the gateway side itself. You can confirm by enabling sip debug “sip set debug on” and looking at the SIP call. If we get a 200 OK from the gateway immediately then it is indicating it has been answered.