From 487e679dc86ac0ab72d087ef69d5c293fe3af7da Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Fri, 13 Nov 2009 17:21:49 +0000 Subject: [PATCH] Merged revisions 229966 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r229966 | file | 2009-11-13 11:20:26 -0600 (Fri, 13 Nov 2009) | 13 lines Merged revisions 229965 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r229965 | file | 2009-11-13 11:19:59 -0600 (Fri, 13 Nov 2009) | 6 lines Document a limitation in the AVAILSTATUS variable from ChanIsAvail and provide a workaround for it that does not change existing behavior. (closes issue #14426) Reported by: macli ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@229969 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_chanisavail.c | 4 +++- configs/extensions.conf.sample | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/app_chanisavail.c b/apps/app_chanisavail.c index 556bafd713..ea074e7e21 100644 --- a/apps/app_chanisavail.c +++ b/apps/app_chanisavail.c @@ -85,7 +85,9 @@ static char *app = "ChanIsAvail"; The canonical channel name that was used to create the channel - The status code for the available channel + The status code for the available channel. This is used for both + device state and cause code. It is recommended that you use AVAILORIGCHAN + instead to see if a device is available or not. diff --git a/configs/extensions.conf.sample b/configs/extensions.conf.sample index ff679406e4..69370376c1 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!!!!