I need an audio to be played after the call has been answered and then return to the call normally.
The first part of playing the audio after answering is OK, using Dial with Option G.
But, to return the call and continue, I am unable to do so. I used the Return() command, but without success.
Dialplan:
[inboundcall]
exten => _5511X.,1,Progress()
same => n,NoOp(Inbound Call PSTN)
same => n,Dial(PJSIP/${EXTEN}@destination,G(sub-play^s^1))
same => n,Verbose(Hangup Cause: ${HANGUPCAUSE})
same => n,Hangup()
same => n,NoOp(Fim ligação)
[sub-play]
exten => s,1,NoOP(Message)
same => n,Playback(/var/lib/asterisk/sounds/announce)
same => n,Return()
For the source and destination to listen, it should look something like:
[inboundcall]
exten => _5511X.,1,Progress()
same => n,NoOp(Inbound Call PSTN)
same => n,Dial(PJSIP/${EXTEN}@destination,A(/var/lib/asterisk/sounds/announce:/var/lib/asterisk/sounds/announce))
same => n,Verbose(Hangup Cause: ${HANGUPCAUSE})
same => n,Hangup()
same => n,NoOp(Fim ligação)