TIPS ODBC Conflict

jebradley

Member
Joined
Oct 30, 2007
Messages
36
Reaction score
0
I recently upgraded my home system to the "Incredible PBX" version from an earlier PIAF version and have run into a conflict.

I had previously used extensions 222 and 223 on my system, and to avoid changes that would require relearning something (as you get older ...) I set things up with the same extension numbers. Unfortunately the ODBC system conflicts with these two numbers. Can I just erase the information in the odbc.conf file, or what needs to be done to eliminate this conflict?

On another note, the FreePBX shell is at 2.6, and the module upgrade lists 2.7 as available. Should I upgrade the modules? How often should things be upgraded, since some upgrades are to improve security?

Thanks.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,220
Renumber the 222 and 223 lines in /etc/asterisk/extensions_custom.conf.

Upgrading FreePBX is probably not a good idea unless there is some feature you really need. If you don't know, you probably don't need it. :wink5: FreePBX 2.6 and 2.7 are no more secure than 2.5.
 

jebradley

Member
Joined
Oct 30, 2007
Messages
36
Reaction score
0
The problem is with the odbc.conf file, because when I try to dial the 222 and 223 extensions I get the message, "Please enter the 5 digit employee number." The odbc.conf file uses both those extensions, and no others. The extensions work fine to dial out, but you can't dial in to those extensions (222, 223).

The extensions_custom.conf doesn't have anything related to extensions 222 or 223 (cat ext*custom.conf |grep 222 (and 223) return blank.

The extensions_additional.conf file has info for extensions 222 and 223 which match the info for the working line 221 and 224.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,220
Sorry. Did you actually look at the file? You'll see this line at the top of extensions_custom.conf:

#include odbc.conf

It does just what it says.

So you go look there and you'll see this:

root@pbx:/etc/asterisk $ cat odbc.conf

exten => 222,1,Answer
exten => 222,n,Wait(2)
exten => 222,n,Flite("Please enter the 5 digit employee number.")
exten => 222,n,Read(EMPNUM,beep,5)
exten => 222,n,NoOp(EMPNUM: ${EMPNUM})
exten => 222,n,Set(EMPNAME=${ODBC_TIMECLOCK(${EMPNUM})})
exten => 222,n,GotoIf($["${EMPNAME}foo" = "foo"]?notfound)
exten => 222,n,Flite("The employee name is ${EMPNAME}. Good bye.")
exten => 222,n,NoOp(Employee: ${EMPNAME})
exten => 222,n,Hangup
exten => 222,n(notfound),Flite("No such employee on file. Good bye.")
exten => 222,n,Hangup

exten => 223,1,Answer
exten => 223,n,Wait(2)
exten => 223,n,Flite("Please enter the 3 digit astradex dial code.")
exten => 223,n,Read(DIALCODE,beep,3)
exten => 223,n,NoOp(DIALCODE: ${DIALCODE})
exten => 223,n,Set(USERDATA=${ODBC_ASTERIDEX(${DIALCODE})})
exten => 223,n,GotoIf($["${USERDATA},foo" = ",foo"]?notfound)
exten => 223,n,Set(USER=${CUT(USERDATA|\,|1)})
exten => 223,n,Set(PHONE=${CUT(USERDATA|\,|2)})
exten => 223,n(theanswer),Flite("The number for ${USER} is: ${PHONE}. To place the call: press 1. To repeat the information: press 2.")
exten => 223,n,NoOp(Entry: ${USER} - ${PHONE})
exten => 223,n,Read(REPEAT,beep,1)
exten => 223,n,GotoIf($["${REPEAT}" = "2"]?theanswer)
exten => 223,n,GotoIf($["${REPEAT}" = "1"]?dialit)
exten => 223,n,Flite("Have a nice day. Good bye.")
exten => 223,n,Hangup
exten => 223,n(notfound),Flite("No matching entry on file. Good bye.")
exten => 223,n,Hangup
exten => 223,n(dialit),Flite("Calling ${USER}: One moment please.")
exten => 223,n,Dial(local/${PHONE}@from-internal)
exten => 223,n,Hangup

Should be pretty obvious what to do if 222 and 223 aren't the extensions you want to use for ODBC. Once you make the changes, you save the file and reload your dialplan:

asterisk -rx "dialplan reload"
 

jebradley

Member
Joined
Oct 30, 2007
Messages
36
Reaction score
0
I was specifically looking for references to 'exten => 222' when I looked at the file.

I initially asked the question because many of the .conf files aren't to be edited directly. Since odbc.conf didn't have the header about editing, I should have assumed that I could edit it directly.
 

Members online

No members online now.

Forum statistics

Threads
25,810
Messages
167,755
Members
19,240
Latest member
nikko
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top