简体   繁体   中英

Asterisk queue context not working

I'm implementing a callback service for Asterisk queues. The idea is to place all incoming calls on a queue. A message is played back, letting callers know that they can either wait in line until an agent becomes available or they can press '2', hangup, and have the agent call them back as soon as possible.

I defined a context for the inbound queue in queues.conf as such:

[qIngresoCC]
...
context=qIngresoCC-callback
...

and defined the corresponding entries in extensions.conf :

[qIngresoCC-callback]
exten = > 2,1,NoOp("El cliente ${CALLERID(all)} solicita CallBack")
  same => n,AGI(add_channel_to_callback.php)
  same => n,Playback(goodbye_for_the_best)
  same => n,Hangup()

An incoming call is correctly sent to the queue, the announcements are played back, but when pressing '2', the call is not sent to the qIngresoCC-callback context.

DTMF logging is enabled, and I can see Asterisk receiving it, but it simply won't jump to the specified context.

[Jul  4 10:45:47] DTMF[84833][C-0000014d]: channel.c:4017 __ast_read: DTMF end '2' received on SIP/axtel-rappi-0000027b, duration 0 ms
[Jul  4 10:45:47] DTMF[84833][C-0000014d]: channel.c:4076 __ast_read: DTMF end accepted without begin '2' on SIP/axtel-rappi-0000027b
[Jul  4 10:45:47] DTMF[84833][C-0000014d]: channel.c:4087 __ast_read: DTMF end passthrough '2' on SIP/axtel-rappi-0000027b

What am I missing?

UPDATE I forgot to specify: I'm using Asterisk 13.14.0 compiled from source (by Portage) on Gentoo, with support (USE flags) for caps, curl, http, iconv, odbc, pjproject, postgres, samples, srtp .

I'm not using freepbx nor any other GUI. Everything is configured manually through the .conf files.

The only tuning of the source I did was changing channel.h from #define AST_MAX_ACCOUNT_CODE 20 to #define AST_MAX_ACCOUNT_CODE 256 to be able to use longer account codes.

The digit pressed must match the extension level in the context: for example if you have context=queue_out in your queues.conf and let's say your recording says "Press 5 to leave a voicemail (periodic announcement): extensions.conf would have the following

[queue_out]
exten => 5,1,Voicemail(123@default)
exten => 5,n,Hangup()

I had the same problem btw.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM