Skip to content
Snippets Groups Projects
Commit 82d70205 authored by Josh Roberson's avatar Josh Roberson
Browse files

Don't only accept AST_DEVICE_UNKNOWN when we're trying to determine if the...

Don't only accept AST_DEVICE_UNKNOWN when we're trying to determine if the device is in use.  (Bug # 5338)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 463ad17f
No related branches found
No related tags found
No related merge requests found
......@@ -115,7 +115,7 @@ static int chanavail_exec(struct ast_channel *chan, void *data)
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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment