diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-28 14:39:21 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-28 14:39:21 +0000 |
commit | a22b4735e5a6b8745a4915a260995886c56c7ffe (patch) | |
tree | 2e8e77235c0fb39f0551db5e6012057fc8c580d0 /configs/extensions.lua.sample | |
parent | 7f7cfd42e9d0e77e3d1ea18732595c1794bf46ea (diff) |
Remove a bunch of trailing whitespace in preparation for reformatting/cleanup.
Let's try that again, this time removing trailing whitespace and not leading
whitespace. I can't believe no one noticed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@197535 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configs/extensions.lua.sample')
-rw-r--r-- | configs/extensions.lua.sample | 174 |
1 files changed, 87 insertions, 87 deletions
diff --git a/configs/extensions.lua.sample b/configs/extensions.lua.sample index 0bbb3aef1..df32ec705 100644 --- a/configs/extensions.lua.sample +++ b/configs/extensions.lua.sample @@ -22,20 +22,20 @@ TRUNKMSD = 1 -- an extension name is prefixed by a '_' character, it is interpreted as -- a pattern rather than a literal. In patterns, some characters have -- special meanings: --- +-- -- X - any digit from 0-9 -- Z - any digit from 1-9 -- N - any digit from 2-9 -- [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9) --- . - wildcard, matches anything remaining (e.g. _9011. matches +-- . - wildcard, matches anything remaining (e.g. _9011. matches -- anything starting with 9011 excluding 9011 itself) -- ! - wildcard, causes the matching process to complete as soon as -- it can unambiguously determine that no other matches are possible --- +-- -- For example the extension _NXXXXXX would match normal 7 digit -- dialings, while _1NXXNXXXXXX would represent an area code plus phone -- number preceded by a one. --- +-- -- If your extension has special characters in it such as '.' and '!' you must -- explicitly make it a string in the tabale definition: -- @@ -44,7 +44,7 @@ TRUNKMSD = 1 -- -- There are no priorities. All extensions to asterisk appear to have a single -- priority as if they consist of a single priority. --- +-- -- Each context is defined as a table in the extensions table. The -- context names should be strings. -- @@ -52,7 +52,7 @@ TRUNKMSD = 1 -- extension. This extension should be set to a table containing a list -- of context names. Do not put references to tables in the includes -- table. --- +-- -- include = {"a", "b", "c"}; -- -- Channel variables can be accessed thorugh the global 'channel' table. @@ -79,7 +79,7 @@ TRUNKMSD = 1 -- Also notice the absence of the following constructs from the examples above: -- channel.func_name(1,2,3) = "value" -- this will NOT work -- value = channel.func_name(1,2,3) -- this will NOT work as expected --- +-- -- -- Dialplan applications can be accessed through the global 'app' table. -- @@ -97,103 +97,103 @@ TRUNKMSD = 1 -- function outgoing_local(c, e) -app.dial("DAHDI/1/" .. e, "", "") + app.dial("DAHDI/1/" .. e, "", "") end function demo_instruct() -app.background("demo-instruct") -app.waitexten() + app.background("demo-instruct") + app.waitexten() end function demo_congrats() -app.background("demo-congrats") -demo_instruct() + app.background("demo-congrats") + demo_instruct() end -- Answer the chanel and play the demo sound files function demo_start(context, exten) -app.wait(1) -app.answer() + app.wait(1) + app.answer() -channel.TIMEOUT("digit"):set(5) -channel.TIMEOUT("response"):set(10) --- app.set("TIMEOUT(digit)=5") --- app.set("TIMEOUT(response)=10") + channel.TIMEOUT("digit"):set(5) + channel.TIMEOUT("response"):set(10) + -- app.set("TIMEOUT(digit)=5") + -- app.set("TIMEOUT(response)=10") -demo_congrats(context, exten) + demo_congrats(context, exten) end function demo_hangup() -app.playback("demo-thanks") -app.hangup() + app.playback("demo-thanks") + app.hangup() end extensions = { -demo = { -s = demo_start; - -["2"] = function() -app.background("demo-moreinfo") -demo_instruct() -end; -["3"] = function () -channel.LANGUAGE():set("fr") -- set the language to french -demo_congrats() -end; - -["1000"] = function() -app.goto("default", "s", 1) -end; - -["1234"] = function() -app.playback("transfer", "skip") --- do a dial here -end; - -["1235"] = function() -app.voicemail("1234", "u") -end; - -["1236"] = function() -app.dial("Console/dsp") -app.voicemail(1234, "b") -end; - -["#"] = demo_hangup; -t = demo_hangup; -i = function() -app.playback("invalid") -demo_instruct() -end; - -["500"] = function() -app.playback("demo-abouttotry") -app.dial("IAX2/guest@misery.digium.com/s@default") -app.playback("demo-nogo") -demo_instruct() -end; - -["600"] = function() -app.playback("demo-echotest") -app.echo() -app.playback("demo-echodone") -demo_instruct() -end; - -["8500"] = function() -app.voicemailmain() -demo_instruct() -end; - -}; - -default = { --- by default, do the demo -include = {"demo"}; -}; - -["local"] = { -["_NXXXXXX"] = outgoing_local; -}; + demo = { + s = demo_start; + + ["2"] = function() + app.background("demo-moreinfo") + demo_instruct() + end; + ["3"] = function () + channel.LANGUAGE():set("fr") -- set the language to french + demo_congrats() + end; + + ["1000"] = function() + app.goto("default", "s", 1) + end; + + ["1234"] = function() + app.playback("transfer", "skip") + -- do a dial here + end; + + ["1235"] = function() + app.voicemail("1234", "u") + end; + + ["1236"] = function() + app.dial("Console/dsp") + app.voicemail(1234, "b") + end; + + ["#"] = demo_hangup; + t = demo_hangup; + i = function() + app.playback("invalid") + demo_instruct() + end; + + ["500"] = function() + app.playback("demo-abouttotry") + app.dial("IAX2/guest@misery.digium.com/s@default") + app.playback("demo-nogo") + demo_instruct() + end; + + ["600"] = function() + app.playback("demo-echotest") + app.echo() + app.playback("demo-echodone") + demo_instruct() + end; + + ["8500"] = function() + app.voicemailmain() + demo_instruct() + end; + + }; + + default = { + -- by default, do the demo + include = {"demo"}; + }; + + ["local"] = { + ["_NXXXXXX"] = outgoing_local; + }; } |