[asterisk-users] Asterisk as an IVR solution

Steve Edwards asterisk.org at sedwards.com
Fri Jul 11 10:43:47 CDT 2008


On Fri, 11 Jul 2008, Douglas Garstang wrote:

> Ugh. Yes, the variables are local to the current channel. However, they 
> are global to the entire dial plan within the current channel. I have 
> stepped on myself many times because I've had a loop counter called $i 
> for example, jumped somewhere else within that loop, reused the same 
> variable name, $i, and screwed up my logic.

Ugh indeed. While I sympathize with your local/global name space issues, 
you lose credibility with your false economy.

IMNSHO, anybody who uses a single [common] letter for a variable deserves 
a bump in the temperature when they reach their final resting place :)

For example, out of the 157 applications on one of my Asterisk servers, 76 
contain the letter "l."

(absolutetimeout, adsiprog, agentcallbacklogin, agentlogin, 
agentmonitoroutgoing, agi, alarmreceiver, appendcdruserfield, 
authenticate, changemonitor, chanisavail, congestion, datetime, deadagi, 
dial, dictate, digittimeout, directory, disa, dundilookup, eagi, endwhile, 
execif, execiftime, externalivr, festival, getcpeid, gosubif, gotoif, 
gotoiftime, hasnewvoicemail, hasvoicemail, iax2provision, ices, importvar, 
lookupblacklist, lookupcidname, macroexit, macroif, mailboxexists, 
meetmeadmin, milliwatt, mixmonitor, monitor, pickup, privacymanager, 
readfile, realtime, realtimeupdate, responsetimeout, retrydial, ringing, 
saydigits, sayphonetic, sayunixtime, sendimage, setcallerid, 
setcdruserfield, setcidname, setcidnum, setrdnis, settransfercapabilit, 
sipaddheader, sipdtmfmode, sipgetheader, stopmonitor, testclient, 
txtcidname, vmauthenticate, voicemail, voicemailmain, wait, waitexten, 
waitforring, waitforsilence, while)

Surely you can come up with a name slightly more descriptive -- maybe 
"idx?"

Take pity on the next sod that has to plod through your dialplan. The 
millisecond you "spend" typing a more meaningful name will be returned to 
you (or your employer) a millionfold.

> ----- Original Message ----
> From: Tilghman Lesher <tilghman at mail.jeffandtilghman.com>
> To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com>
> Sent: Friday, July 11, 2008 7:36:54 AM
> Subject: Re: [asterisk-users] Asterisk as an IVR solution
>
> On Friday 11 July 2008 09:22:25 Douglas Garstang wrote:
>> Yes, and by doing that your compounding the fact that all your variables
>> are global.
>
> No, his variables are local to the channel he's using.  Global variables are
> a completely different beast.
>
> -- 
> Tilghman
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2008 - September 22 - 25 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
>

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000



More information about the asterisk-users mailing list