Index: apps/app_chanisavail.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_chanisavail.c,v retrieving revision 1.21 diff -u -r1.21 app_chanisavail.c --- apps/app_chanisavail.c 28 Sep 2005 19:42:36 -0000 1.21 +++ apps/app_chanisavail.c 5 Oct 2005 00:23:27 -0000 @@ -115,7 +115,7 @@ snprintf(trychan, sizeof(trychan), "%s/%s",cur,number); status = inuse = ast_device_state(trychan); } - if ((inuse < 1) && (tempchan = ast_request(tech, chan->nativeformats, number, &status))) { + if ((inuse <= 1) && (tempchan = ast_request(tech, chan->nativeformats, number, &status))) { pbx_builtin_setvar_helper(chan, "AVAILCHAN", tempchan->name); /* Store the originally used channel too */ snprintf(tmp, sizeof(tmp), "%s/%s", tech, number);