Today’s good deed
[send-callback-email]
exten => s,1,Noop(Entering custom dialplan in extensions_custom.conf to send an email)
exten => s,n,Read(method,custom/callback-email-options,1,,2,5)
exten => s,n,Gotoif($["${method}" = "2"]?changenum)
exten => s,n(send),System(echo "Hello, \n\nNumber to callback: ${IF($["${method}" = "2"]?${newnum}:${CALLERID(num)})}" | mail -s "Request for callback ${UNIQUEID}" -r "My PBX <[email protected]>" [email protected])
exten => s,n,Playback(custom/thank-you-goodbye)
exten => s,n,Hangup()
exten => s,n(changenum),Read(newnum,custom/pls-enter-10-digit,10,,2,5)
exten => s,n,Playbck(you-entered)
exten => s,n,SayDigits(${newnum})
exten => s,n,Read(correct,custom/if-this-is-correct,1,,2,5)
exten => s,n,Gotoif($["${correct}" = "1"]?send:changenum)
Record the following filenames and upload it to System Recordings:
callback-email-options = To receive a callback on the number you are calling from, press 1. To receive a callback on a different number, press 2.
thank-you-goodbye = Thanks, your request has been recorded. You should receive a callback within…
pls-enter-10-digit = Please enter a 10 digit phone number where you would like to receive a callback on.
if-this-is-correct = If this is the correct number, press 1. To change it press 2.
Then create a custom destination that targets: send-callback-email,s,1
I did not test this, but this should be a good start