Asterisk 1.6 Realtime Macro Transfer Issues

I am experiencing an unusual problem with Asterisk 1.6… The callee cannot transfer a call when their extension is configured in realtime.

I have the following in the extensions table

Context,Exten,Priority,App,Appdata "372200","5104",1,"Macro","xtn,${EXTEN}"

And the following Macro in extensions.conf;

[macro-xtn] ; Syntax: Macro(xtn,extension,optionalcallerid) exten => s,1,GotoIf($["${ARG2}" = ""]?3:2) exten => s,2,Set(CALLERID(number)=${ARG2}) exten => s,3,Dial(SIP/${MACRO_CONTEXT}${ARG1},20) exten => s,4,VoiceMail(${ARG1}@${MACRO_CONTEXT},u)

Inbound calls to extension 5104 work fine, but 5104 cannot transfer the call elsewhere.

If I take the extension out of the realtime DB and put it in the extensions.conf as;

It works as expected :confused:

Nothing helpful on the asterisk command line even with verbose debugging… I’ve put a NoOp line in the Macro to see if it’s being called at all and it’s not. All I get is;

== Spawn extension (372200, ZZZZ, 1) exited non-zero on 'IAX2/PSTN-7132' in macro 'xtn'
Where ZZZZ is the extension / number I tried to call.