[asterisk-users] Jumping inside a macro with AEL
Leandro Dardini
ldardini at gmail.com
Sun May 20 10:14:12 CDT 2012
Hello,
I am not able to jump to a label from inside a macro. The goto is made
inside a catch while the label is in the body of the macro:
macro recordMessage() {
Answer();
recordagain:
Playback(after-the-tone);
Playback(say-temp-msg-prs-pound);
record(/tmp/${UNIQUEID}.wav);
earagain:
Playback(/tmp/${UNIQUEID});
Background(press-1);
Background(to-hear-msg-again);
Background(press-2);
Background(to-rerecord-yr-message);
Background(press-pound-save-changes);
WaitExten(15);
catch 1 {
goto earagain;
};
catch 2 {
goto recordagain;
};
catch # {
AGI(uploadMedia.php,/tmp/${UNIQUEID}.wav,wav,${TENANTID});
Playback(your-msg-has-been-saved);
};
};
The "goto earagain" fails because the label is searched inside the 1
extension.
How can I jump correctly to the label?
Leandro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120520/652d3494/attachment.htm>
More information about the asterisk-users
mailing list