[Asterisk-Users] Busy not jumping n + 101 anymore

Eric "ManxPower" Wieling eric at fnords.org
Sat Oct 15 19:14:07 MST 2005


Kevin P. Fleming wrote:
> Andrew Kohlsmith wrote:
> 
>> I'm not talking Dial()'s result (DIALSTATUS), I'm talking ANY 
>> application.  Every application returns a code, so how do we get at 
>> it?  $?  ${?} ${APPRESULT}, how?
> 
> 
> You can't, because there is no reason for it. There are only three 
> possibilities for applications that don't set a channel variable:
> 
> 0 : signals normal completion, and the dialplan continues
> '0' - '9' or 'A' - 'F' or '#' or '*' : signals normal completion and 
> jump to that extension
> anything else : signals failure and the call is hung up
> 
> Applications generally only return zero or non-zero, so there is no 
> reason to be able to retrieve that result, because if it's non-zero the 
> call has already moved to the 'h' extension (if it is present). There is 
> no lack of documentation here, because application result codes have no 
> purpose or value being read or used by code in the dialplan.

It seems rather silly to document the return code of an app in "show 
application blah" if you can never access the value.  This was one of 
the things that confused me when I was a newbie.  I advocate simply 
removing the return code information from the application help.  Leave 
it in the programming docs (where it might be important).




More information about the asterisk-users mailing list