Unable to register extension error in /var/log/asterisk/full

I just rebuilt our PBX from the ground up using FreePBX 2.11/Asterisk 11.10, and to date this is my only experience with any of the components besides having worked with Linux for several years. I have finally got it to the point where I’m ready to test it, but I’m concerned about the errors below. None of the includes exist, but previous threads about that issue were met with “Don’t worry about it; they’re there if you want to use custom changes but they aren’t necessary”.

Errors:

pbx.c: Extension 's' priority 4 in 'app-speeddial-set', label 'lookup' already in use at priority 3 pbx.c: Unable to register extension 's' priority 3 in 'custom-cf-anynumber', already in use pbx.c: Unable to register extension 's' priority 3 in 'custom-cf-anynumber-mrs', already in use pbx.c: Unable to register extension 's' priority 1 in 'macro-outisbusy', already in use pbx.c: Unable to register extension 's' priority 2 in 'macro-outisbusy', already in use pbx.c: Unable to register extension 's' priority 3 in 'macro-outisbusy', already in use pbx.c: Unable to register extension 's' priority 4 in 'macro-outisbusy', already in use pbx.c: Unable to register extension 's' priority 3 in 'mrs-custom-cf-anynumber', already in use

And here is the code from extensions.conf, extensions_additional.conf, and extensions_custom.conf
extensions_additional.conf [app-speeddial-set][code][app-speeddial-set]
include => app-speeddial-set-custom
exten => s,1,Macro(user-callerid,)
exten => s,n(setloc),Read(newlocation,speed-enterlocation,)
exten => s,n(lookup),Macro(speeddial-lookup,${newlocation},${AMPUSER})
exten => s,n(lookup),GotoIf($["${SPEEDDIALNUMBER}"!=""]?conflicts)
exten => s,n(setnum),Read(newnum,speed-enternumber,)
exten => s,n(success),Set(DB(AMPUSER/${AMPUSER}/speeddials/${newlocation})=${newnum})
exten => s,n,Playback(speed-dial)
exten => s,n,SayDigits(${newlocation})
exten => s,n,Playback(is-set-to)
exten => s,n,SayDigits(${newnum})
exten => s,n,Hangup
exten => s,n(conflicts),Playback(speed-dial)
exten => s,n,SayDigits(${newlocation})
exten => s,n,Playback(is-in-use)
exten => s,n,Background(press-1&to-listen-to-it&press-2&to-enter-a-diff&location&press-3&to-change&telephone-number)
exten => s,n,WaitExten(60,)

exten => 1,1,Playback(speed-dial)
exten => 1,n,SayDigits(${newlocation})
exten => 1,n,Playback(is-set-to)
exten => 1,n,SayDigits(${SPEEDDIALNUMBER})
exten => 1,n,Goto(s,conflicts)

exten => 2,1,Goto(s,setloc)

exten => 3,1,Goto(s,setnum)

exten => t,1,Congestion()

;–== end of [app-speeddial-set] ==–;[/code]

extensions_additional.conf [macro-outisbusy][code][macro-outisbusy]
include => macro-outisbusy-custom
exten => s,1,Progress
exten => s,n,GotoIf($["${EMERGENCYROUTE}" = “YES”]?emergency,1)
exten => s,n,GotoIf($["${INTRACOMPANYROUTE}" = “YES”]?intracompany,1)
exten => s,n,Playback(all-circuits-busy-now&pls-try-call-later, noanswer)
exten => s,n,Congestion(20)
exten => s,n,Hangup

exten => intracompany,1,Playback(all-circuits-busy-now&pls-try-call-later, noanswer)
exten => intracompany,n,Congestion(20)
exten => intracompany,n,Hangup

exten => emergency,1,Playback(all-circuits-busy-now&pls-try-call-later)
exten => emergency,n,Congestion(20)
exten => emergency,n,Hangup

