[Home]

Summary:ASTERISK-11684: Using state interface and local channels with 12127v3.patch
Reporter:Doug (doug)Labels:
Date Opened:2008-03-19 04:42:43Date Closed:2011-06-07 14:03:24
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-1.4.18-state_interface.diff
Description:After using and testing patch 12127v3 from ticket http://bugs.digium.com/view.php?id=12127 we are still having some problems. We have installed this patched version on 3 production servers using a patched 1.4.19.

We are getting errors about the state not being correct and on the high load systems find that the agents state goes into an (Invalid) mode and disallows calls to be passed to the agents. I also have noticed that the queue will attempt to send calls to the agents even when in use producing a "circuit-busy" this was a problem previously with the "unknown" state and in a busy inviroment will cause 10-20 attempts per sec.

Any suggestions how to debug futher please?

****** ADDITIONAL INFORMATION ******

We recive an error often:

[Mar 18 15:58:41] WARNING[774] app_queue.c: The device state of this queue member, Local/8012@default-agent/n, is still 'Not in Use' when it probably should not be! Please check UPGRADE.txt for correct configuration settings.



Attempt on agents while in use: (notice the attemt on 8012, 8016 and 8013 when show queues shows these in use)

 == Spawn extension (default-agent, 8012, 20) exited non-zero on 'Local/8012@default-agent-4551,2'
   -- Executing [8002@default-agent:1] NoCDR("Local/8002@default-agent-10c5,2", "") in new stack
   -- Executing [8002@default-agent:2] Set("Local/8002@default-agent-10c5,2", "DND=") in new stack
   -- Executing [8002@default-agent:3] GotoIf("Local/8002@default-agent-10c5,2", "0?20") in new stack
   -- Executing [8002@default-agent:4] GotoIf("Local/8002@default-agent-10c5,2", "1?7") in new stack
   -- Goto (default-agent,8002,7)
   -- Executing [8002@default-agent:7] Set("Local/8002@default-agent-10c5,2", "GROUPCOUNT=1") in new stack
   -- Executing [8002@default-agent:8] GotoIf("Local/8002@default-agent-10c5,2", "1?20") in new stack
   -- Goto (default-agent,8002,20)
   -- Executing [8002@default-agent:20] Congestion("Local/8002@default-agent-10c5,2", "") in new stack
   -- Local/8002@default-agent-10c5,1 is circuit-busy
   -- Nobody picked up in 0 ms
 == Spawn extension (default-agent, 8002, 20) exited non-zero on 'Local/8002@default-agent-10c5,2'
   -- Executing [8016@default-agent:1] NoCDR("Local/8016@default-agent-13ee,2", "") in new stack
   -- Executing [8016@default-agent:2] Set("Local/8016@default-agent-13ee,2", "DND=") in new stack
   -- Executing [8016@default-agent:3] GotoIf("Local/8016@default-agent-13ee,2", "0?20") in new stack
   -- Executing [8016@default-agent:4] GotoIf("Local/8016@default-agent-13ee,2", "1?7") in new stack
   -- Goto (default-agent,8016,7)
   -- Executing [8016@default-agent:7] Set("Local/8016@default-agent-13ee,2", "GROUPCOUNT=1") in new stack
   -- Executing [8016@default-agent:8] GotoIf("Local/8016@default-agent-13ee,2", "1?20") in new stack
   -- Goto (default-agent,8016,20)
   -- Executing [8016@default-agent:20] Congestion("Local/8016@default-agent-13ee,2", "") in new stack
   -- Local/8016@default-agent-13ee,1 is circuit-busy
   -- Nobody picked up in 0 ms
 == Spawn extension (default-agent, 8016, 20) exited non-zero on 'Local/8016@default-agent-13ee,2'
   -- Executing [8013@default-agent:1] NoCDR("Local/8013@default-agent-4eeb,2", "") in new stack
   -- Executing [8013@default-agent:2] Set("Local/8013@default-agent-4eeb,2", "DND=") in new stack
   -- Executing [8013@default-agent:3] GotoIf("Local/8013@default-agent-4eeb,2", "0?20") in new stack
   -- Executing [8013@default-agent:4] GotoIf("Local/8013@default-agent-4eeb,2", "1?7") in new stack
   -- Goto (default-agent,8013,7)
   -- Executing [8013@default-agent:7] Set("Local/8013@default-agent-4eeb,2", "GROUPCOUNT=1") in new stack
   -- Executing [8013@default-agent:8] GotoIf("Local/8013@default-agent-4eeb,2", "1?20") in new stack
   -- Goto (default-agent,8013,20)
   -- Executing [8013@default-agent:20] Congestion("Local/8013@default-agent-4eeb,2", "") in new stack
   -- Local/8013@default-agent-4eeb,1 is circuit-busy
   -- Nobody picked up in 0 ms

