Reaching call-limit+1 returns CHANUNAVAIL instead of BUSY

I added call-limit=1 to the sip entries in sip.conf so DEVICE_STATE() (see my last post) is working but now I run into another problem.

When a phone is called for a second call while call-limit=1 is added to the sip entry the DIALSTATUS returned is CHANUNAVAIL while BUSY seems to be more logic. I’m working on a straightforward hotdesking based dialplan for use with OpenBTS (see ) and there is a forced logout (at the end of the Asterisk script) in case a channel is unavailable (GSM phone is out of range or switched off) and there is no use to be logged in anymore.

Now that CHANUNAVAIL is returned in case of a busy phone, forced log offs are performed while there is no reason for this and with the result that a phone is no longer reachable. Perhaps there is a good reason for returning CHANUNAVAIL but for me it feels like the wrong dialstatus for what is actually happening. Can this considered to be a bug and should I report it as a bug. Does anybody knows where in the source code is coded that the dialstatus by reaching the call-limit+1 is CHANUNAVAIL instead of BUSY so I can change it. Thanks in advance.