;–== end of [macro-outisbusy] ==–;[/code]
extensions.conf [macro-outisbusy][macro-outisbusy] exten => s,1,Progress exten => s,n,Playback(all-circuits-busy-now,noanswer) exten => s,n,Playback(pls-try-call-later,noanswer) exten => s,n,Macro(hangupcall)
extensions_custom.conf [custom-cf-anynumber][custom-cf-anynumber] exten => s,1,Set(uext=${EXTEN:4}) exten => s,2,Answer exten => s,n,Set(step1count=0) exten => s,3,Wait(1) exten => s,4,BackGround(please-enter-the) exten => s,5,Playback(number) ;same => n(beginning),GotoIf($[${step1count} > 2]?1) ;same => n,Read(uext,prompt-instructions,3) ;same => n,Set(step1count=$[${step1count} + 1]) exten => s,6,Read(uext,then-press-pound) exten => s,7,Wait(1) exten => s,8,System(/usr/sbin/asterisk -rx "DATABASE PUT CF 303 9${uext}") exten => s,9,Wait(1) exten => s,10,System(/usr/sbin/asterisk -rx "database put DAYNIGHT C1 NIGHT") exten => s,11,System(/usr/sbin/asterisk -rx "database put DAYNIGHT C2 NIGHT") exten => s,12,System(/usr/sbin/asterisk -rx "database put DAYNIGHT C3 NIGHT") exten => s,13,Wait(1) exten => s,14,Playback(call-fwd-unconditional&is-set-to) exten => s,15,Saydigits(${uext}) exten => s,16,Playback(activated) exten => s,17,Wait(1) exten => s,18,Goto(ivr-16,s,1)
extensions_custom.conf [custom-cf-anynumber-mrs][custom-cf-anynumber-mrs] exten => s,1,Set(uext=${EXTEN:4}) exten => s,2,Answer exten => s,n,Set(step1count=0) exten => s,3,Wait(1) exten => s,4,BackGround(please-enter-the) exten => s,5,Playback(number) ;same => n(beginning),GotoIf($[${step1count} > 2]?1) ;same => n,Read(uext,prompt-instructions,3) ;same => n,Set(step1count=$[${step1count} + 1]) exten => s,6,Read(uext,then-press-pound) exten => s,7,Wait(1) exten => s,8,System(/usr/sbin/asterisk -rx "DATABASE PUT CF 304 9${uext}") exten => s,9,Wait(1) exten => s,10,System(/usr/sbin/asterisk -rx "database put DAYNIGHT C4 NIGHT") exten => s,11,Wait(1) exten => s,12,Playback(call-fwd-unconditional&is-set-to) exten => s,13,Saydigits(${uext}) exten => s,14,Playback(activated) exten => s,15,Wait(1) exten => s,16,Goto(ivr-20,s,1)
extensions_custom.conf [mrs-custom-cf-anynumber][mrs-custom-cf-anynumber] exten => s,1,Set(uext=${EXTEN:4}) exten => s,2,Answer exten => s,n,Set(step1count=0) exten => s,3,Wait(1) exten => s,4,BackGround(please-enter-the) exten => s,5,Playback(number) ;same => n(beginning),GotoIf($[${step1count} > 2]?1) ;same => n,Read(uext,prompt-instructions,3) ;same => n,Set(step1count=$[${step1count} + 1]) exten => s,6,Read(uext,then-press-pound) exten => s,7,Wait(1) exten => s,8,System(/usr/sbin/asterisk -rx "DATABASE PUT CF 306 9${uext}") exten => s,9,Wait(1) exten => s,10,System(/usr/sbin/asterisk -rx "database put DAYNIGHT C5 NIGHT") exten => s,11,Wait(1) exten => s,12,Playback(call-fwd-unconditional&is-set-to) exten => s,13,Saydigits(${uext}) exten => s,14,Playback(activated) exten => s,15,Wait(1) exten => s,16,Goto(ivr-22,s,1)

Can somebody please advise me on what’s causing the errors, and how I might fix them if they indeed need fixing?

The error message is fairly self explanatory. These are the first pair of offending lines:

