Skip to content

Instantly share code, notes, and snippets.

@ambiorixg12
Created December 19, 2018 03:14
Show Gist options
  • Save ambiorixg12/d868868ad63e3dc14f5e292a47630d21 to your computer and use it in GitHub Desktop.
Save ambiorixg12/d868868ad63e3dc14f5e292a47630d21 to your computer and use it in GitHub Desktop.
Recording context with confirmation
[recording]
exten=>_x.,1,Answer()
same=>n,Set(path=/var/www/html/surf/)
same =>n(2),read(edit,${path}${EXTEN:1},1,,)
same=>n,GotoIf($["${edit}"="5"]?auth)
same=>n,hangup()
same=>n(auth),authenticate(1973)
same=>n(rec),playback(pls-enter-num-message-after-tone)
same=>n,Record(${path}${EXTEN:1}.wav,,,k)
same=>n,playback(${path}${EXTEN:1})
same => n(confirm),read(confirm,press-star-cancel,1,,)
same=>n,GotoIf($["${confirm}"="*"]?rec)
same=>n,Playback(auth-thankyou)
same=>n,hangup()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment