Re: [asterisk-users] Difference between Application Set and Function SET?
On Fri, Jun 16, 2017 at 1:43 PM, Jonathan Hwrote: > OK, thanks. That sort of makes sense. Is it case sensitive? > Is what case sensitive? Function names are case sensitive. Application names have historically been not 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?! > You are declaring an extension line with a pattern but the pattern only has literal characters so it really isn't a pattern. It takes more CPU to match than the non-pattern form and is more likely an error. Richard [1] https://wiki.asterisk.org/wiki/display/AST/Pattern+Matching -- _ -- 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
Re: [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 Kennerwrote: >> 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 -- _ -- 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
Re: [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. -- _ -- 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
Re: [asterisk-users] Difference between Application Set and Function SET?
On Fri, Jun 16, 2017 at 12:41 PM, Jonathan Hwrote: > 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 -- _ -- 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
[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! -- _ -- 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