ChanIsAvail returning unavailable for registered SIP device

We have a SIP device (snom 300) that is registered successfully with asterisk 1.4.25 (sip show peers shows the device). We are running freepbx and try to call the extension associated with the device and the call goes through. When we try to intercom, the call returns busy.

FreePBX uses the following dialplan for intercom. The ChanIsAvail is returning the channel isn’t available when it clearly is (calls can be routed there and it is registered in sip show peers).

The problem does not impact ALL devices. Re-registering the device and/or rebooting it has no impact on the problem.

Any ideas?

Dialplan snippet:

[ext-intercom]
include => ext-intercom-custom
exten => _7.,1,Macro(user-callerid,)
exten => _7.,n,Set(dialnumber=${EXTEN:1})
exten => _7.,n,GotoIf($["${DB(AMPUSER/${AMPUSER}/intercom/block)}" = “blocked”]?end)
exten => _7.,n,GotoIf($["${DB(DND/${dialnumber})}" = “YES”]?end)
exten => _7.,n,GotoIf($["${DB(AMPUSER/${dialnumber}/intercom/${AMPUSER})}" = “allow” ]?allow)
exten => _7.,n,GotoIf($["${DB(AMPUSER/${dialnumber}/intercom/${AMPUSER})}" = “deny” ]?nointercom)
exten => _7.,n,GotoIf($["${DB(AMPUSER/${dialnumber}/intercom)}" = “disabled” ]?nointercom)
exten => _7.,n(allow),Set(DEVICES=${DB(AMPUSER/${dialnumber}/device)})
exten => _7.,n,GotoIf($["${DEVICES}" = “” ]?end)
exten => _7.,n,Set(LOOPCNT=${FIELDQTY(DEVICES,&)})
exten => _7.,n,GotoIf($[${LOOPCNT} > 1 ]?pagemode)
exten => _7.,n,Macro(autoanswer,${DEVICES})
exten => _7.,n(check),ChanIsAvail(${DIAL},sj)
exten => _7.,n,Dial(${DIAL},${DTIME},${DOPTIONS})
exten => _7.,n(end),Busy(20)

Does anyone have any idea on this? We’ve seen that over time the number of devices impacted by this bug grows. So that eventually the system must be rebooted entirely to clear out all connections and restarted. Seems like a big deal but no one seems to have it happening?

I reported it as a bug in 1.4.25.