How to fix Asterisk directory path

1

I have asterisk 11 installed on Centos. Everything was working fine till yesterday. I was installing mysql and using for connection. I have it working and my cdr are now nicely posted into mysql db. But in the process of getting getting ODBC working I had to rebuild the installation and somehow created a new problem.

The path to sound files (and other stuff like agi-bin) is now screwed up. I NOW get an error that it can find unless I specify the path.

exten => 200,1,Answer()
    same => n,Playback(hello-world)
   ; same => n,Playback(/var/lib/asterisk/sounds/en/hello-world)
    same => n,Hangup()

Same problem with agi-bin: It is trying to find files at /usr/share/asterisk/agi-bin/CA_via_Asterisk.py when it should be looking at /var/lib/asterisk/agi-bin/CA_via_Asterisk.py

asterisk.conf looks like this (which is the way it was before)

 [directories](!)
 stetcdir => /etc/asterisk
 astmoddir => /usr/lib64/asterisk/modules
 astvarlibdir => /var/lib/asterisk
 astdbdir => /var/lib/asterisk
 astkeydir => /var/lib/asterisk
 astdatadir => /var/lib/asterisk
 astagidir => /var/lib/asterisk/agi-bin
 astspooldir => /var/spool/asterisk
 astrundir => /var/run/asterisk
 astlogdir => /var/log/asterisk
 astsbindir => /usr/sbin

I suppose I messed something up when I rebuilt it. But I don't know what i might have done.

Some guidance would be greatly appreciated.

Thanks, stu

stu

Posted 2017-07-11T01:35:16.067

Reputation: 11

I was adding ODBC so I could connect asterisk to Mysql. I had to do a rebuild of Asterisk to add several ODBC related module into the core. – stu – 2017-07-11T01:37:23.177

problem resolved - make sure you run config script after build – stu – 2017-07-13T03:39:38.213

No answers