Static/Dynamic queue agents not ringing - but other queues work

Hello,

I have a problematic queue which has a static agent. This static agent was on Zoiper softphone and it all worked well. Then we got a Polycom 335 instead of the Zoiper and this 335 went through a series of provisioning issues which got resolved in the end. But by the time the 335 got provisioned fine and started working - the queue went bonkers.

Everytime we press the selection for IVR, on CLI we see it entering the queue, but no ringing. Logs and config below:

PROBLEM QUEUE:
[302]
announce-frequency=0
announce-holdtime=no
announce-position=no
autofill=yes
eventmemberstatus=yes
eventwhencalled=no
joinempty=no
leavewhenempty=no
maxlen=0
periodic-announce-frequency=0
queue-callswaiting=silence/1
queue-thereare=silence/1
queue-youarenext=silence/1
reportholdtime=no
retry=1
ringinuse=yes
servicelevel=60
strategy=rrmemory
timeout=15
weight=0
wrapuptime=1
member=Local/102@from-queue/n,0,Mark,SIP/102

WORKING QUEUE (Mixture of Zoiper/Polycom)
[303]
announce-frequency=0
announce-holdtime=no
announce-position=no
autofill=yes
eventmemberstatus=no
eventwhencalled=no
joinempty=yes
leavewhenempty=no
maxlen=0
monitor-type=mixmonitor
monitor-format=wav
periodic-announce-frequency=0
queue-callswaiting=silence/1
queue-thereare=silence/1
queue-youarenext=silence/1
reportholdtime=no
retry=5
ringinuse=yes
servicelevel=60
strategy=rrmemory
timeout=15
weight=0
wrapuptime=2
member=Local/140@from-queue/n,0
member=Local/136@from-queue/n,0
member=Local/145@from-queue/n,0
member=Local/141@from-queue/n,0,Adrian,SIP/6002

QUEUE_LOG
[root@capitalife ~]# tail -F /var/log/asterisk/queue_log
1341389147|1341389147.12662|302|NONE|ENTERQUEUE||102|1
1341389153|1341389147.12662|302|NONE|ABANDON|1|1|6
1341389177|1341389177.12665|303|NONE|ENTERQUEUE||102|1
1341389177|1341389177.12665|303|Local/140@from-queue/n|RINGNOANSWER|0
1341389190|1341389177.12665|303|NONE|ABANDON|1|1|13

