/* Gets the next free call_index. 
For each new call, the call index should be incremented and wrap at 255. However, the index = 0 is reserved for outgoing calls */
static uint8_t next_free_call_index(void)
/* Gets the next free call_index. 
For each new call, the call index should be incremented and wrap at 255. However, the index = 0 is reserved for outgoing calls */
static uint8_t next_free_call_index(void)
{
	for (int i = 0; i < CONFIG_BT_TBS_MAX_CALLS; i++) {
		static uint8_t next_call_index;
		const struct bt_tbs_call *call;
		next_call_index++;
		if (next_call_index == BT_TBS_FREE_CALL_INDEX) {
			next_call_index = 1;
		}
		call = lookup_call(next_call_index);
		if (call == NULL) {
			return next_call_index;
		}
	}
	LOG_DBG("No more free call spots");
	return BT_TBS_FREE_CALL_INDEX;
}