Nigel Roberts
2006-Nov-08 01:54 UTC
[asterisk-users] Queue forks asterisk and then leaves the extra processes lying around
Hi, I have a problem with Queue where by a call comes in to the queue and if all the phones are busy and the queue reaches the timeout, it will fork a process and leave it sitting there before going off to the next step in the dial plan and continuing normally. This doesn't cause any problems except for I assume that it will eventually use up all the memory on the machine and it messes with my process monitoring. It doesn't seem to matter what I have as the next step after the Queue command and it happens only sometimes. It seems like it might even be a timing issue given that it's less likely to happen if any one of the phones ring. The new asterisk processes that get started up look like they think they're new asterisk instances or though they don't actually do anything or interfere with the first asterisk instance. Has anyone had any problems like this? Am I doing something wrong? The appropriate part of my dial plan looks like this: exten => 101,1,Answer exten => 101,n,GotoIf($["${CONTEXT}"="from-internal"]?USERCID:SETCID) exten => 101,n(USERCID),Macro(user-callerid,) exten => 101,n(SETCID),Set(CALLERID(name)=${CALLERIDNAME}) exten => 101,n,Set(MONITOR_FILENAME=/var/spool/asterisk/monitor/q${EXTEN}-${TIMESTAMP}-${UNIQUEID}) exten => 101,n,Queue(101|tr|||30) exten => 101,n,Goto(ext-local,83,1) exten => 101*,1,Macro(agent-add,101,) exten => 101**,1,Macro(agent-del,101,101) and from queues.conf [101] wrapuptime=0 timeout=15 strategy=ringall retry=5 queue-youarenextqueue-therearequeue-thankyou=queue-thankyou queue-callswaitingmusic=default monitor-join=yes monitor-formatmember=Local/88@from-internal,0 member=Local/83@from-internal,0 maxlen=2 leavewhenempty=no joinempty=Yes contextannounce-holdtime=no announce-frequency=0 and some logs to show what I mean by the new asterisk process thinking that it is actually a new asterisk. -- snip -- Nov 8 21:44:38 DEBUG[25896] channel.c: Hanging up channel 'Local/88@from-internal-837f,2' Nov 8 21:44:38 DEBUG[25627] devicestate.c: Changing state for Local/88@from-internal - state 0 (Unknown) Nov 8 21:44:38 DEBUG[25904] app_queue.c: Device 'Local/88@from-internal' changed to state '0' (Unknown) Nov 8 21:44:38 DEBUG[25897] cdr_addon_mysql.c: cdr_mysql: inserting a CDR record. Nov 8 21:44:38 DEBUG[25897] 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) VALUES ('2006-11-08 21:44:38','49761450','49761450','83','from-internal', 'Local/83@from-internal-48af,2','','AGI','recordingcheck|20061108-214438|1162975478.49',0,0,'NO ANSWER',3,'','1162975478.49') Nov 8 21:44:38 DEBUG[25897] channel.c: Hanging up channel 'Local/83@from-internal-48af,2' Nov 8 21:44:38 DEBUG[25627] devicestate.c: Changing state for Local/83@from-internal - state 0 (Unknown) Nov 8 21:44:38 DEBUG[25905] app_queue.c: Device 'Local/83@from-internal' changed to state '0' (Unknown) Nov 8 21:44:38 VERBOSE[25902] logger.c: == Parsing '/etc/asterisk/extconfig.conf': Nov 8 21:44:38 DEBUG[25902] config.c:Parsing /etc/asterisk/extconfig.conf Nov 8 21:44:38 VERBOSE[25902] logger.c: == Parsing '/etc/asterisk/extconfig.conf': Found Nov 8 21:44:38 VERBOSE[25902] logger.c: == Parsing '/etc/asterisk/manager.conf': Nov 8 21:44:38 DEBUG[25902] config.c: Parsing /etc/asterisk/manager.conf ... lots of asterisk start up logs ... -- snip -- Regards, Nigel