default-grey has 14 calls (max unlimited) in 'rrmemory' strategy (43s holdtime), W:0, C:696, A:240, SL:62.5% within 60s
  Members:
     Local/8020@default-agent/n (dynamic) (paused) (Not in use) has taken 57 calls (last was 79 secs ago)
     Local/8010@default-agent/n (dynamic) (In use) has taken 38 calls (last was 96 secs ago)
     Local/8000@default-agent/n (dynamic) (Not in use) has taken 16 calls (last was 179 secs ago)
     Local/8014@default-agent/n (dynamic) (paused) (Not in use) has taken 26 calls (last was 318 secs ago)
     Local/8008@default-agent/n (dynamic) (paused) (Not in use) has taken 35 calls (last was 119 secs ago)
     Local/8021@default-agent/n (dynamic) (Not in use) has taken 19 calls (last was 960 secs ago)
     Local/8015@default-agent/n (dynamic) (In use) has taken 67 calls (last was 64 secs ago)
     Local/8009@default-agent/n (dynamic) (In use) has taken 60 calls (last was 9 secs ago)
     Local/8022@default-agent/n (dynamic) (paused) (Not in use) has taken 28 calls (last was 1326 secs ago)
     Local/8012@default-agent/n (dynamic) (In use) has taken 54 calls (last was 160 secs ago)
     Local/8002@default-agent/n (dynamic) (In use) has taken 61 calls (last was 72 secs ago)
     Local/8016@default-agent/n (dynamic) (In use) has taken 42 calls (last was 1310 secs ago)
     Local/8013@default-agent/n (dynamic) (Not in use) has taken 7 calls (last was 76 secs ago)
     Local/8017@default-agent/n (dynamic) (In use) has taken 6 calls (last was 4 secs ago)
     Local/8007@default-agent/n (dynamic) (In use) has taken 33 calls (last was 21 secs ago)
     Local/8030@default-agent/n (dynamic) (In use) has taken 51 calls (last was 36 secs ago)
Comments:By: Russell Bryant (russell) 2008-03-19 08:41:30

I have assigned this to putnopvut so he can take a look at it.

However, please note that we normally do _not_ support patched systems of any kind.  This patch is only officially supported in Asterisk 1.6.

By: Mark Michelson (mmichelson) 2008-03-19 08:49:55

DougUDI:

Did you apply the patch from 12127 directly to your patched installation? If so, it wouldn't surprise me that you would have troubles like this. Take a look at atis's note http://bugs.digium.com/view.php?id=12127#83966, he mentions the changes you need to make to the patch if you are using state_interface.

By: Joel Vandal (jvandal) 2008-03-19 09:11:52

Hi,

We totally agree that you _not_ support the 'state_interface' patch on 1.4 since it's officially only on 1.6, this is why I try to directly help DougUDI and aragon, most of possible 'outside' of this bugtracker (for unofficial patch).


When we see the the WARNING error, this is immediatly after an agent has answered a call, IMHO they have no real problems, I never see agent receive more than 1 concurrent call, etc.

