Queue inside the queue

Hello, I have some problems with Queues.
I need to create following scheme:
Incoming call —> script, detecting persist number in base or not --> yes, no
yes —> Queue2 ringing for 60 seconds
no —> Queue1 ringing for 7 seconds —> Queue1 stay ringing and adding Queue2, all them ringing for 60 seconds.

The issue happened in the last part “Queue1 stay ringing and adding Queue2, all them ringing for 60 seconds”. Variants of solution which I know:

  1. Create the 3rd Queue and add there members from Queue1 and Queue2. It doesn`t suit.
  2. Create the 3rd Queue where adding Queue1 and Queue2 via extensions and syntax
    “member => local/110@local”
    "member => local/111@local"
    exten => 110,1,Queue(queue1,t)

    exten => 111,1,Queue(queue2,t)

It works, but in the parameter “TO” pointing “local/110@local” or “local/111@local” instead of SIP/user_number which answered.
And this also doesn`t suite cause we will have wrong statistic by incoming calls per user.

Does anyone know how it could be realized?

Use one queue, penalties, and look at queue_rules.conf.sample.

Thanks for answer, I did following configuration with penalties:
strategy = ringall
maxlen = 0
retry = 5
leavewhenempty = no
ringinuse = no
joinempty = yes
servicelevel = 30
setinterfacevar = yes
context = local
defaultrule = testpenalty
member => SIP/106,2
member => SIP/720,3

exten => 450,1,Set(QUEUE_MIN_PENALTY=2)
same => n,Set(QUEUE_MAX_PENALTY=2)
same => n,Queue(test,testpenalty)
same => n,Hangup()

penaltychange => 7,+1
penaltychange => 60,5,5

And this configuration doesn`t work, ringing only users with less penalty.