exten => s,n([color=#FF0040]lookup[/color]),Macro(speeddial-lookup,${newlocation},${AMPUSER})
exten => s,n([color=#FF0000]lookup[/color]),GotoIf($["${SPEEDDIALNUMBER}"!=""]?conflicts)

[quote=“david55”]The error message is fairly self explanatory. These are the first pair of offending lines:

exten => s,n([color=#FF0040]lookup[/color]),Macro(speeddial-lookup,${newlocation},${AMPUSER})
exten => s,n([color=#FF0000]lookup[/color]),GotoIf($["${SPEEDDIALNUMBER}"!=""]?conflicts)[/quote]

What can I do to fix this while keeping the functionality intact?
What about the other errors?

I don’t know any of the programming aspects of the PBX, I’m just the guy who picks things up quickly and gets to do the “fun” job of recreating the environment from scratch.

What is the intended functionality?

Basically remove all the labels except those actually being used. It looks like the labels are being abused as comments. Comments go at the end of the line and start with “;”.

Most of the other errors are probably from the same basic cause. I don’t see why I should look at them until you fix that.

You have to understand the programming aspects if you want to write your own dialplan, or even more so, if you want to customise a GUI dialplan. If you want support without that basic knowledge you need to go to the Biz and Jobs forum and pay someone.

[quote=“david55”]What is the intended functionality?

Basically remove all the labels except those actually being used. It looks like the labels are being abused as comments. Comments go at the end of the line and start with “;”.

Most of the other errors are probably from the same basic cause. I don’t see why I should look at them until you fix that.

You have to understand the programming aspects if you want to write your own dialplan, or even more so, if you want to customise a GUI dialplan. If you want support without that basic knowledge you need to go to the Biz and Jobs forum and pay someone.[/quote]

I have no clue; the person who did all this no longer works for the company and I don’t understand the n(lookup) bit - I don’t see anything in the Asterisk documentation about it.

The labels are the “;same =>” lines?

I am a helpdesk tech with the capacity to learn new things quickly. I’ve been at this job for 8 months now and I do a decent job with some of the basic coding needs including SQL, PERL, and VBScript. As far as PBX goes, this is day 5. The whole reason I’m posting here is because I don’t know what I’m dealing with and I need some help learning. If I did know the basics, I’d have enough understanding of the issue to fix the problem. I’m not asking for somebody to write the fix for me, all I need is a shove in the right direction. Links to documentation, working code examples, etc. are all terrific things to have.

I’m just trying to get this thing to start behaving so I can put it into production and THEN I’ll be able to go back and learn it in-depth. We are having phone problems, and we simply can’t afford to anymore. I’m stuck between a rock and a hard place with no time to get out on my own; I need a hand, and that’s why I’m here. If I had the time to develop a basic understanding, I’d probably have solved the issue by now. All I know is that it’s something along the lines of “extension,priority,action” and "IF(CONDITION?TRUE:FALSE), that’s it. I don’t know why there can’t be two lookup lines in there; but I do understand how important it is for the priorities to not overlap…but how do they do that when they’re “n” priorities? Don’t they auto-increment?

That’s about the extent of my progress thus far.

asteriskdocs.org/en/3rd_Edit … ECT-1.html

Note that this code would have never worked.

Ok, so now I see where the issue was for almost all of those, and I have fixed them by removing labels as suggested earlier and by changing the numbering to use “n” instead of a static sequence.

The only exception to this is [macro-outisbusy]; I don’t see a reason why it wouldn’t work, unless the “1” value for the emergency and intracompany entries is a problem. With that said, I see other contexts which use the same logic without any errors. So, can I get a bit of help on that?

Note: The [macro-outisbusy-custom] context doesn’t exist in the extensions_custom.conf file (or any others); should I add this into the config file and simply leave it blank, or should I comment the include line to reduce the amount of work the PBX has to do?

You have (different) definitions for the macro in two different files (extensions.conf and
extensions_additional.conf.

The split into files is not something that comes with Asterisk; it has been imposed by the dialplan designer.

[quote=“david55”]You have (different) definitions for the macro in two different files (extensions.conf and
extensions_additional.conf

The split into files is not something that comes with Asterisk; it has been imposed by the dialplan designer.[/quote]

OOOOOOOOOOOOHHHHHHHHHHHHHHHHHH

Thanks for your help, David. I really do appreciate it :smiley: I’m sure I’ll be back with more problems, but I think this solves most of them for the time being. I’m ready to put it into production for final testing and release now :smiley:

I’ll be back with more questions at some point, I’m sure :smile: