Goto previous question, when press *


I have 2 announcemenet, which is to ask for first name and last name. I am using Playback for announcement and Record for recording name. If i am in 2nd annoucment and if i want to goto the previous question, when pressing *, how do we handle it.

exten => s,n(getfirstname),Playback(${ANOUNCEMENT_FN})
exten => s,n,Record(${RECORDINGS}/firstname:wav,0,20)

exten => s,n(getlastname),Playback(${ANOUNCEMENT_LN})
exten => s,n,Record(${RECORDINGS}/lastname:wav,0,20)

If i spelled my first name as wrong and if i am in 2nd question, I want to go the first question again, while pressing *. It is possible, when we are getting the input as Read like phone number, choices etc. but when the recording, how do we do that.

Please help me regarding this.

Thank You!

Ismail KHan A

Well it might be a bit of a hack but couldn’t you use Background for the message, and WaitExten to try to catch the * command? You would need to set the timeout on WaitExten to the length of the announcement.

Modify record_exec in apps/app_record.c, somewhere around the lines:

} else if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == terminator)) { ast_frfree(f); break; }

and use pbx_builtin_setvar_helper to set a channel variable.

This feature submission looks like it would provide the capability you want.