-- SIP/1029-09b079e8 answered Local/1029@default-agent-dc13,2
   -- Local/1029@default-agent-dc13,1 answered SIP/pbxtest-b550efd0
[Mar 19 10:11:50] WARNING[706]: app_queue.c:3049 try_calling: The device state of this queue member, Local/1029@default-agent/n, is still 'Not in Use' when it probably should not be! Please check UPGRADE.txt for correct configuration settings.
 == Begin MixMonitor Recording SIP/pbxtest-b550efd0

By: Doug (doug) 2008-03-20 01:39:48

Well the problem is more that the queue is attempting to send calls when the user is in state (In use) this is messy as it can cause many not needed channels to be created, as mentioned 10-20 created channels in 1 sec. The CLI becomes unusable due to the traffic volumes. I guess the best solution for now untill we move to 1.6 will be go go back to SIP channels and not use Local channel.

By: Atis Lezdins (atis) 2008-03-20 03:44:17

Are you completely sure that you have ringinuse=no for queue?

Please post your login command or queue member config (with full parameters). Also it would be desirable if you could post exactly that state_interface patch you are using, there have been few more commits to state_interface after initial release.

Additionally, setting debug level to 1 and verbose level to 3 and then providing clean log of 2 calls to queue with one agent in it would be helpful.

I will try to help on this one, I've spent a lot of time debugging my own system, so i know how those logs should look like.

By: Joel Vandal (jvandal) 2008-03-20 07:33:02

atis, ringinuse=yes .... this can explain lots of problems ? :P

By: Joel Vandal (jvandal) 2008-03-20 07:51:40

atis, I just upload the original patch we use for state interface on branches/1.4.

Then we applied 12127 (w/ change the interface to state_interface) ...

By: Phillip Smith (phillip) 2008-03-20 07:54:23

Changing ringinuse doesn't seem to make any different to passing calls when agents are busy

By: Atis Lezdins (atis) 2008-03-20 08:59:59

jvandal, this looks like very first version. i think i had even some compiler warnings with that, complaining on AddQueueMember, or something that state_interface may be undefined. As i don't use that (pure realtime members) i didn't payed attention. Later i merged all commits from trunk regarding state_interface, not really sure is that fixed or not.

Can anybody who's having problems please provide complete member login details - i suspect something there could be faulty. It also seems weird to have Local/8009@default-agent/n as membername - that could be ok - i  just usually give distinct membername, but could be some argument shift.

As for "ringinuse" - i had that problem when i discarded use of Agent channel. I never knew there's such argument so i didn't had it in queue config, and it defaults to 1 (seems that Agent channel was blocking it). So, my load really bumped up (but that was just part of problems).

By: Joel Vandal (jvandal) 2008-03-20 09:29:21

atis, here the command we use to add queue member, I've not post others dialplan that get queue list from db, etc...


QUEUE         = default-test
PHONE_EXTEN   = 8002
QGENT_PENALTY = 0
NEWCHANNEL    = SIP/8002

AddQueueMember(${QUEUE}|Local/${PHONE_EXTEN}@default-agent/n|${AGENT_PENALTY}|||${NEWCHANNEL})

empty fields are options and membername

By: Mark Michelson (mmichelson) 2008-03-20 10:11:32

Okay, then I'm going to close this issue for now. By the way, do you have ringinuse=no in queues.conf? You need this set if you want members whose status is "in use" to not receive calls.

Edit: Ignore the ringinuse question...this has obviously already been addressed.



By: Atis Lezdins (atis) 2008-03-20 11:00:18

Ok, seems that problem could be in create_queue_member. it should be:

cur->status = ast_device_state(cur->state_interface);

I just gathered latest backport for state_interface, so you could try that. http://ftp.iq-labs.net/state_interface-1.4/asterisk-svn-1.4.19-state_interface_101578.patch

The following revisions from trunk are included there:
97203
97248
98993
98994
100344
101576
101578 (partial)

Anyway i agree that, such issues shouldn't be supported in bugtracker. If you need further support, use public mailinglists, and i will try to help there.