Survey after Hangup

If you really don’t want to purchase the commercial module and you are ready to get your hands dirty then you have two options.

1 Call the Queue with the c option

exten => s,n,Queue(QueueNum,c)

See more: https://wiki.asterisk.org/wiki/display/AST/Building+Queues
But this way you are loosing control of all changes you make in the GUI.

2 Call the queue with a local channel and add the dial option g which will continue the dialplan once the callee channel hangs up

[pre-queue]
exten => s,1,Noop()
exten => s,n,Dial(local/QueueNum@context,,g)
exten => s,n,Goto(your-survey,s,1)

See more: https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Dial

Finally, create a custom destination which points to pre-queue,s,1 and then point your IVR or whatever is currently pointed to the queue, to this custom destination

Note: I haven’t tested both of these, but the second one makes more sense to me.

EDIT: I corrected the second method, and tested - it works.

3 Likes