[Asterisk-Users] Agents, queues and zombies
Steve Rawlings
steve at rawlings.demon.co.uk
Thu Feb 2 12:51:53 MST 2006
Hi all,
Have been experimenting with agents and queues instead of placing calls
direct to a user's phone extension, but I've run into problems with calls to
both the agent and the extension which creates a zombie and double records
calls abandoned etc. We're using a unique queue for each agent (only a
handful of users) to try and get some agent/queue information to see what
the agents have been doing, but for some reason each call rings both the
agent and the extension, the extension drops once answered but I get two cdr
records, if the call is abandoned I get two calls added to the total when I
check with 'show queues'. Any ideas how I can avoid this, I've searched the
wiki with little joy, have I misssed something simple?
Steve
I've created the agents,
agents.conf
..
agent => 366,,Richard
agent => 300,,Jamie
created the queues
queues.conf
..
[Q204]
member => Agent/366
[Q205]
member => Agent/300
Logged them in with
exten => 555,1,AgentCallbackLogin
This requests an agent ID, no password and the extension to ring for the
calls and lets me login anyone to any phone. For the test I logged in agent
300 and used extension 205. The testing dialplan for incoming calls over
our PRI goes something like -
extensions.conf
..
exten => 205,1,Answer
exten => 205,2,Ringback
exten => 205,3,Wait(2)
exten => 205,4,Queue(Q205)
The call gets answered and the log shows it's
VERBOSE[10393] logger.c: -- Executing Queue("Zap/32-1", "Q205") in new stack
Feb 2 13:47:20 DEBUG[10393] channel.c: Prodding channel 'Zap/32-1'
Feb 2 13:47:20 VERBOSE[10393] logger.c: -- Started music on hold, class
'default', on channel 'Zap/32-1'
Feb 2 13:47:20 DEBUG[10393] channel.c: Scheduling timer at 160 sample
intervals
Feb 2 13:47:20 VERBOSE[10393] logger.c: -- outgoing agentcall, to agent
'300', on 'Local/205 at default-a32e,1'
Feb 2 13:47:20 VERBOSE[10393] logger.c: -- Called Agent/300
Feb 2 13:47:20 VERBOSE[10395] logger.c: -- Executing
Dial("Local/205 at default-a32e,2", "SIP/205|30|tT") in new stack
Feb 2 13:47:20 DEBUG[10395] chan_sip.c: Outgoing Call for 205
Feb 2 13:47:20 VERBOSE[10395] logger.c: -- Called 205
Feb 2 13:47:20 DEBUG[1209] chan_sip.c: (Provisional) Stopping retransmission
(but retaining packet) on '2b1f50e81ad98d3a18640c2548361487 at 192.168.2.6'
Request 102: Found
Feb 2 13:47:20 DEBUG[1209] chan_sip.c: (Provisional) Stopping retransmission
(but retaining packet) on '2b1f50e81ad98d3a18640c2548361487 at 192.168.2.6'
Request 102: Found
Feb 2 13:47:20 VERBOSE[10395] logger.c: -- SIP/205-e065 is ringing
Feb 2 13:47:20 VERBOSE[10393] logger.c: -- Agent/300 is ringing
Feb 2 13:47:20 DEBUG[10393] channel.c: Generator got voice, switching to
phase locked mode
Feb 2 13:47:22 DEBUG[1209] chan_sip.c: build_route: Contact hop:
<sip:205 at 192.168.2.15>
Feb 2 13:47:22 VERBOSE[10395] logger.c: -- SIP/205-e065 answered
Local/205 at default-a32e,2
Feb 2 13:47:22 DEBUG[10393] app_queue.c: Dunno what to do with control
type -1
Feb 2 13:47:22 VERBOSE[10393] logger.c: -- Agent/300 answered Zap/32-1
Feb 2 13:47:22 DEBUG[10393] chan_zap.c: Set option TONE VERIFY, mode:
MUTECONF(1) on Zap/32-1
Feb 2 13:47:22 VERBOSE[10393] logger.c: -- Stopped music on hold on Zap/32-1
Feb 2 13:47:22 DEBUG[10393] channel.c: Scheduling timer at 0 sample
intervals
Feb 2 13:47:22 DEBUG[10395] channel.c: Planning to masquerade channel
SIP/205-e065 into the structure of Local/205 at default-a32e,1
Feb 2 13:47:22 DEBUG[10395] channel.c: Done planning to masquerade channel
SIP/205-e065 into the structure of Local/205 at default-a32e,1
Feb 2 13:47:22 DEBUG[10393] channel.c: Got clone lock for masquerade on
'SIP/205-e065' at 0x8801ee4
Feb 2 13:47:22 DEBUG[10395] chan_local.c: Not posting to queue since already
masked on 'Local/205 at default-a32e,2'
Feb 2 13:47:22 DEBUG[10393] channel.c: Putting channel SIP/205-e065 in 64/64
formats
Feb 2 13:47:22 DEBUG[10393] channel.c: Released clone lock on
'Local/205 at default-a32e,1<ZOMBIE>'
Feb 2 13:47:22 DEBUG[10393] channel.c: Done Masquerading SIP/205-e065 (6)
Feb 2 13:47:22 DEBUG[10393] chan_agent.c: Bridge on 'SIP/205-e065' being set
to 'Agent/300' (3)
Feb 2 13:47:22 DEBUG[10393] chan_agent.c: Native formats changing from 64 to
8
Feb 2 13:47:22 DEBUG[10393] chan_agent.c: Resetting read to 64 and write to
64
Feb 2 13:47:22 DEBUG[10395] channel.c: Bridge stops because we're zombie or
need a soft hangup: c0=Local/205 at default-a32e,2,
c1=Local/205 at default-a32e,1<ZOMBIE>, flags: No,No,Yes,Yes
Feb 2 13:47:22 DEBUG[10395] channel.c: Bridge stops bridging channels
Local/205 at default-a32e,2 and Local/205 at default-a32e,1<ZOMBIE>
Feb 2 13:47:22 DEBUG[10395] app_dial.c: Exiting with DIALSTATUS=ANSWER.
Feb 2 13:47:22 VERBOSE[10395] logger.c: == Spawn extension
(macro-stdextn-sip, xindex, 1) exited non-zero on 'Local/205 at default-a32e,2'
in macro 'stdextn-sip'
Feb 2 13:47:22 VERBOSE[10395] logger.c: == Spawn extension (default, 205, 1)
exited non-zero on 'Local/205 at default-a32e,2'
Feb 2 13:47:22 DEBUG[1140] channel.c: Avoiding initial deadlock for
'Local/205 at default-a32e,2'
Feb 2 13:47:22 DEBUG[10395] cdr_addon_mysql.c: cdr_mysql: inserting a CDR
record.
Feb 2 13:47:22 DEBUG[10395] cdr_addon_mysql.c: cdr_mysql: SQL command as
follows: INSERT INTO cdr
(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield)
VALUES ('2006-02-02 13:47:20','\"INDeX\" <1001>','1001','205','default',
'Local/205 at default-a32e,2','SIP/205-e065','Dial','SIP/205|30|tT',2,0,'ANSWERED',3,'','1138888040.2928','')
Feb 2 13:47:25 DEBUG[1209] chan_sip.c: Stopping retransmission on
'40fee5e54bd677670b368e212aee6518 at 127.0.0.1' of Request 104: Match Found
Feb 2 13:47:27 DEBUG[10393] chan_agent.c: Bridge on 'SIP/205-e065' being
cleared (2)
Feb 2 13:47:27 DEBUG[10393] chan_sip.c: update_call_counter(205) - decrement
call limit counter
Feb 2 13:47:27 DEBUG[10393] channel.c: Didn't get a frame from channel:
Agent/300
Feb 2 13:47:27 DEBUG[10393] channel.c: Bridge stops bridging channels
Zap/32-1 and Agent/300
Feb 2 13:47:27 DEBUG[10393] chan_agent.c: Hangup called for state Up
Feb 2 13:47:27 VERBOSE[10393] logger.c: == Spawn extension (index1, 205, 7)
exited non-zero on 'Zap/32-1'
Feb 2 13:47:27 VERBOSE[10393] logger.c: -- Executing Hangup("Zap/32-1", "")
in new stack
Feb 2 13:47:27 VERBOSE[10393] logger.c: == Spawn extension (index1, h, 1)
exited non-zero on 'Zap/32-1'
Feb 2 13:47:27 DEBUG[10393] cdr_addon_mysql.c: cdr_mysql: inserting a CDR
record.
Feb 2 13:47:27 DEBUG[10393] cdr_addon_mysql.c: cdr_mysql: SQL command as
follows: INSERT INTO cdr
(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield)
VALUES ('2006-02-02 13:47:20','\"INDeX\" <1001>','1001','205','index1',
'Zap/32-1','Agent/300','Hangup','',7,5,'ANSWERED',3,'','1138888039.2926','')
Feb 2 13:47:27 DEBUG[10393] chan_zap.c: Set option AUDIO MODE, value: ON(1)
on Zap/32-1
Feb 2 13:47:27 DEBUG[10393] chan_zap.c: Hangup: channel: 32 index = 0,
normal = 14, callwait = -1, thirdcall = -1
Feb 2 13:47:27 DEBUG[10393] chan_zap.c: Not yet hungup... Calling hangup
once with icause, and clearing call
Feb 2 13:47:27 DEBUG[10393] chan_zap.c: disabled echo cancellation on
channel 32
Feb 2 13:47:27 DEBUG[10393] chan_zap.c: Set option TDD MODE, value: OFF(0)
on Zap/32-1
Feb 2 13:47:27 DEBUG[10393] chan_zap.c: Updated conferencing on 32, with 0
conference users
Feb 2 13:47:27 DEBUG[10393] chan_zap.c: Set option AUDIO MODE, value: OFF(0)
on Zap/32-1
Feb 2 13:47:27 DEBUG[10393] chan_zap.c: disabled echo cancellation on
channel 32
Feb 2 13:47:27 VERBOSE[10393] logger.c: -- Hungup 'Zap/32-1'
More information about the asterisk-users
mailing list