Jonathan H
2017-Jun-16 17:41 UTC
[asterisk-users] Difference between Application Set and Function SET?
It was only when I ran AsteriskLint over my dialplan that I noticed this: https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Application_Set https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_SET Hmmm, they both seem to do the same thing. Or don't they? Confused!
Richard Mudgett
2017-Jun-16 18:05 UTC
[asterisk-users] Difference between Application Set and Function SET?
On Fri, Jun 16, 2017 at 12:41 PM, Jonathan H <lardconcepts at gmail.com> wrote:> It was only when I ran AsteriskLint over my dialplan that I noticed this: > > https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Application_Set > https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_SET > > Hmmm, they both seem to do the same thing. Or don't they? >Yes they both do the same thing which is set a channel variable. However, when they can be invoked is different. The Set application can only be invoked in dialplan. The SET function can be invoked anywhere a function can be invoked and not just in dialplan. Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170616/5eeedbe7/attachment.html>
Richard Kenner
2017-Jun-16 18:17 UTC
[asterisk-users] Difference between Application Set and Function SET?
> It was only when I ran AsteriskLint over my dialplan that I noticed this: > > https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Application_Set > https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_SET > > Hmmm, they both seem to do the same thing. Or don't they?In some sense they do, but one's an application, meaning that it's like a subprogram in a programming-language sense, and the other is a function, which returns a value.
Jonathan H
2017-Jun-16 18:43 UTC
[asterisk-users] Difference between Application Set and Function SET?
OK, thanks. That sort of makes sense. Is it case sensitive? Bonus quickie while I'm here (not worth own thread) - Asterisklint complains that: H_PAT_NON_CANONICAL: pattern '_#' is not in the canonical form '#' for the line exten => _#,1,Goto(s,1) I'm sure I read somewhere it should be _#. Am I imagining it?! On 16 June 2017 at 19:17, Richard Kenner <kenner at gnat.com> wrote:>> It was only when I ran AsteriskLint over my dialplan that I noticed this: >> >> https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Application_Set >> https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_SET >> >> Hmmm, they both seem to do the same thing. Or don't they? > > In some sense they do, but one's an application, meaning that it's > like a subprogram in a programming-language sense, and the other is a > function, which returns a value. > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users