AGI or system


Can someone explain me, what difference between AGI(…) or system (…) ?
just for run bash script.

And one more question.

I want make scenario like this…

  1. Run bash script
  2. Bash return to asterisk value ( like 0, 7, 8)
  3. If zero, than say (…blablabla)
    if 7, than say ( another blablabla)
    if 8, then say ( one more blablabla)
  4. hangup.

IVR was already done and i can run script. But cant understand, how return value from bash to asterisk and check (if then if then …) it.

thanks and sorry about my english

not sure if it’s posible
the other way is to use AGI command “SET VARIABLE MYEXITSTATUS 123” (for example)


beware of “read_stdin” function. imho, Asterisk doesnt like if its output is suppressed :unamused: