Looking at your logs, you're properly receiving the 180 Ringing
event from Twilio at 10:17:13
, after the call has started at 10:17:09
and has been answered at 10:17:19
, so as you spotted it, the problem does not come from the upstream operator not sending the signalling information, but rather from Asterisk, or from the internal WebRTC FreePBX client.
Just thinking here, but if for some reason, your WebRTC client is not ready to handle audio event thought the call has started (and the callee is ringing), then you won't hear any ringback tone. Such situation can occur for example if your WebRTC client starts the call without having gathered all its ICE candidates (this is trickle ICE
connection mode, but that should not be the case though, as I think Asterisk does not support it). Unfortunately, there's not much you can do in this case apart from modifying the configuration or JavaScript code of the WebRTC client.
Now, on the Asterisk side, indeed, the r
option should do the job. I'm not sure FreePBX allows you to control the dialplan commands, but if it does, you may want to try to force Asterisk to answer the call, then playback a ringing tone while dialing out. The PlayTones function can be useful then.
exten => _44X.,1,Answer
exten => _44X.,n,Wait(1)
exten => _44X.,n,Playtones(ring)
exten => _44X.,n,Wait(3)
exten => _44X.,n,Dial(SIP/...)
Note that you will have to have a indications.conf
file properly configured to have this working. I guess other functions like Ringing, Progress can be used, but I think the idea of answering the call before dialing out is worth a try. Of course, this is a bit hacky as the way to go should definitely be to use Dial
without the r
option.
Hope this helps!