Endless loop while after calling queue().join!()

594 views
Skip to first unread message

Eduardo D

unread,
Aug 17, 2010, 7:58:38 PM8/17/10
to Adhearsion
I created queue 1000 and added the extension 111 to it. If I place a
call from another extension to queue 1000, extension 111 rings.

If I run adhearsion and make it join queue 1000, Asterisk enters in an
endless loop. A restart is then required.

I created a very simple dialplan to test this. Any help is greatly
appreciated.

extensions.conf (only my changes)
=========
[adhearsion]
exten => s,1,AGI(agi://127.0.0.1)
exten => _.,n,Hangup

custom destination (my inbound route points to this destination)
=========
adhearsion,s,1

dialplan.rb
=========
adhearsion {
test_queue
}

components/test/test.rb
=========

methods_for :dialplan do
def test_queue
TestQueue.new(self).start
end
end


class TestQueue

def initialize(call)
@call = call
end

def start
@call.queue("1000").join!()
end

end

asterisk log (following lines repetead ad nauseum)
==========
-- Goto (from-queue,111,1)art now
-- Executing [111@from-queue:1] Set("Local/111@from-queue-e6af,2",
"QAGENT=111") in new stack
-- Executing [111@from-queue:2] Goto("Local/111@from-queue-e6af,
2", "|1") in new stack
-- Goto (from-queue,111,1)art now
-- Executing [111@from-queue:1] Set("Local/111@from-queue-e6af,2",
"QAGENT=111") in new stack
-- Executing [111@from-queue:2] Goto("Local/111@from-queue-e6af,
2", "|1") in new stack
-- Goto (from-queue,111,1)art now
-- Executing [111@from-queue:1] Set("Local/111@from-queue-e6af,2",
"QAGENT=111") in new stack
-- Executing [111@from-queue:2] Goto("Local/111@from-queue-e6af,
2", "|1") in new stack
-- Goto (from-queue,111,1)art now
-- Executing [111@from-queue:1] Set("Local/111@from-queue-e6af,2",
"QAGENT=111") in new stack
-- Executing [111@from-queue:2] Goto("Local/111@from-queue-e6af,
2", "|1") in new stack
-- Goto (from-queue,111,1)art now
-- Executing [111@from-queue:1] Set("Local/111@from-queue-e6af,2",
"QAGENT=111") in new stack
-- Executing [111@from-queue:2] Goto("Local/111@from-queue-e6af,
2", "|1") in new stack
-- Goto (from-queue,111,1)art now
-- Executing [111@from-queue:1] Set("Local/111@from-queue-e6af,2",
"QAGENT=111") i


--
Eduardo

Ben Klang

unread,
Aug 17, 2010, 8:20:40 PM8/17/10
to adhea...@googlegroups.com
It would be helpful if you could post two more pieces of information:

1) The conents of queues.conf

2) Adhearsion's output with loglevel set to :debug

/BAK/

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To post to this group, send email to adhea...@googlegroups.com.
To unsubscribe from this group, send email to adhearsion+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adhearsion?hl=en.



Ben Klang

unread,
Aug 17, 2010, 8:55:36 PM8/17/10
to adhea...@googlegroups.com
For the record:

Eduardo and I discussed this issue in IRC. The problem was that FreePBX makes certain assumptions about how callers would enter the queue. In his case the infinite loop was caused by this code in extensions.conf:

from-queue]
include => from-queue-custom
exten => 1000,1,Goto(from-queue-exten-only,${QAGENT},1)
exten => _.,1,Set(QAGENT=${EXTEN})
exten => _.,n,Goto(${NODEST},1)
; end of [from-queue]


FreePBX was setting the variable __NODEST on the incoming channel which was propagated to the called channel. The solution/hack was to set the same variable in his component before calling queue("1000").join!

/BAK/

Eduardo Dominguez

unread,
Aug 17, 2010, 9:05:25 PM8/17/10
to adhea...@googlegroups.com
Ben,

thanks for your help.

--
Eduardo

Reply all
Reply to author
Forward
0 new messages