[RESOLVED] Playing queue status to caller using asterisk 1.8

Hi guys,

I verified that all gsm files are included in my asterisk install:

gives a list containing

queue-callswaiting.gsm vm-starmain.gsm queue-holdtime.gsm vm-tempgreetactive.gsm queue-less-than.gsm vm-tempgreeting2.gsm queue-minute.gsm vm-tempgreeting.gsm queue-minutes.gsm vm-tempremoved.gsm queue-periodic-announce.gsm vm-then-pound.gsm queue-quantity1.gsm vm-theperson.gsm queue-quantity2.gsm vm-tmpexists.gsm queue-reporthold.gsm vm-tocallback.gsm queue-seconds.gsm vm-tocallnum.gsm queue-thankyou.gsm vm-tocancel.gsm queue-thereare.gsm vm-tocancelmsg.gsm queue-youarenext.gsm

queues.conf says

announce-frequency = 90
min-announce-frequency = 15
announce-holdtime = yes
announce-round-seconds = 30

While dialing to a queue, console shows

    -- Started music on hold, class 'manual', on channel 'SIP/0001-00000014'
    -- Stopped music on hold on SIP/0001-00000014
    -- <SIP/0001-00000014> Playing 'queue-youarenext.gsm' (language 'en')
    -- Told SIP/0001-00000014 in support_FR their queue position (which was 1)
    -- <SIP/0001-00000014> Playing 'queue-thankyou.gsm' (language 'en')
    -- Started music on hold, class 'manual', on channel 'SIP/0001-00000014'

At the hangup event, console shows:

 -- Stopped music on hold on SIP/0001-00000014
  == Spawn extension (extensions, 12, 5) exited non-zero on 'SIP/0001-00000014'

So “on the paper”, this is the intended behavior and Asterisk works “as it should”

However, the caller cannot hear any MOH music nor any announcement. While I could understand the MOH music problem as I am trying to play music from internet radio station server1.chilltrax.com:9000/listen.pls , the announcement problem seems more concerning.

Little precision: playing audio in IVR using google TTS seems to be working. For example

same => n,agi(googletts.agi,"For english, dial 2.",en,any,1.1)

At your disposal for any tests if you can give me any guidance.


By default, they will be sent as early media. If early media is not possible, e.g. someone is paying for the call and the network operator doesn’t want to provide a free audio path, you will need to answer the call fully before calling queue.

A precision that can save our precious time: all queues are available through extensions
X1 for sales
X2 for IT
where X is the language target.

When I dial a queue extension that does not exist like 25, the console shows:

  == Using SIP RTP CoS mark 5
    -- Executing [25@extensions:1] Verbose("SIP/0001-00000015", "2,Call queue as configured in the QUEUE_25 global variable") in new stack
  == Call queue as configured in the QUEUE_25 global variable
    -- Executing [25@extensions:2] Set("SIP/0001-00000015", "thisQueue=") in new stack
    -- Executing [25@extensions:3] GotoIf("SIP/0001-00000015", "1?invalid_queue,1") in new stack
    -- Goto (extensions,invalid_queue,1)
    -- Executing [invalid_queue@extensions:1] Verbose("SIP/0001-00000015", "2,Attempted to enter invalid queue") in new stack
  == Attempted to enter invalid queue
    -- Executing [invalid_queue@extensions:2] Playback("SIP/0001-00000015", "silence/1&invalid") in new stack
    -- <SIP/0001-00000015> Playing 'silence/1.gsm' (language 'en')
    -- <SIP/0001-00000015> Playing 'invalid.gsm' (language 'en')
    -- Executing [invalid_queue@extensions:3] Hangup("SIP/0001-00000015", "") in new stack
  == Spawn extension (extensions, invalid_queue, 3) exited non-zero on 'SIP/0001-00000015'

which is the expected behavior.

More important is that in that specific case, the message does play to the caller:
“I am sorry, that’s not a valid extension.”

So we can already forget about any rendering / codec problem I believe.

For my peace of mind, I did a ls -l to check that the gsm files do contain something for all of them.

-rw-r--r-- 1 root root   3696 Apr 25  2011 queue-callswaiting.gsm
-rw-r--r-- 1 root root   4158 Apr 25  2011 queue-holdtime.gsm
-rw-r--r-- 1 root root   1650 Apr 25  2011 queue-less-than.gsm
-rw-r--r-- 1 root root   1485 Apr 25  2011 queue-minute.gsm
-rw-r--r-- 1 root root   1254 Apr 25  2011 queue-minutes.gsm
-rw-r--r-- 1 root root  12573 Apr 25  2011 queue-periodic-announce.gsm
-rw-r--r-- 1 root root   3135 Apr 25  2011 queue-quantity1.gsm
-rw-r--r-- 1 root root   4422 Apr 25  2011 queue-quantity2.gsm
-rw-r--r-- 1 root root   1650 Apr 25  2011 queue-reporthold.gsm
-rw-r--r-- 1 root root   1452 Apr 25  2011 queue-seconds.gsm
-rw-r--r-- 1 root root   2640 Apr 25  2011 queue-thankyou.gsm
-rw-r--r-- 1 root root   3135 Apr 25  2011 queue-thereare.gsm
-rw-r--r-- 1 root root   8745 Apr 25  2011 queue-youarenext.gsm

They do /:

Hi David55,

Thanks for your very fast reaction.

I believe we can eliminate the early media hypothesis as well according to my last post…?

Thanks anyway. If you have some other idea…

Playback answers by default and you didn’t use the option that inhibits that.

Is that option to be defined in the Queue() function?

I cannot see any info about it in the documentation

Also Playback() function is not called in my Dialplan:

Set() Gotoif() Queue() Hangup()

Maybe I misunderstand your advice because of my lack of VoIP vocabulary?

Keep me posted (:

Your trace shows that Playback is called in your dialplan:

When you call Queue on an unanswered call, the announcements and music on hold are sent as early media. When you call Playback on an unanswered call, it first answers the call, unless you have specified an option on the Playback call to stop that. As such, the fact that Playback works, says nothing about what happens in the early media context in which Queue is running.

You must call the Answer application (or something that does implicitly answer, like Playback), before calling Queue, if you don’t want it to operate in an early media context.

I doubt of this explanation as the bit you are citing:

-- Executing [invalid_queue@extensions:2] Playback("SIP/0001-00000015", "silence/1&invalid") in new stack
    -- <SIP/0001-00000015> Playing 'silence/1.gsm' (language 'en')
    -- <SIP/0001-00000015> Playing 'invalid.gsm' (language 'en')

Is actually working and playing fine:

[quote]More important is that in that specific case, the message does play to the caller:
“I am sorry, that’s not a valid extension.”[/quote]

The problem only occurs while reaching a “right” queue.

Any other idea?

I expect the Playback to work fine, for the reasons I have already stated twice.

OK, so in a newbie language, I would translate


same => n,Answer() <- This bit was missing same => n,Queue(${thisQueue})

Tested. Working.

However David, I am just glad you drove me once again to the right path (: