[Asterisk-Dev] application return codes in extensions.conf

Steve Murphy murf at e-tools.com
Thu Sep 9 20:01:08 MST 2004



I'm fuzzy on exactly how to deal with return codes in apps in the
extensions.conf.

As a for-instance,  an app like System() is advertised thusly:

System(command): Executes a command  by  using  system(). Returns -1 on
failure to execute the specified command. If  the command itself
executes but is in error, and if there exists a priority n + 101, where
'n' is the priority of the current instance, then  the  channel  will 
be  setup  to continue at that priority level.  Otherwise, System
returns 0.

Now, I know what to do with simple stuff, like defining stuff to do at
extension n+101, and what to do in the n+1 step after System() finishes,
But, how does one  handle the -1 return code?

It seems to abort my context and cause problems if one is passed back.
How are non-zero result  codes handled in asterisk and programming in
extensions.conf?

murf



-- 
Steve Murphy <murf at e-tools.com>
Electronic Tools Company




More information about the asterisk-dev mailing list