[Asterisk-Users] extensions.conf issue

Steven Critchfield critch at basesys.com
Tue Sep 2 14:05:29 MST 2003


On Tue, 2003-09-02 at 15:48, Josh Edwards wrote:
> Nothing, it is a shell script that runs another program. do I need to
> have it return something?

Yes, all applications should return a result code after finishing.
Usually 0 means success or no errors and anything else is some form of
error indicator. 

So also to be checked out from asterisk...

  -= Info about application 'System' =- 

[Synopsis]:
  Execute a system command

[Description]:
  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.


>From the bash man page, but could probably be in any shell...
     exit [n]
              Cause the shell to exit with a status of n.  If n is
omitted, the exit status is that of the last command executed.  A trap
on EXIT is executed before the shell terminates.



>From this you should note that ideally you should exit 0. 


> >From: Steven Critchfield 
> >Reply-To: asterisk-users at lists.digium.com 
> >To: asterisk-users at lists.digium.com 
> >Subject: Re: [Asterisk-Users] extensions.conf issue 
> >Date: Tue, 02 Sep 2003 15:11:34 -0500 
> > 
> >On Tue, 2003-09-02 at 14:54, Josh Edwards wrote: 
> > > Question below, here is the file in question 
> > > exten => 9,1,system,/usr/local/bin/hetest 01 on 
> > > exten => 9,2,system,/usr/local/bin/hetest 02 on 
> > > exten => 9,3,system,/usr/local/bin/hetest 03 on 
> > > exten => 9,4,system,/usr/local/bin/hetest 04 on 
> > > exten => 9,5,system,/usr/local/bin/hetest 05 on 
> > > exten => 9,6,system,/usr/local/bin/hetest 06 on 
> > > exten => 9,7,system,/usr/local/bin/hetest 07 on 
> > > exten => 9,8,system,/usr/local/bin/hetest 08 on 
> > > exten => 9,9,system,/usr/local/bin/hetest 09 on 
> > > 
> > > 
> > > When I dial 9 it runs the first item, then it exits and gives me a
> > > busy, why does it not go through all of the items then exit 
> > 
> >what does hetest return? 
> >-- 
> >Steven Critchfield 
> > 
> >_______________________________________________ 
> >Asterisk-Users mailing list 
> >Asterisk-Users at lists.digium.com 
> >http://lists.digium.com/mailman/listinfo/asterisk-users 
> 
> ______________________________________________________________________
>  Get MSN 8and enjoy automatic e-mail virus protection.  
> _______________________________________________ Asterisk-Users mailing
> list Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
Steven Critchfield  <critch at basesys.com>




More information about the asterisk-users mailing list