[SOLVED] How do I "return" from a macro?


#1

Never mind. I had a stupid attack.

I have this macro, which I will build upon later. For now it just checks if it is the month of December and sets the music-on-hold context to Christmas music otherwise the default moh. I want to use this in a lot of places in my whole dialplan and instead of retypeing the same four lines, I thought a macro would be cool. Except that program flow dies at line 5. It does not return to the line that called it.

[macro-setmohtype]
exten => s,1,GotoIf(${DATETIME:2:2}=12?2:4)
exten => s,2,SetMusicOnHold(Christmas)
exten => s,3,Goto(5)
exten => s,4,SetMusicOnHold(default)
exten => s,5,NoOp