Summary:ASTERISK-06122: queue timeout is ignored
Reporter:Folkert van Heusden (flok)Labels:
Date Opened:2006-01-18 09:54:36.000-0600Date Closed:2011-06-07 14:03:27
Versions:Frequency of
Environment:Attachments:( 0) asterisk-debug.log
( 1) asterisk-debug2.log
( 2) log.txt
( 3) voicemail.conf
( 4) voicemail-new.conf
Description:I have a queue to which people are transferred when they dial in. If none of the operators answers the call, the guy dialing in is supposed to be transferred to the voicemailbox. In 1.0.9 this worked fine, in 1.2.1 and 1.2.2 it doesn't.

exten => s,1,Answer()
exten => s,2,Wait(1)
exten => s,3,SetMusicOnHold(default)
exten => s,4,Background(transfer)
exten => s,5,ResponseTimeout,10
exten => s,6,Queue(callqueue|ntTH|||20)
exten => s,7,Background(leavemsg)
exten => s,8,VoiceMail(u0000)
exten => s,9,Hangup()

leavewhenempty = yes
music = default
member => SIP/1000
member => SIP/1001
member => SIP/1002

musiconhold => default
agent => 1000,0000,agent1
agent => 1001,0000,agent2
agent => 1002,0000,agent3
Comments:By: Matt O'Gorman (mogorman) 2006-01-18 09:58:23.000-0600

are you using the timeout option in queues.conf?

By: Folkert van Heusden (flok) 2006-01-18 10:07:02.000-0600

I tried that as well.
So, I tried:
exten => s,6,Queue(callqueue|ntTH|||20)
in extensions.conf

leavewhenempty = yes
music = default
timeout = 20
member => SIP/1000
member => SIP/1001
member => SIP/1002

in queue.conf.

After +/- 25 seconds asterisks drops the connection. So it keeps playing after the 20 seconds and then after +/- 25 it drops it. It DOES display this:
   -- Called SIP/1002
   -- Called SIP/1001
   -- Called SIP/1000
   -- Nobody picked up in 10000 ms
   -- Called SIP/1002
   -- Called SIP/1001
   -- Called SIP/1000
   -- Nobody picked up in 10000 ms
   -- Stopped music on hold on Zap/1-1
   -- Executing BackGround("Zap/1-1", "leavemsg") in new stack
   -- Executing VoiceMail("Zap/1-1", "u0000") in new stack
   -- Executing Hangup("Zap/1-1", "") in new stack

but after "stopped music on hold" the executing background/voicemail/hangup follow immediately effectively hanging up at once.

By: Folkert van Heusden (flok) 2006-01-18 11:34:08.000-0600

yes, but also *without* the timeout in the queues.conf the problem is there.

If a sip-phone of one or more of the agents is "running", the queue never ends(!). If no sip-phones are running, it ends without the voicemail.

   -- Executing Queue("Zap/1-1", "callqueue|ntTH|||20") in new stack
   -- Started music on hold, class 'default', on channel 'Zap/1-1'
   -- Called SIP/1002
   -- Called SIP/1001
   -- Called SIP/1000
   -- Stopped music on hold on Zap/1-1
   -- Executing BackGround("Zap/1-1", "leavemsg") in new stack
   -- Executing VoiceMail("Zap/1-1", "u0000") in new stack
   -- Executing Hangup("Zap/1-1", "") in new stack
 == Spawn extension (bell, s, 9) exited non-zero on 'Zap/1-1'
   -- Hungup 'Zap/1-1'

By: Folkert van Heusden (flok) 2006-01-20 01:29:38.000-0600

This problem is different from 0006111.

By: Kevin P. Fleming (kpfleming) 2006-02-14 13:11:20.000-0600

I don't understand. Your log clearly shows the VoiceMail application being called, but you claim it is not being called. What _exactly_ are the symptoms?

By: Folkert van Heusden (flok) 2006-02-14 13:22:08.000-0600

The exact problem is:
- the user calls me
- asterisk picks up and plays the welcome thing
- then it should start the background music and start calling the phones (all 3 of them) until one picks up
- if none pick up, the user should go to voicemail

All of this worked fine with 1.0.9.
Now with 1.2.4 (and .2) the backgroundmusic starts and never stops; the user never ends up in the voicemailbox.

I have an addition: if one of the phones is switched (for example a laptop with an headset), only the welcome sound is played but the backgroundmusic is NOT played. For that, it is NOT neccessary that a phone application runs on that laptop, being switched on is enough! (maybe because asterisk receives connection refused messages?)

By: Kevin P. Fleming (kpfleming) 2006-02-14 13:27:26.000-0600

Well, your log clearly shows the VoiceMail application being called. I don't know what else to tell you... unless you can show us a log that gives us some clue as to what is happening, we cannot begin to help you.

Are you capturing this log with 'set verbose 10' and 'set debug 10' in effect? If not, we aren't getting enough detail to know what is going on.

By: Kevin P. Fleming (kpfleming) 2006-02-14 13:44:50.000-0600

