[asterisk-users] How to write a function with a return value in Asterisk

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Wed Aug 8 10:34:49 CDT 2007


On Wednesday 08 August 2007 11:24:45 am Mike wrote:
> Is it possible to write a function in Asterisk, that returns a value?  Sort
> of like any programming language allows?

Digium has taken the stance that it's better to set arbitrary variable names 
to arbitrary values rather than allow what many would consider the perfectly 
accepted method of using a $? type of return code in addition to any 
application-specific variables.

It's been a long-standing sore point with me for sure, since there is no 
standard way to see if an application returned successfully or not; you have 
to consult the individual application to see what it sets.

-A.



More information about the asterisk-users mailing list