Transfers from queue give "invalid extension"

Asterisk 1.8.10.1~dfsg-1ubuntu1

When I try to do a transfer from a call that came in via a queue, I get the error recording “I am sorry, that’s not a valid extension, please try again”. Sequence of events:
dial 809
placed in queue
queue member answers
press # to transfer call (also fails with *)
Press 2 (part of 299, the extension I want to transfer to)
Error message is played

When I dial directly, both of these work fine.

If I remove the gosub entry (subQueueConnected) from the Queue application, it also works fine. (I need that gosub, because there will be some logic later to notify our application server to do some cool stuff.)

queues.conf

[code][general]
autofill=yes
shared_lastcall=yes

StandardQueue
musicclass=default
strategy=rrmemory
joinempty=no
leavewhenempty=yes
ringinuse=no
announce-frequency = 30
min-announce-frequency = 15
announce-holdtime = yes|no|once
announce-position = limit
announce-position-limit = 5
announce-round-seconds = 10
setinterfacevar = yes
setqueueentryvar = yes
setqueuevar = yes

sales[/code]

features.conf

[featuremap] blindxfer => # atxfer => *

extensions.conf

[code][LocalSets]

exten => 809,1,Goto(queues,sales,1)

[queues]
exten =>sales,1,Verbose(2,${CALLERID(all)} entering the sales queue)
same =>n,Queue(sales,t,subQueueConnected)
same =>n,Hangup()

[subQueueConnected]
exten =>s,1,NoOp()
same =>n,Return()
[/code]

Update: if I use the Macro instead of the GoSub, the transfers on the connected call work fine. I guess I’ll use Macro, but why doesn’t the gosub work?