Trunk as Failover Destination for Queue not working

I have a SIP trunk as a failover destination for a queue (extension 5320). Now in a failover event, Asterisk accesses the trunk, but doesn’t send any digits, and therefore the call fails.
“OUTNUM=” is what I get and it should be “OUTNUM=5320”.
Any ideas?
Asterisk 11.9.0, FreePBX 12.0.25

– Executing [[email protected]:39] Queue(“SIP/5313-00000032”, “5320,t,”) in new stack
[2015-01-02 20:15:42] WARNING[26091][C-00000031]: app_queue.c:7085 queue_exec: Unable to join queue ‘5320’
– Executing [[email protected]:40] Macro(“SIP/5313-00000032”, “blkvm-clr,”) in new stack
– Executing [[email protected]:1] Set(“SIP/5313-00000032”, “SHARED(BLKVM,SIP/5313-00000032)=”) in new stack
– Executing [[email protected]:2] Set(“SIP/5313-00000032”, “GOSUB_RETVAL=”) in new stack
– Executing [[email protected]:3] MacroExit(“SIP/5313-00000032”, “”) in new stack
– Executing [[email protected]:41] Gosub(“SIP/5313-00000032”, “sub-record-cancel,s,1()”) in new stack
– Executing [[email protected]:1] Set(“SIP/5313-00000032”, “__REC_POLICY_MODE=”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/5313-00000032”, “1?Return()”) in new stack
– Executing [[email protected]:42] Set(“SIP/5313-00000032”, “__NODEST=”) in new stack
– Executing [[email protected]:43] Set(“SIP/5313-00000032”, “_QUEUE_PRIO=0”) in new stack
– Executing [[email protected]:44] Set(“SIP/5313-00000032”, “QDEST=”) in new stack
– Executing [[email protected]:45] Set(“SIP/5313-00000032”, “VQ_DEST=”) in new stack
– Executing [[email protected]:46] GotoIf(“SIP/5313-00000032”, “1?ext-trunk,21,1:,”) in new stack
– Goto (ext-trunk,21,1)
– Executing [[email protected]:1] Set(“SIP/5313-00000032”, “TDIAL_STRING=SIP/G200AN”) in new stack
– Executing [[email protected]:2] Set(“SIP/5313-00000032”, “DIAL_TRUNK=21”) in new stack
– Executing [[email protected]:3] Goto(“SIP/5313-00000032”, “ext-trunk,tdial,1”) in new stack
– Goto (ext-trunk,tdial,1)
– Executing [[email protected]:1] Set(“SIP/5313-00000032”, “OUTBOUND_GROUP=OUT_21”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/5313-00000032”, “0?nomax”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/5313-00000032”, “0?hangit”) in new stack
– Executing [[email protected]:4] ExecIf(“SIP/5313-00000032”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [[email protected]:5] Set(“SIP/5313-00000032”, “DIAL_NUMBER=”) in new stack
– Executing [[email protected]:6] GosubIf(“SIP/5313-00000032”, “0?sub-flp-21,s,1()”) in new stack
– Executing [[email protected]:7] Set(“SIP/5313-00000032”, “OUTNUM=”) in new stack
– Executing [[email protected]:8] Set(“SIP/5313-00000032”, “DIAL_TRUNK_OPTIONS=Tt”) in new stack
– Executing [[email protected]:9] Dial(“SIP/5313-00000032”, “SIP/G200AN/,300,Tt”) in new stack
== Using SIP VIDEO TOS bits 136
== Using SIP VIDEO CoS mark 6
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/G200AN/
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [[email protected]:10] Set(“SIP/5313-00000032”, “CALLERID(number)=5313”) in new stack
– Executing [[email protected]:11] Set(“SIP/5313-00000032”, “CALLERID(name)=Johann Remote Office”) in new stack
– Executing [[email protected]:12] Hangup(“SIP/5313-00000032”, “”) in new stack
== Spawn extension (ext-trunk, tdial, 12) exited non-zero on ‘SIP/5313-00000032’

Can anyone help with that?

I think you might want to be using a miscellaneous destination instead of a naked trunk.

As @cynjut stated, you need to use a Misc Destination with probably a prefix on the outbound route to be able to send calls through a trunk.

Thanks everyone. That works.
I am still surprised that the trunk doesn’t work as a failover destination cause no digits are sent. Must be a bug.

“A bug”?

I don’t want to sound like I’m making fun of you or anything, because that isn’t my intention. It helps everyone else (well, me anyway) understand how people could misunderstand things, but what were you expecting the “Trunk” option to do?

To be honest, I have no idea what it should (or even could) do. A trunk connection isn’t like dialing a phone or using something like DISA. The more I think about it, I’m not sure why Trunk is even an option on any of these destinations. I can’t think of anything that you could do with it. You can connect to a trunk, but that doesn’t do anything for you.

Having said that, I suppose if you had DAHDI line set up as a stand-alone trunk and hooked that up to an immediate connection on another phone system, you could get something going, but that’s a convoluted route to get to another connection. Maybe you could use it to trigger an alarm?

I don’t know, but now I’m intrigued…

When I set selected “trunk” as a failover destination for my queue, what I was expecting to happen is that Asterisk would send the dialed digits out on the trunk.
E.g., when someone dials the queue extension 5320, and the queue members are not available, these digits 5320 would get sent out on the trunk.
This would have been my intention cause I have another PBX connected on this trunk and the dialed number would ring there.
Something like this would of course not make much sense if it’s a trunk to a provider, etc.

Now this is what I thought the trunk option would accomplish, cause like yourself I wouldn’t know of any other function this would then have. If no digits get sent on the trunk, what would you do with this option?

But maybe I simply misunderstood, it’s no bug at all and meant for a different purpose.

Is that in any way clear what I am trying to do?