CLI:
Verbosity is at least 11
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [302@from-internal:1] Macro(“SIP/6010-00000a0d”, “user-callerid,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/6010-00000a0d”, “AMPUSER=6010”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/6010-00000a0d”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/6010-00000a0d”, “1?Set(REALCALLERIDNUM=6010)”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/6010-00000a0d”, “AMPUSER=102”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/6010-00000a0d”, “AMPUSERCIDNAME=Mark”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/6010-00000a0d”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/6010-00000a0d”, “AMPUSERCID=102”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/6010-00000a0d”, “CALLERID(all)=“Mark” <102>”) in new stack
– Executing [s@macro-user-callerid:9] ExecIf(“SIP/6010-00000a0d”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:10] GotoIf(“SIP/6010-00000a0d”, “0?continue”) in new stack
– Executing [s@macro-user-callerid:11] Set(“SIP/6010-00000a0d”, “__TTL=64”) in new stack
– Executing [s@macro-user-callerid:12] GotoIf(“SIP/6010-00000a0d”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [s@macro-user-callerid:19] Set(“SIP/6010-00000a0d”, “CALLERID(number)=102”) in new stack
– Executing [s@macro-user-callerid:20] Set(“SIP/6010-00000a0d”, “CALLERID(name)=Mark”) in new stack
– Executing [s@macro-user-callerid:21] NoOp(“SIP/6010-00000a0d”, “Using CallerID “Mark” <102>”) in new stack
– Executing [302@from-internal:2] Answer(“SIP/6010-00000a0d”, “”) in new stack
– Executing [302@from-internal:3] Set(“SIP/6010-00000a0d”, “__BLKVM_OVERRIDE=BLKVM/302/SIP/6010-00000a0d”) in new stack
– Executing [302@from-internal:4] Set(“SIP/6010-00000a0d”, “__BLKVM_BASE=302”) in new stack
– Executing [302@from-internal:5] Set(“SIP/6010-00000a0d”, “DB(BLKVM/302/SIP/6010-00000a0d)=TRUE”) in new stack
– Executing [302@from-internal:6] ExecIf(“SIP/6010-00000a0d”, “1?Set(_DIAL_OPTIONS=tM(auto-blkvm))”) in new stack
– Executing [302@from-internal:7] Set(“SIP/6010-00000a0d”, “__NODEST=302”) in new stack
– Executing [302@from-internal:8] Set(“SIP/6010-00000a0d”, “MONITOR_FILENAME=/var/spool/asterisk/monitor/q302-20120704-160734-1341389253.12673”) in new stack
– Executing [302@from-internal:9] Queue(“SIP/6010-00000a0d”, “302,t,”) in new stack
– Started music on hold, class ‘default’, on SIP/6010-00000a0d

…after the MOH, there’s no activity on that call.

Please help.

hiya

what does
asterisk -rx “queue show 302”

and

asterisk -rx “database show” | grep 335

show? can post it here?

[root@capitalife ~]# asterisk -rx "queue show 302"
302 has 0 calls (max unlimited) in ‘rrmemory’ strategy (0s holdtime, 0s talktime), W:0, C:0, A:11, SL:0.0% within 60s
Members:
Mark (Local/102@from-queue/n) (Unavailable) has taken no calls yet
No Callers


[root@capitalife ~]# asterisk -rx “database show” | grep 335
[root@capitalife ~]# asterisk -rx “database show” | grep 550
[root@capitalife ~]# asterisk -rx “database show” | grep polycom

Nothing.

Hi,

Are u running device/user mode? or extensions mode?

If your device is really connected but isn’t able to receive calls NOW…it does shows above, the agent/user in the queue 302 is Unavailable

->> Mark (Local/102@from-queue/n) (Unavailable) has taken no calls yet

You might want to checkout the Advanced Setting and set the USERDEVSTATE=yes (Enable Custom Device States).

can you do a
asterisk -rx “sip show peer” | grep 102

and

asterisk -rx “database show” | grep 102

Running on device&user mode.

[root@capitalife ~]# asterisk -rx “sip show peers” | grep 102
102 (Unspecified) D N A 0 UNKNOWN
[root@capitalife ~]# asterisk -rx “database show” | grep 102
/AMPUSER/102/cidname : Mark
/AMPUSER/102/cidnum : 102
/AMPUSER/102/device : 102&6010
/AMPUSER/102/language :
/AMPUSER/102/noanswer :
/AMPUSER/102/outboundcid :
/AMPUSER/102/password : 222
/AMPUSER/102/recording : out=Adhoc|in=Adhoc
/AMPUSER/102/ringtimer : 0
/AMPUSER/102/voicemail : default
/DEVICE/102/default_user : 102
/DEVICE/102/dial : SIP/102
/DEVICE/102/type : fixed
/DEVICE/102/user : 102
/DEVICE/6010/default_user : 102
/DEVICE/6010/user : 102
[root@capitalife ~]#

I’ve seen this mentioned in another thread (http://www.freepbx.org/forum/freepbx/users/freepbx-freepbx-2-8-0-3-and-agents-not-ringing-in-a-queue-when-set-to-static-or-) but no mention of where to do this. Can you please point me in the right direction? I’m on 2.8, so there’s no Advance Settings.

hi

If you see /AMPUSER/102/device : 102&6010

It is set to two device, which i would think is wrong.

Why not try tihs

  1. Do a logout on 102 and a relogin, that value should contain only 1 device by right

If you still see 2 devices, then try to modify the database manually like this

  1. Try to run this
    asterisk -rx “database put AMPUSER 102/device 102”

then try again.

Thing is, the original extension 100 is mapped to the device 6012 (Zoiper, and later Polycom 335). Meaning it didn’t require logging in.

Then, I tested with my extension 102 which is also mapped to device 6010 (Polycom 550). I also disconnected the Polycom 550, and tried with Zoiper, and yet again, nothing.

If you want me to proceed with your earlier instructions…

Yes, sure you can.

Can you show the traces of the output of the initial queue show and sip show commands again?

Traces?

Sure, just try them.

If all else don’t work, just delete the device and the respective user, and recreate it.

Ok, I tried log out and Allison said “Error has occurred” - probably because this is a fixed device mapped to my extension.

Did the next step of database, and it completed successfully. I called the queue and still nothing.

To combat this issue the first time around, I created new device, new extension, and also a new queue. And it didn’t work.

Quick side question if I remove the extension 100, can I re-add 100?

Sanjayws, thank you so much for your help. Using your strategy of playing with the database, I figured out that there were 3 devices registered for the 131 extension.

I compared the database for 131 with that of mine (102) and recreated everything and it worked!
Thanks so much for your help…

But this begs the question, why are these values getting “stuck” in the database, and what’s the way to fix it if not a restart?

Thanks!

Hi

You can write a custom context to check if a device is already logged in and if it, prevent further logging in.

You have to fork out the code for [macro-user-logon] into /etc/asterisk/extensions_override_freepbx.conf

and somewhere in there before the actual user_login_out.agi is called, do a check to see if this device is already logged into something like;

exten => s,n,Set(THISUSER=${DB(AMPUSER/${AMPUSER}/device)})
exten => s,n,NoOp(You exist as user: ${THISUSER})
exten => s,n,GotoIf($["${THISUSER}" != “”]?s-SIGNEDIN,1)
;;then the s-SIGNEDIN…
exten => s-SIGNEDIN,1,Playback(an-error-has-occurred)
exten => s-SIGNEDIN,n,Hangup

I’ve done that in most of my callcenter implementations, simply to avoid this issue that you are facing now.

Thanks, but unfortunately I’m not a guru like yourself. I freak out if I have to do anything under-the-hood, lol