Dialplan problem


I am using Asterisk Server V11.16.0, using only SIP communication
I have around 10 users with number from 4001 to 4010
I have a sip number 5000.
When I call this number, I want to ring all the numbers from 4001 to 4010, ringing one by one, for 10 seconds, cycling during 5 minutes if no one answer and then hangup.
I have the following rule in the extension.conf :

exten => 5000,1,Dial(SIP/4001,10)
same => n,Dial(SIP/4002,10)
same => n,Dial(SIP/4003,10)
same => n,Dial(SIP/4004,10)
same => n,Dial(SIP/4005,10)
same => n,Dial(SIP/4006,10)
same => n,Dial(SIP/4007,10)
same => n,Dial(SIP/4008,10)
same => n,Dial(SIP/4009,10)
same => n,Dial(SIP/4010,10)
same => n,Hangup()

It works fine to ring the different numbers, but I don’t know how to do the cycling.

Any help would be appreciate


Best Regards

T. Dutertre

10 Clients á 10 seconds make 100 seconds. 5 minutes means 300 seconds which means Your process should run 3 times.
You could achieve this “quick and dirty” by just coying the lines 1-10 twice bevore the Hangup or more intelligent by establsihing a counter (initial value 1), incrementing the counter before the hangup and jump back to the first priority in Your dialplan when the counter is below 4.

Are you sure you don’t want to use the queue application here?