I’ve got a strange problem. I’d installed asterisk 1.4.2 and freepbx 2.2.1. (yeah I know some features are broken that way, was willing and able to deal with most of them)
Ran into a situation where Freepbx wouldn’t create SIP trunks correctly - it created the inbound portion fine but never wrote the outbound. The only way I could get it working was manually entering the trunk config in sip_custom.conf and commenting out the inbound context in sip_additional.conf.
Then I finally decided to downgrade. Built and installed asterisk 1.2.17, then rebuilt and reinstalled freepbx 2.2.1, installed freepbx modules, then restored backup.
Now FreePBX still writes broken sip_additional.conf, lacking the outbound SIP trunk config. But WORSE: Everytime FreePBX updates config files, extensions_additional.conf is about 10 lines long!?!?! All our IVRs, ring groups, etc, are all missing. I’ve had to restore extensions_additional.conf manually from the backup tarball and hand-edit to bring it ‘up to date’ with changes made in freepbx. (then flag sip_add and ext_add as read-only to prevent freepbx from breaking them again)
WTF have I done to it??? And How can I fix it, preferably short of a complete ground-up reinstall.
System is Mandriva linux, asterisk 1.2.17, zaptel 1.2.16, Freepbx 2.1.1.
I’ve reinstalled 2.2.1 twice, the second time I wiped out freepbx first. (all but DB) Previous PBX was trixbox - I’d upgraded that from 1.3 to 2.0, but I’m almost certain that the current box I reconfigured from scratch, not restoring a backup. (I followed the same path for my home server - from trixbox vmware to asterisk+freepbx on mandriva - but that one I’m pretty sure is when I restored the trixbox backup)
I don’t see a log file for freepbx itself, though you mentioned one above. Where is it/should it be?
it sounds like it would need some poking around. If it is writing out only partial files then it would more likely be database corruption or something. However - database corruption would typically be seen in the gui as well. You may just want to try to reinstall 2.2.1 - make sure you do --force-version 2.1.3 (or earlier if you updated from something earlier - but latest 2.1.3). That willmake sure it deals with schema changes correctly.
Nobody has any ideas? I’ve tried another freepbx 2.2.1 reinstall and it’s still broken. It’s a PITA having to hand-edit freepbx-generated configs to add extensions and modify ring groups after I’ve added them in freepbx.
is nothing getting written out the the _additonal files? If that is the case, check to make sure you don’t have a sql password that has special characters. I think there is an issue in the parser that is used by the web part of the app and one that is used by retrieve_conf (that generates those files) that needs to be cleaned up. It’s on the list to look at.
Also - check the freepbx and retreive_conf logs to see if they shed any light.
No unusual password - ‘ampme’ - I can manually (console) log in to mysql with ‘asteriskuser’ and ‘ampme’, the user/pass configured in amportal.conf, and run queries on the asterisk DB.
‘sip_additional.conf’ is written out fine, with one significant exception: SIP trunks. ‘Incoming Settings’ and registration are written out to sip_additional.conf, but ‘Outgoing Settings’ aren’t written anywhere.
Below is the COMPLETE extensions_additional.conf that freepbx keeps writing:
[code:1]; do not edit this file, this is an auto-generated file by freepbx
; all modifications must be done from the web gui
include => from-internal-additional-custom
exten => h,1,Hangup
; end of [from-internal-additional]
Obviously this presents something of a problem…
And this is freepbx-retrieve.log:
[code:1]Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf…OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
Please Reload Asterisk by visiting http://172.18.0.1/admin[/code:1]
As things stand right now, I have my SIP trunk defined in sip_custom.conf and whenever freepbx writes configs I need to go in and comment out the pieces it writes in sip-additional. But for extensions_additional.conf, the only thing I can do is keep the file read-only and implement any changes by hand.
I just noticed you are using Mandriva. Have you checked aussievoip to see if there are specific instructions for Mandriva? Have you checked that all directories and files related to freepbx/asterisk need to be owned by asterisk? I am not familiar with Mandriva so I may be of limitted help. Is the file system layout and different then CentOS?
/etc/asterisk and /var/www/html/admin (and most of /var/www/html) is owned by asterisk.asterisk, and apache is running as user asterisk. Aussievoip doesn’t have anything mandriva-specific that I can find.
Mandriva is very close to centos/redhat in most regards. RPM based distro, filesystem organization and most subsystems are almost indistinguishable. (Mandrake was originally a derivative of redhat, IIRC - they still use /etc/redhat-release)
Everything seemed to work fine for a while when first installed, I’m not able to identify anything that immediately preceded the troubles. I’m also running asterisk and freepbx 2.2.1 on a mandriva box at home with no problems.