Need ring strategy to remember agent for caller

Hi everyone,
I have call center and some agent in one queue answering incoming outsiders calls like a support center, I want to ring an agent who recently (for example 2 past hour) answered the same caller.
for example if a customer talk with agent #1, at future calls (specific period for example 2 hour) talk with agent #1 too
how can I have such thing?
need to create new ring strategy?
if yes, how?
thanks all.

Can be done by writing an AGI script to check the callerid and connect to the last agent . you can run your AGI script in queue application .

I have a sample here to run an AGI script to play agent number . This can be helpful for you :
omid-mohajerani.blogspot.com/201 … cript.html

Great work, thanks omid
ارادتمند شما

your welcome , Good luck