aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_chanisavail.c5
-rw-r--r--configs/extensions.conf.sample2
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/app_chanisavail.c b/apps/app_chanisavail.c
index 3425bc35a..8dc95cd9e 100644
--- a/apps/app_chanisavail.c
+++ b/apps/app_chanisavail.c
@@ -53,6 +53,11 @@ static char *descrip =
" s - Consider the channel unavailable if the channel is in use at all.\n"
" t - Simply checks if specified channels exist in the channel list\n"
" (implies option s).\n"
+"Note that the AVAILSTATUS variable is used for both device state\n"
+"and cause code. It is therefore possible for it to give a value that may\n"
+"indicate a device is available when it is not. It is suggested that the\n"
+"AVAILORIGCHAN variable is used instead to see whether a device is available\n"
+"or not.\n"
"This application sets the following channel variable upon completion:\n"
" AVAILCHAN - the name of the available channel, if one exists\n"
" AVAILORIGCHAN - the canonical channel name that was used to create the channel\n"
diff --git a/configs/extensions.conf.sample b/configs/extensions.conf.sample
index cb8b47cdd..27e0aad46 100644
--- a/configs/extensions.conf.sample
+++ b/configs/extensions.conf.sample
@@ -493,7 +493,7 @@ exten => a,n,Return
; ${ARG1} - Device to page
exten => s,1,ChanIsAvail(${ARG1},s) ; s is for ANY call
-exten => s,n,GoToIf([${AVAILSTATUS} = "1"]?autoanswer:fail)
+exten => s,n,GoToIf([${AVAILORIGCHAN} = ""]?fail:autoanswer)
exten => s,n(autoanswer),Set(_ALERT_INFO="RA") ; This is for the PolyComs
exten => s,n,SIPAddHeader(Call-Info: Answer-After=0) ; This is for the Grandstream, Snoms, and Others
exten => s,n,NoOp() ; Add others here and Post on the Wiki!!!!