From: Cody A. <ald...@gm...> - 2017-07-29 14:45:56
|
Lonnie, You said, "Starting with working examples (like weather.agi) makes customizing much easier than starting from scratch." That is how I am learning. I first learn of the potential to do something with Asterisk, then I see working examples and work to figure out how the code strings function. I search to find a teaching example of the strings that show all the options with their various separators such as commas, parenthesis and brackets. Then I experiment until I get something to work. I sometimes have problems trying to use something that has been deprecated, but that does not happen much. For example, it took another Asterisk user to inform me the pipe was replaced with the comma, and I just read on here how the semicolon apparently cannot be used to remark in the users.conf and one needs to use a # instead. I pick little things up here and there, and hope the info is accurate. Anyway, I am programming extensions for my CNET (Collector's Network at https://www.ckts.info/) as a fun hobby, but I have been learning things to implement in Asterisk for useful things as well. I was able to program a prayer request line with a local number that connects to a three option voice menu system. A few people I met through TCI (Telephone Collectors International) have also been helping me learn. The power potential of Asterisk is incredible, especially considering it is free to use. And to have Astlinux with a GUI made it possible for me to get started with a legacy Thin Client and very minimal expense or knowledge of how to make it work. Seeing various examples helps me figure out how to do what I want to do. Compared to many, my dialplan is probably quite rudimentary. However, it is evolving as I learn. My biggest concern is security as the attacks are relentless. I can edit the weather agi as far as actually accessing it and changing the strings, but I am not sure yet what to do to add in the other weather parameter options. I can find the sounds to play back, but I have to figure out the rest. It will give me something to work on to keep my mind from growing numb from my paying job. :) -Cody On Sat, Jul 29, 2017 at 10:07 AM, Lonnie Abelbeck <li...@lo... > wrote: > Hi Cody, > > Funny, I wrote that AGI script almost 10 years ago, and still use it > almost every day :-) > > The XML output of that source has additional fields you could key off of, > for example: > -- > < relative_humidity > 78 < /relative_humidity> > < pressure_in > 30.12 < /pressure_in> > < dewpoint_string > 64.8 F (18.2 C) < /dewpoint_string> > < dewpoint_f > 64.8 < /dewpoint_f> > < dewpoint_c > 18.2 < /dewpoint_c> > < visibility_mi > 10.00 < /visibility_mi> > -- > > and standard sound files: > -- > wx/humidity > wx/barometer > wx/dew-point > visibility > -- > > You could easily tweak the weather.agi AGI script to create a new > weather-full.agi AGI script off a different extension. > > Personally, I think the key to this being useful is to only provide the > basics so the voice output is minimal and to the point. But options are > good. > > As you are learning, AstLinux is a foundation that you can tweak and > customize to your needs. Indeed you need to understand Linux and shell > scripting to some degree, definitely Asterisk text configuration. Starting > with working examples (like weather.agi) makes customizing much easier than > starting from scratch. > > Lonnie > |