queue.conf : [general] persistentmembers = yes [myqueue] timeout=15 joinempty=strict leavewhenempty=strict announce-frequency=30 maxlen=5 strategy=leastrecent agents.conf : [general] persistentagents=yes [agents] ackcall=no wrapuptime=5000 agent => 3052,,Teste Avaya agent => 3053,,Teste Polycom [general] port=5060 bindaddr=0.0.0.0 context=cat_voip_externo language=br canreinvite=no tos=lowdelay maxexpirey=1728000 disallow=all allow=alaw musicclass=planetarium [3050] context=sip_to_anywhere username=3050 accountcode=3050 mailbox=3050 disallow=all amaflags=billing type=friend callgroup=1 pickupgroup=1 allow=alaw callerid="Ramal Teste" <3050> md5secret=48b3bdfff42b124ffb77e450c6d6e574 nat=yes qualify=yes host=dynamic [3052] context=sip_to_anywhere username=3052 accountcode=3052 disallow=all amaflags=billing type=friend callgroup=1 pickupgroup=1 allow=alaw callerid="Ramal Teste 2" <3052> md5secret=1f38e9caf752d3bab2298982b6da4ccb nat=no qualify=no host=dynamic [3053] context=sip_to_anywhere username=3053 accountcode=3053 mailbox=3053 disallow=all amaflags=billing type=friend callgroup=1 pickupgroup=1 allow=alaw callerid="Teste Desenv Polycom" <3053> md5secret=006b3c0b2b041c413500026039154a79 nat=no qualify=no host=dynamic dialplan : [org_capturaemesperafila] exten => _*8*1*X,1,Answer() exten => _*8*1*X,2,Wait(1) exten => _*8*1*X,3,SetAMAFlags(documentation) exten => _*8*1*X,4,AGI(planetfone/pf.facilidades,capturaemesperafila,1,desenvolvimento,${EXTEN:5}) exten => _*8*1*X,5,Hangup() [queue_to_agent] exten => _3XXX,1,NoOp(BEFORE SETGROUP: Group: ${EXTEN} Count: ${GROUP_COUNT(${EXTEN})}) exten => _3XXX,n,Set(GROUP=${EXTEN}) exten => _3XXX,n,NoOp(AFTER SETGROUP: Group: ${GROUP} Count: ${GROUP_COUNT(${EXTEN})}) exten => _3XXX,n,GotoIf($[ ${GROUP_COUNT(${EXTEN})} > 1 ] ? 1000) exten => _3XXX,n,Dial(SIP/${EXTEN}|15|T) exten => _3XXX,n,Busy() exten => _3XXX,1000,NoOp(Agent ${EXTEN} is busy. Count: ${GROUP_COUNT(${EXTEN})}) exten => _3XXX,n,Busy() [sip_to_anywhere] exten => _3XXX,1,NoOp(BEFORE SETGROUP: Group: ${ACCOUNTCODE} Count: ${GROUP_COUNT(${ACCOUNTCODE})}) exten => _3XXX,n,NoOp(BEFORE SETOUTBOUNDGROUP: Group: ${EXTEN} Count: ${GROUP_COUNT(${EXTEN})}) exten => _3XXX,n,Set(GROUP=${ACCOUNTCODE}) exten => _3XXX,n,Set(OUTBOUND_GROUP=${EXTEN}) exten => _3XXX,n,NoOp(AFTER SETGROUP: Group: ${GROUP} Count: ${GROUP_COUNT(${GROUP})}) exten => _3XXX,n,GotoIf($[ ${GROUP_COUNT(${EXTEN})} > 0 ] ? 1000) exten => _3XXX,n,Dial(SIP/${EXTEN}|15|tT) exten => _3XXX,n,Hangup() exten => _3XXX,1000,NoOp(SIP ${EXTEN} is busy. Count: ${GROUP_COUNT(${EXTEN})}) exten => _3XXX,n,Busy() exten => 3097,1,Queue(myqueue|tr|||600) exten => 3097,2,Hangup()