Last active
September 9, 2021 03:24
-
-
Save ambiorixg12/708a255b96b9c9e77949e913e53788d9 to your computer and use it in GitHub Desktop.
survey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [au_survey] | |
| exten=>_.,1,Answer() | |
| same=>n(q1),read(q1,/var/lib/asterisk/sounds/en/Survey_recording_au,1) | |
| ;same => n,GotoIf($[${q1}<0]?q1) | |
| same=>n,GotoIf($[$["${q1}"> "0"] & $["${q1}"<="5"]]?OK) | |
| same=>n,goto(q1) | |
| same=>n(OK),system(mysql --user=root --password='' test -e "INSERT INTO test.survey (surv_id, surv_value, surv_date, callerid,reserved1,reserved2) VALUES (NULL, '${q1}', CURRENT_TIMESTAMP, '${CALLERID(num)}', '', '')") | |
| same=>n(continue),Playback(auth-thankyou) | |
| same=>n,hangup() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment