Need help on setting up queues

Asterisk 1.8.15
FreePBX 2.10.1.9
Outside PSTN lines connect via SIP with Grandstream GXW410x FXO gateways

In my thread “Advice on pro bono project to integrate Incident Command System”, where individual positions in the ICS organization need to have fixed extension numbers that dynamically get forwarded to whomever occupies that position at any moment in time, someone suggested I look at using queues.

In theory it looks like queues will do what I need but after about a day and a half of research and reading everything I can find and pure wild guesswork and trial and error, I can not get queues to even begin to work.

To set up the queue, I go to Applications->Queues and get the Add Queue form. Queue Number is 401, and Queue Name is “Incident 1 IC”. Everything else is left at its defaults except Fail Over Destination which is set to a (known-working) test extension here.

In Settings->Advanced Settings under Queues Module:

Set Agent Name in CDR dstchannel? = False
Use MixMonitor for Recordings? = True
Hide Queue No Answer Option? = True
Asterisk Queues Patch 15168 Installed? = False
Generate queuenum*/** Login/off Codes? = True

Those were all installation defaults and have not been touched.

I pick up an extension other than my Fail Over Destination and dial 401. I would expect something to happen… at the least I would expect the call to be sent to the Fail Over Destination and ring there. Instead I get “Your call cannot be completed as dialed”.

I pick up another extension (not Fail Over Destination) and dial 401* expecting to log in as an agent. Again I get “Your call cannot be completed as dialed”.

I have followed TO THE LETTER everything I can find on the net on this, which isn’t much. Obviously I’m neglecting something vital but there is no indication what.

Really appreciate any pointers, including pointers to documentation that has to exist somewhere on this… thanks…

Good morning, Scott.

That’s actually another issue. I’m far from convinced that logging is set up anywhere near correctly.

Here is all I get in the “full” log from the time I dial the queue until the time the “Your call cannot be completed…” message is complete and I hang up:

[2013-04-23 11:04:56] VERBOSE[7784] asterisk.c: – Remote UNIX connection
[2013-04-23 11:05:17] VERBOSE[7801] netsock2.c: == Using SIP RTP TOS bits 184
[2013-04-23 11:05:17] VERBOSE[7801] netsock2.c: == Using SIP RTP CoS mark 5
[2013-04-23 11:05:17] VERBOSE[28459] pbx.c: – Executing [401@from-internal:1] ResetCDR(“SIP/755-000000d3”, “”) in new stack
[2013-04-23 11:05:17] VERBOSE[28459] pbx.c: – Executing [401@from-internal:2] NoCDR(“SIP/755-000000d3”, “”) in new stack
[2013-04-23 11:05:17] VERBOSE[28459] pbx.c: – Executing [401@from-internal:3] Progress(“SIP/755-000000d3”, “”) in new stack
[2013-04-23 11:05:17] VERBOSE[28459] pbx.c: – Executing [401@from-internal:4] Wait(“SIP/755-000000d3”, “1”) in new stack
[2013-04-23 11:05:19] VERBOSE[28459] pbx.c: – Executing [401@from-internal:5] Progress(“SIP/755-000000d3”, “”) in new stack
[2013-04-23 11:05:19] VERBOSE[28459] pbx.c: – Executing [401@from-internal:6] Playback(“SIP/755-000000d3”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack
[2013-04-23 11:05:19] VERBOSE[28459] file.c: – <SIP/755-000000d3> Playing ‘silence/1.ulaw’ (language ‘en’)
[2013-04-23 11:05:20] VERBOSE[28459] file.c: – <SIP/755-000000d3> Playing ‘cannot-complete-as-dialed.gsm’ (language ‘en’)
[2013-04-23 11:05:22] VERBOSE[28459] file.c: – <SIP/755-000000d3> Playing ‘check-number-dial-again.gsm’ (language ‘en’)
[2013-04-23 11:05:23] VERBOSE[28459] pbx.c: == Spawn extension (from-internal, 401, 6) exited non-zero on ‘SIP/755-000000d3’
[2013-04-23 11:05:23] VERBOSE[28459] pbx.c: – Executing [h@from-internal:1] Hangup(“SIP/755-000000d3”, “”) in new stack
[2013-04-23 11:05:23] VERBOSE[28459] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/755-000000d3’
[2013-04-23 11:05:49] VERBOSE[28425] asterisk.c: – Remote UNIX connection disconnected

I get about the same thing when running asterisk -r.

Nothing shows up in freepbx_dbug, freepbx_debug, or freepbx.log.

Regarding “Sounds like you don’t have the pattern 4xx or 4xx* in your phones dial plan”, I’m not sure which dial plan you mean, the one internal to the phone instrument or some other dial plan? Queues are supposed to be accessible by dialing numbers that look like extension numbers, right? My extensions are all 3-digit numbers. 100-399 are extensions, 400-499 are reserved for queues, 500-799 are more extensions, 800-809 reserved for teleconferences, 810-849 are ring groups, and 850-899 are more extensions.

All of this works correctly except the queues. I dial an extension, a ring group, a teleconference, they all go exactly where they are supposed to go and do exactly what they are supposed to do. Dial a queue and I get “Your call cannot be completed as dialed”. The queue has three static agents set up… I’m no longer even trying to do the 401* login yet; I set up static agents hoping to get that working first and then move on to getting XXX* logins working.

The phones are mostly Grandstream GXP140x with one GXP2100 and one HT703 ATA, and a few X-Lite softphones. The internal dial plans for all of those are out-of-the-box defaults and were not touched. I have tried dialing into the queue with one GXP2100, one HT703 ATA, and one X-Lite instance on Win7, and the result is the same for all.

Wish I could be more informative regarding the logging but as I said I can not find much useful information in the logs the way they were (apparently) set up at installation, or else I’m just looking in all the wrong places.

Eric

Need log information to help you. Sounds like you don’t have the pattern 4xx or 4xx* in your phones dial plan.

What digits are Asterisk receiving and what does the log show?

It turns out the default dial plans in those Grandstream phones do NOT allow e.g. 401* to log in to a queue. Added that to my test phones, but that doesn’t fix the problem of normal callers dialing in to 401 (without the “*”) and getting “Your call cannot be completed as dialed”.

Father, forgive me, for I have sinned. :frowning:

My sin was to hand-edit one of those files in /etc/asterisk with the header that warns against hand-editing it, in this case extensions_additional.conf. It was to test something, and when done I moved extensions_additional.conf~ back to extensions_additional.conf to restore things to the way they were, or so I thought.

Of course I did this as the superuser and not the asterisk user, another mortal *nix sin (although I’m not sure what else to do since there isn’t really an “asterisk user” that can log in)… so when I moved extensions_additional.conf~ back to extensions_additional.conf, it kept its root ownership. So, any changes that FreePBX tried to make to that file then and forevermore failed because of file ownership.

Strange that I got no warnings about that when using FreePBX to update things, no warnings even in the logfiles… but still, I should have known better.

Fixed the file ownerships and now at least I can call the queue and get expected things, so far at least.

Sorry about that, and thanks to Scott for trying and to the rest of you for reading and thinking about it… :slight_smile:

Eric

You can login as user asterisk using sudo:-

sudo -u asterisk /bin/bash

asterisk’ home directory is /var/lib/asterisk. You can do anything in that shell that asterisk is allowed.

There is no real “super-user” in linux, su really means “substitute user”, but in /etc/passwd sterisk has /sbin/login as it’s shell, this is quite restrictive.

root has access to everything and should be used with caution and awareness as you found out :-). Usually amportal chown run by root will fix your wayward permissions.

Laughing, just send Dicko beer.

Thanks, Dicko. Actually in the AsteriskNOW/FreePBX distro the asterisk user has /sbin/nologin as its shell, which is even more restrictive. :slight_smile:

It’s enough to edit files in /etc/asterisk, though, so that’s all I need.

When I said “superuser” I meant the root user. Is there a difference?

Eric

Hehe, yes I also noticed my typo after submitting it, but I can’t edit my posts, so it will have to remain like that. :-). As a concept many consider root to be the super-user, just semantics. apropos root and apropos asterisk tell you all about themselves, but apropos “super-user” returns my personal feelings.