[asterisk-users] Exec two commands with ExecIf
jharragin at mw.k12.ny.us
Fri Dec 24 09:52:48 CST 2021
Standard coding practices tend do discourage gotos which result in a kind
of confusing spaghetti, but after years of doing this I realize telephone
calls are not like typical programs and a caller is creating a thread of
spaghetti woven through the telco network & pbx... which exists until you
terminate the call.
The answer is that you can do nearly anything within just a standard
extensions.conf with a fairly limited set of conditional and loop
applications - and if you can't, there are a ton of options odbc, agi,
Antony has a point with gotos reminding me of BASIC. I compensate with an
abundance of hangups. The startling difference is that asterisk dialplan
instructions can work remarkably well - where basic, not so much (That was
Gates' great coding achievement - why anyone would regard him as a pundit
on dna is beyond me).
Back to the guy who is asking the original questions, while you are
experimenting use your cli verbose mode, the verbose application, and in
cli: core show help application & core show help function
...answers to many of the questions you ask are there. Also bear in mind
others face nearly all of the challenges you encounter - which has resulted
in a rich instruction set. I think you'll find any familiar programing
language constructs are left out as they may bring problems that outweigh
usefulness - and there will be another way to do it.
Finally I can assure you that you can pack an amazing amount of
functionality into not to many lines of configuration using a small subset
of applications and functions if you choose to...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asterisk-users