[asterisk-users] Asterisk 1.2.28 + Realtime Queues - Thinks Queue is empty

Mark Michelson mmichelson at digium.com
Mon Jun 9 10:34:45 CDT 2008


Sherwood McGowan wrote:
> Sherwood McGowan wrote:
>> Gentlemen,
>> I have a particularly strange problem, just started happening. One of 
>> my clients is running Asterisk 1.2.28 and has mysql realtime queues.
>>
>> We log in a member, and then place a test call to the 0 queue but 
>> since joinempty is set to no, and Asterisk thinks the queue has no 
>> members, they're kicked out. WHY would Asterisk think the queue has no 
>> members?
>>
>> here's some relevant output:
>> carp*CLI> show queue 0
>> 0            has 0 calls (max unlimited) in 'rrmemory' strategy (0s 
>> holdtime), W:0, C:0, A:0, SL:0.0% within 0s
>>   Members:
>>      9001 (Invalid) has taken no calls yet
>>   No Callers
>>
>>    -- Executing Answer("SIP/pri-006ba540", "") in new stack
>>    -- Executing Wait("SIP/pri-006ba540", "1") in new stack
>>    -- Executing Dial("SIP/pri-006ba540", 
>> "IAX2/127.0.0.1/3608165200 at inbound") in new stack
>>    -- Called 127.0.0.1/3608165200 at inbound
>>    -- Accepting AUTHENTICATED call from 127.0.0.1:
>>       > requested format = gsm,
>>       > requested prefs = (),
>>       > actual format = gsm,
>>       > host prefs = (ulaw|gsm),
>>       > priority = mine
>>    -- Call accepted by 127.0.0.1 (format gsm)
>>    -- Format for call is gsm
>>    -- Executing Goto("IAX2/carp-12321", "nwi|1")
>>    -- Goto (inbound,nwi,1)
>>    -- Executing AGI("IAX2/carp-12321", "recfile")
>>    -- Launched AGI Script /var/lib/asterisk/agi-bin/recfile
>>    -- AGI Script recfile completed, returning 0
>>    -- Executing MixMonitor("IAX2/carp-12321", "call_20080608222234.wav")
>>  == Begin MixMonitor Recording IAX2/carp-12321
>>    -- Executing Set("IAX2/carp-12321", 
>> "CDR(userfield)=call_20080608222234.wav")
>>    -- Executing Goto("IAX2/carp-12321", "carp-nwi|nwi-main|1")
>>    -- Goto (carp-nwi,nwi-main,1)
>>    -- Executing Answer("IAX2/carp-12321", "")
>>    -- IAX2/carp-1957 answered SIP/pri-006ba540
>>    -- Executing Background("IAX2/carp-12321", "silence/1")
>>    -- Playing 'silence/1' (language 'en')
>>    -- Executing Set("IAX2/carp-12321", 
>> "__ACCOUNTCODE=12129889551212988954.2")
>>    -- Executing Read("IAX2/carp-12321", "act0|ivr/new/nwi-welcome|1")
>>    -- Accepting a maximum of 1 digits.
>>    -- Playing 'ivr/new/nwi-welcome' (language 'en')
>>    -- User entered '0'
>>    -- Executing gotoif("IAX2/carp-12321", "0?carp-nwi|nwi-trans|1")
>>    -- Executing gotoif("IAX2/carp-12321", "1?carp-nwi|nwi-oper|1")
>>    -- Goto (carp-nwi,nwi-oper,1)
>>    -- Executing playback("IAX2/carp-12321", "ivr/nwi-operator")
>>    -- Playing 'ivr/nwi-operator' (language 'en')
>>    -- Executing Queue("IAX2/carp-12321", "0|t")
>>    -- Executing Goto("IAX2/carp-12321", "carp-nwi|nwi-main|3")
>>    -- Goto (carp-nwi,nwi-main,3)
>>    -- Executing Set("IAX2/carp-12321", 
>> "__ACCOUNTCODE=12129889651212988954.2")
>>    -- Executing Read("IAX2/carp-12321", "act0|ivr/new/nwi-welcome|1")
>>    -- Accepting a maximum of 1 digits.
>>    -- Playing 'ivr/new/nwi-welcome' (language 'en')
>>    -- Hungup 'IAX2/carp-1957'
>>  == Spawn extension (pri-inbound, s, 3) exited non-zero on 
>> 'SIP/pri-006ba540'
>>    -- User disconnected
>>
> Nobody has any clue as to what's causing this?
> 

I just checked app_queue.c in 1.2, and the reason this is happening is because 
the queue member that is logged into the queue is marked "Invalid." Because the 
member is invalid, he is not considered to be in a position to answer calls. 
Since he is the only member in the queue, the queue returns with the JOINEMPTY 
queue status.

With regards to why the member is showing up as invalid, I would assume it is 
because the member's interface is set to "9001" instead of something like 
"SIP/9001."

Mark Michelson



More information about the asterisk-users mailing list