[asterisk-users] Function vs. Application?

Jared Smith jsmith at digium.com
Fri Dec 7 14:19:49 CST 2007


On Fri, 2007-12-07 at 21:04 +0100, Vincent wrote:
> Out of curiosity, what's the difference between a function and an
> application?

In a nutshell, an application is something that performs an action on a
channel (such as playing a sound prompt, gathering DTMF input, putting
the call into a call queue, etc.).

A function, on the other hand, is used to get or set values, and doesn't
directly manipulate the channel.  These values *might* have something to
do with the channel (such as is the case with the CDR function), but
don't necessarily have to (such as is the case with the CUT and LEN
functions).

Hopefully I've explained it in such a way that it's clearer to you know.
If not, let me know and I'll try to be more clear.

---
Jared Smith
Community Relations Manager
Digium, Inc.





More information about the asterisk-users mailing list