App Dial Option G

Hi guys.

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()

Why can’t you use the A option?

Do you want to playback on both channels (still possible with A)?

G is goto, so doesn’t push a return address.

To continue after G, you would need to use the Bridge application, but note that it handles the end of the call differently from Dial.

Hi David.

Thanks for your help.

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)

It’s possible?

Try it, but with the right number of parameters.

The options are the third, not the second parameter. That error is also in your original version.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.