Asterisk 22_ G option in Dialplan doesn't work with Tt options

I am using Asterisk 22.

same => n,Dial(PJSIP/${EXTEN},20,T,G(conference-join^s^1)) ; Proceed to conference-join on answer

The above dial plan doesn’t take to the context [conference-join] but if T option is removed G option is successfully executed i.e. [conference-join] context is invoked.

The idea is to enable blind transfer during conference call

Remove the comma between T and G

tootai has correctly diagnosed the basic problem, however, T was never going to work, as the Dial application will have lost control before any transfer could be started. You need to consider what you were trying to achieve with T, and probably conclude that the T, as well as the comma, should be removed, to avoid confusing anyone trying to maintain this, in future.

Thanks tootai for your feedback.

same => n,Dial(PJSIP/${EXTEN},20,tG(conference-join^s^1))

With t option I am trying that the callee can blindly transfer the call, to say extension 5003 by pressing #15003 and attended transfer via *25003

G is actioned before the t can take effect, so the t will do nothing.

If you want to retain control of the call, you need to use a local channel, with the /n option (in the dial string; it is not a Dial option), as the destination.

G(context^exten^priority) - If the call is answered, transfer the calling party to the specified priority and the called party to the specified priority plus one.
NOTE: You cannot use any additional action post answer options in conjunction with this option.

t is a post answer option.

Here is the dialplan

[from-internal]
; Regular call setup between caller and callee
exten => _5XXX,1,NoOp(Setting up call from ${CALLERID(num)} to ${EXTEN})
same => n,GoSub(blacklist-check,s,1(${CALLERID(num)})) ; Check if the caller is blacklisted
same => n,Set(CONFROOM=${RAND(1000,9999)}) ; Generate a unique conference room ID
same => n,Set(__CALLER_CONFROOM=${CONFROOM}) ; Pass CONFROOM to caller channel
same => n,Set(__CALLEE_CONFROOM=${CONFROOM}) ; Pass CONFROOM to callee channel
same => n,Set(__DIALED_EXT=${EXTEN}) ; Pass dialed extension to both channels
same => n,Set(__DYNAMIC_FEATURES=join_conference) ; Enable the feature code to join the conference
same => n,Dial(PJSIP/${EXTEN},20,tT) ; Regular call between caller and callee
same => n,Hangup()

[conference-setup]
exten => s,1,NoOp(Moving parties to conference room ${CALLER_CONFROOM})
same => n,Set(CONFROOM=${CALLER_CONFROOM}) ; Use the predefined conference room
same => n,GotoIf($[“${CONFROOM}” = “”]?error) ; Ensure CONFROOM is set
same => n,GotoIf($[“${GLOBAL(RECORD_${CONFROOM})}” = “1”]?skip_recording)
same => n,Set(GLOBAL(RECORD_${CONFROOM})=1) ; Mark recording as started
same => n,Set(CONF_FILE=conference-${CALLERID(num)}-to-${DIALED_EXT}-room-${CONFROOM}-${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}.wav)
same => n,MixMonitor(${CONF_FILE},b) ; Start recording
same => n(skip_recording),ConfBridge(${CONFROOM},default_bridge,default_user,conference_menu)
same => n,Return()
exten => s,n(error),NoOp(Error: CONFROOM is not set)
same => n,Hangup()

[add-participant]
exten => s,1,NoOp(Adding participant to conference room ${CONFROOM})
same => n,Read(ADD_EXTEN,please-enter-the-extension) ; Prompt for extension
same => n,GotoIf($[“${ADD_EXTEN}”=“”]?end)
same => n,Dial(PJSIP/${ADD_EXTEN},20)
same => n,GotoIf($[“${DIALSTATUS}”=“ANSWER”]?add_to_conference)
same => n,Playback(vm-nobodyavail) ; Notify if no answer
same => n(end),Return()
exten => s,n(add_to_conference),Set(CONFROOM=${CONFROOM})
same => n,ConfBridge(${CONFROOM},default_bridge,default_user,conference_menu)
same => n,Return()

/etc/asterisk/features.conf is configured as below

[applicationmap]
join_conference => *3,both,Gosub(conference-setup,s,1)

When *3 is pressed, core show channels in asterisk cli shows that caller goes to the conference room but callee stays in Dial Application
coreshowchannels

I rather doubt that that is a supported use of feature codes; I don’t think Dial is intended to be that recursive.