Random Call Recording

Hello Everyone,

I am trying to create a dial plan that will randomly record incoming calls.

I believe the GotoIf function will achieve this. But I am confused with the syntax of the command and what information I need to provide.

I also found this post from a while back that sounds like it does what I am trying to do.

Here is the GotoIf function that was used in the link above, I’m just not sure what all these numbers are related to.
exten => 1,3,GotoIf($[${RAND(0,99)} + 50 >= 100]?1|6)

If anyone could help or point me in the right direction, that would be much appreciated!


Extension number
Priority within extension (step number)
Minimum random number used
Maximum random number used
Number to add to random number
Number to compare to this sum
Priority to go to if comparison is true
Priority to go to if comparison is false

However, if you couldn’t find this information from the documentation, you are going to find Asterisk very difficult to use. In particular extensions and priorities are so fundamental that, if you don’t understand, you should stop and read the documentation until you do understand them.

I’ve no idea why they don’t just subtract 50 from both sides of the equation.