Increase ringing times before incoming call announcement plays

Hi guys, is it possible when an incoming hit an extension announcement for it ring a couple of times before the announcement plays? and is it possible to ring random times like, between 1 and 5 rings for example?

Thank you

Should be possible and it depends on if you want a ring indication sent back.

One way is to use a combination of PlayTones, RAND, and While.

[edit: accidentally hit the wrong key and posted early. Added example and then modified the while comparison to use the randomly generated number]

For example this might get you close to what you need:

exten => 999,1,Answer()
  same => n,Set(num=${RAND(1,5)})
  same => n,Verbose(Ringing ${num} times)
  same => n,Set(i=1)
  same => n,While($[${i} <= $[num}])
  same => n,Playtones(440+480/2000,0/4000)
  same => n,Wait(7)
  same => n,Set(i=$[${i} + 1])
  same => n,EndWhile
  same => n,Playback(hello-world)

However that won’t play indications back. You’ll need to use the Ringing application for that.