Spaces in expressions - bug in macro-exten-vm FIXED now

In extensions.conf, I’ve found some strange behaviour.

In [macro-exten-vm] there’s a test to set RT to the RINGTIMER value:

exten => s,n,Set(RT=${IF($[$["${VMBOX}"!=“novm”] | $[“foo${CFUEXT}”!=“foo”]]?${RINGTIMER}:"")})

On my machine with the default FreePBX file, there is NO space between the ‘IF’ and the ‘(’, RT gets set to “”. This causes major problems for a few reasons I’m not interested in at the moment.

If however, the IF has a following space, RT is set to 0 and the macro works, well at least doesn’t call the extension, ring it and go to voicemail all at the same time!

Does anyone know why this would occur?

Second, and secondary question,
Despite ${VMBOX} having a value that is not “novm”, the line of code NEVER sets RT to ${RINGTIMER}. I thought setting this when a voicemail number was available was the whole point of the line.

The cause of all my problems was having 2 [globals] sections.
I’d created one in extensions.conf to set up an FWD account, and of course the other main one is in extensions_custom.conf. This latter one was being missed so RINGTIMER etc were not defined.

The behaviour of the IF statement above is now clear (if weird). All variables {RINGTIMER} etc. must be at least declared if you want the IF/ternary operator to work clearly. If something in your statement is not declared, well, the syntax does something odd, even if it is possibly logical (I don’t know enough about the syntax to really say).