VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
b.lavallee at globalta... Guest
|
Posted: Mon Aug 25, 2014 12:37 am Post subject: [asterisk-users] FYI: Block Comments |
|
|
Hello,
Here's a fun issue that recently caused me some serious heartache.
Hope this helps others from making the same mistake.
Did you know that the configuration parser supports block-comments.
Like an idiot, I've been highlighting text between dashes.
[example]
; -- Most of my comments were single-line like this --
exten => _1X.,1,NoOp(This would load fine)
;
;-- I did not even use
block-comments like
this one in my config
file --;
;
exten => _2X.,1,NoOp(Loads OK)
;
;-- But look! -- I missed a space between the semi-colon and two dashes --
exten => _3X.,1,NoOp(This would NOT load)
; -- The parser stopped loading anything past the above mistake --
; -- Missing that space started a block-comment - Arghhh! --
exten => _4X.,1,NoOp(This would NOT load either)
; -end
Guess I have to change my highlight syntax, avoiding dashes in the future.
Sincerely,
Brian LaVallee
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
jcolp at digium.com Guest
|
Posted: Mon Aug 25, 2014 11:44 am Post subject: [asterisk-users] FYI: Block Comments |
|
|
On 8/25/2014 2:36 AM, Brian LaVallee wrote:
Quote: | Hello,
Here's a fun issue that recently caused me some serious heartache.
Hope this helps others from making the same mistake.
Did you know that the configuration parser supports block-comments.
Like an idiot, I've been highlighting text between dashes.
|
The configuration parser can do a lot of things. Out of curiosity
amongst those reading this - how many of you know about templates?
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
kevin.larsen at pionee... Guest
|
Posted: Mon Aug 25, 2014 11:46 am Post subject: [asterisk-users] FYI: Block Comments |
|
|
Quote: | The configuration parser can do a lot of things. Out of curiosity
amongst those reading this - how many of you know about templates?
|
I use templates and wish the realtime parser would understand them as well. |
|
Back to top |
|
|
cursor at telecomabmex... Guest
|
Posted: Mon Aug 25, 2014 12:20 pm Post subject: [asterisk-users] FYI: Block Comments |
|
|
On 8/25/14, 11:44 AM, Joshua Colp wrote:
Quote: | On 8/25/2014 2:36 AM, Brian LaVallee wrote:
Quote: | Hello,
Here's a fun issue that recently caused me some serious heartache.
Hope this helps others from making the same mistake.
Did you know that the configuration parser supports block-comments.
Like an idiot, I've been highlighting text between dashes.
|
The configuration parser can do a lot of things. Out of curiosity
amongst those reading this - how many of you know about templates?
| I love the idea of templates but since I use realtime database
configuration I cannot use them.
--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)9116-91161
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
matt.hoskins at npgco.com Guest
|
|
Back to top |
|
|
asterisk.org at sedwar... Guest
|
Posted: Mon Aug 25, 2014 1:21 pm Post subject: [asterisk-users] FYI: Block Comments |
|
|
On Mon, 25 Aug 2014, Joshua Colp wrote:
Quote: | how many of you know about templates?
|
(You may get more replies with a more 'on-target' subject. I lost
interest in 'block comments' but was curious why the thread was still
getting replies.)
Love templates. Use them in extensions.conf, sip.conf, and iax.conf every
day.
Here's an example from extensions.conf:
[party-line](digit-timeout,h,i,max-timeout,pound-main,s)
same = n, agi(write-cdr)
same = n, background(${PROMPTS-PATH}/0116)
...
Where the templates look like:
[digit-timeout](!)
exten = t,1, goto(${CONTEXT},s,1)
[h](!)
exten = h,1, goto(finish-call,h,1)
[i](!)
exten = i,1, goto(${CONTEXT},s,1)
[max-timeout](!)
exten = T,1, goto(max-time,s,1)
[pound-main](!)
exten = #,1, goto(main-menu,s,1)
[s](!)
exten = s,1, verbose(1,[${EXTEN}@${CONTEXT}!${ANI}])
Note that the 's' template has to be the last template specified in the
template list. Also, that '${EXTEN}@${CONTEXT}' makes for a quick
cut-n-paste into the 'dialplan show' CLI command.
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards@sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
matt.hoskins at npgco.com Guest
|
Posted: Mon Aug 25, 2014 1:31 pm Post subject: [asterisk-users] FYI: Block Comments |
|
|
Holy damn - I didn't know you could use templates in extensions! Mind =
Blown.
Matt Hoskins | NPG Corp | Systems Architect
816.749.2815 (Internal: ext. 10015)
-----Original Message-----
From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Steve
Edwards
Sent: Monday, August 25, 2014 1:20 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] FYI: Block Comments
On Mon, 25 Aug 2014, Joshua Colp wrote:
Quote: | how many of you know about templates?
|
(You may get more replies with a more 'on-target' subject. I lost interest
in 'block comments' but was curious why the thread was still getting
replies.)
Love templates. Use them in extensions.conf, sip.conf, and iax.conf every
day.
Here's an example from extensions.conf:
[party-line](digit-timeout,h,i,max-timeout,pound-main,s)
same = n, agi(write-cdr)
same = n, background(${PROMPTS-PATH}/0116)
...
Where the templates look like:
[digit-timeout](!)
exten = t,1, goto(${CONTEXT},s,1)
[h](!)
exten = h,1, goto(finish-call,h,1)
[i](!)
exten = i,1, goto(${CONTEXT},s,1)
[max-timeout](!)
exten = T,1, goto(max-time,s,1)
[pound-main](!)
exten = #,1, goto(main-menu,s,1)
[s](!)
exten = s,1,
verbose(1,[${EXTEN}@${CONTEXT}!${ANI}])
Note that the 's' template has to be the last template specified in the
template list. Also, that '${EXTEN}@${CONTEXT}' makes for a quick
cut-n-paste into the 'dialplan show' CLI command.
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards@sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New
to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
Teach CanIt if this mail (ID 01MH6kybJ) is spam:
Spam:
http://spamaway.npgco.com/canit/b.php?i=01MH6kybJ&m=051366e69c89&t=2014082
5&c=s
Not spam:
http://spamaway.npgco.com/canit/b.php?i=01MH6kybJ&m=051366e69c89&t=2014082
5&c=n
Forget vote:
http://spamaway.npgco.com/canit/b.php?i=01MH6kybJ&m=051366e69c89&t=2014082
5&c=f
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|