Please do _NOT_ post long traces in bug notes. It makes it very difficult to read them. Please review the bug posting guidelines before continuing to post notes in this bug, so you can make things easier on all of us.

By: Kevin P. Fleming (kpfleming) 2006-02-14 13:50:08.000-0600

Your trace does not start at the beginning of the call, but clearly it shows Asterisk receiving a "BYE" message from SIP/1002, which results in the call being hung up.

What are SIP/1000, SIP/1001, and SIP/1002 (phones, softphones, other servers, ?) It appears that you placed the call from SIP/1002 and SIP/1002 is also a member of the queue, and SIP/1002 is sending broken SIP signaling and sent BYE for the wrong call.

If you can reproduce this, send a 'sip debug peer SIP/1002' as an _attachment_ so we can see the SIP traffic with this device.

By: Tilghman Lesher (tilghman) 2006-03-06 14:47:00.000-0600

No response from reporter.

By: Folkert van Heusden (flok) 2006-03-06 15:45:28.000-0600

Sorry that it took so long. Ok, I tried the

*CLI> sip debug peer SIP/1002
No such peer 'SIP/1002'

as well as

*CLI> sip debug peer SIP/1000
No such peer 'SIP/1000'

but as you can see Asterisk says it doesn't know them. Rather strange as I can successfully dial out through SIP/1000.
Sip/1000 is a sofphone: it is "SJPhone" running on a Linux laptop.

from sip.conf:
callerid="Folkert van Heusden" <folkert@keetweej.vanheusden.com>

So the calls come in through an "zapata"-device and are supposed to be queued for either 1000, 1001 or 1002.

By: Serge Vecher (serge-v) 2006-03-06 16:06:29.000-0600

flok: it helps to experiment a little. "sip debug peer 1002" will enable debugging for SIP peer 1002.

By: Folkert van Heusden (flok) 2006-03-06 16:17:43.000-0600

Ok, retried it. (Please ignore that was changed to!)

As you can see I aborted the call after 30 seconds. Now the call should've aborted itself and pushed me to the voicemailbox which it didn't.

By: Tilghman Lesher (tilghman) 2006-03-06 16:22:58.000-0600

flok:  please upload your voicemail.conf to the file upload area of this report.

By: Folkert van Heusden (flok) 2006-03-06 16:24:48.000-0600

Here you are.

By: Tilghman Lesher (tilghman) 2006-03-06 16:46:18.000-0600

flok:  Yep, that's the problem.  Please do ONE of the following:

a) Add searchcontexts=yes into the general section of voicemail.conf.
b) Move your 0000 mailbox into the [default] section of voicemail.conf.
c) Change your dialplan to specify Voicemail(u0000@voicemail)

By: Folkert van Heusden (flok) 2006-03-07 13:28:48.000-0600

Nope, didn't work. Tried both suggestions a and b.
Please see attached logs.

By: Tilghman Lesher (tilghman) 2006-03-07 13:34:28.000-0600

flok:  Note the entry right in the top that says:
Mar  7 20:23:38 WARNING[3734]: app_voicemail.c:2384 leave_voicemail: No entry in voicemail config file for '0000'

That means that Asterisk COULD NOT FIND THE MAILBOX in your voicemail.conf.

This is a user error.  No bug.

By: Tilghman Lesher (tilghman) 2006-03-07 13:49:02.000-0600

Did you perhaps forget to do a 'reload app_voicemail.so' after changing the configuration file?

By: Folkert van Heusden (flok) 2006-03-07 14:01:28.000-0600

(re-opening to be able to answer your question)

Yes, I actually completely shut down asterisk and restarted it.

about the missing voicemailbox: I then wonder why things *do* work with the older version (1.0.x)

By: Tilghman Lesher (tilghman) 2006-03-07 14:13:29.000-0600

Please re-upload your voicemail.conf, with one of the above suggested changes.

By: Folkert van Heusden (flok) 2006-03-07 14:29:50.000-0600

here it is

By: Tilghman Lesher (tilghman) 2006-03-11 09:40:33.000-0600

No idea why this isn't working.  Please try the third option listed.

By: Folkert van Heusden (flok) 2006-03-23 14:24:42.000-0600

Third option did not work either I'm afraid. See please the attached logfile.

By: Tilghman Lesher (tilghman) 2006-03-23 18:44:15.000-0600

This logfile doesn't show anything about your reported problem.

By: Tilghman Lesher (tilghman) 2006-03-23 18:48:20.000-0600

Please find me on IRC.  Be prepared to give remote access into this machine, so we can finally get this issue solved and closed out.

By: Folkert van Heusden (flok) 2006-03-24 06:58:39.000-0600

Well, maybe that is part of the problem (the problem being that voicemail is not started after the configured 20 seconds).

By: Folkert van Heusden (flok) 2006-03-24 07:05:48.000-0600

Please close this topic: found the problem. I had to add "timeout = ..." to queue.conf as well.

By: BJ Weschke (bweschke) 2006-03-24 09:08:39.000-0600

closing per original poster's request.