[svn-commits] file: branch 1.4 r229965 - in /branches/1.4: apps/ configs/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Nov 13 11:20:04 CST 2009


Author: file
Date: Fri Nov 13 11:19:59 2009
New Revision: 229965

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=229965
Log:
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

Modified:
    branches/1.4/apps/app_chanisavail.c
    branches/1.4/configs/extensions.conf.sample

Modified: branches/1.4/apps/app_chanisavail.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/apps/app_chanisavail.c?view=diff&rev=229965&r1=229964&r2=229965
==============================================================================
--- branches/1.4/apps/app_chanisavail.c (original)
+++ branches/1.4/apps/app_chanisavail.c Fri Nov 13 11:19:59 2009
@@ -55,7 +55,12 @@
 static char *descrip = 
 "  ChanIsAvail(Technology/resource[&Technology2/resource2...][|options]): \n"
 "This application will check to see if any of the specified channels are\n"
-"available. The following variables will be set by this application:\n"
+"available. 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"
+"The following variables will be set by this application:\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"
 "  ${AVAILSTATUS}   - the status code for the available channel\n"

Modified: branches/1.4/configs/extensions.conf.sample
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/configs/extensions.conf.sample?view=diff&rev=229965&r1=229964&r2=229965
==============================================================================
--- branches/1.4/configs/extensions.conf.sample (original)
+++ branches/1.4/configs/extensions.conf.sample Fri Nov 13 11:19:59 2009
@@ -449,7 +449,7 @@
 ;   ${ARG1} - Device to page
 
 exten => s,1,ChanIsAvail(${ARG1}|js)			; j is for Jump and 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!!!!




More information about the svn-commits mailing list