The sample collects a callback number and transfers the contact to a callback queue. It also shows how callers who keep waiting can receive a later callback offer.
AWS says this particular sample is included in older instances. For newer instances, see the interruptible queue and queue-configuration samples linked by AWS.