Remove ringing sound when dialling via ARI?

We use ARI to create a channel and add it to a bridge. We then add another channel to the bridge using create, add then a dial.

The dialled device is also programatically controlled by us, using pjsua2. When we receive the incoming call, we reply with RINGING until we’re ready to answer.

However, we don’t want the ringing tone to be played in most circumstances. Silence would be best.

The context supplied is from-internal but poking around in the (in this case FreePBX) dial plans I couldn’t see where Ringing() is called. So on the pjsua2 device, I tried to reply with TRYING (or even nothing) and there is still the ringback into the bridge.

Is there any way to remove the ringing from the ARI dial?

short answer, do not add the new channe to the bridge until it is answered

And if you really want silence, don’t send RINGING, either leave it in the 100 state, or send 183 and early media of silence.

So leaving the channel in 100 Trying didn’t help, I still get the ring back.

PJSUA2 appears to answer the initial INVITE with 100 Trying and that’s what kicks off the ringback.

Sending back 183 Progress (without any fields / values) after PJSUA2 sent 100 Trying also had no effect.

Although it’s not as simple due to more lifecycle and state to manage in an already large project, at this point I will try leaving the channel outside of the bridge then waiting for the call the be answered or rejected.

100 trying won’t start ring back. If it is ringing back that soon, it is sending the INVITE that starts it, which would basically happen if you forced ringing when dialling.

Odd because that does seem to be the case here on Asterisk 18.23.1 (soon to be updated to 18.24.3.

It seems to be the default behaviour of PJSUA2 to send 100 Trying when the INVITE is received without any programatic interaction on our end yet… Which is fine, but the ringback is heard in the bridge at that time.

So we’ll just move forward with either leaving the channel out of the bridge, or sending early media of silence.

That’s what the SIP standard requires. However what it does is to stop retransmissions of the INVITE, but I would have expected Asterisk not to block after sending INVITE.

The 100 either isn’t triggering ring back at all, or it is only triggering it in as much that Asterisk is blocking until it is received. and you have options set to always send ringback after an INVITE.

Interesting, it could be the default FreePBX implementation? In any case thank you for your continued help @david551 :wave:. I’ll play around with this to suit the needed use case and come back with any questions.

This isn’t a FreePBX forum. FreePBX may well set r flags as defaults.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.