Reload failed with connectdirs error

Hello,

I recently created the file /etc/asterisk/sip_nat.conf

After creating this file I cannot reload freepbx any more. I get the following error:
exit: 1
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
PHP Warning: Missing argument 1 for connectdirs::create(), called in /var/lib/asterisk/bin/retrieve_conf on line 434 and defined in /var/lib/asterisk/bin/retrieve_conf on line 13
Connecting to Asterisk manager interface…OK
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/modules/dahdiconfig/functions.inc.php on line 779
[FATAL] Failed to get engine_info retreive_conf failed to get engine information and cannot configure up a softwitch with out it. Error: ERROR-UNABLE-TO-PARSE
1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.

I’ve removed the file again, tried to run ampportal chown, restarted the server, etc.

Also no calls are working, etc as it doesn’t seem to show any phones, trunks, etc being connected to the server but they are all still setup in the interface. Please help!

Ok. I got it to reload after putting in the hard code line for the asterisk version. However my phones still can’t register and when I go to the Asterisk Info page I get errors like:

No such command ‘sip show peers’ (type ‘core show help sip’ for other possible commands)

No such command ‘show channels’ (type ‘core show help show’ for other possible commands)

No such command ‘sip show channels’ (type ‘core show help sip’ for other possible commands)

My asterisk versions do not seem to be lining up.
cat /etc/asterisk/version
Asterisk 1.6.2.17.3

asterisk -V
Asterisk 1.8.4.2

rpm -qa | grep -i asterisk
asterisk-sounds-moh-opsound-ulaw-0.0-4_centos5
asterisknow-version-1.7.1-2_centos5
asterisk-sounds-core-en-gsm-1.4.20-1_centos5
asterisk18-core-1.8.4.2-1_centos5
asterisk18-skypeforasterisk-1.8.0_1.1.2-1_centos5
asterisk18-voicemail-1.8.4.2-1_centos5
asterisk18-doc-1.8.4.2-1_centos5
asterisk18-1.8.4.2-1_centos5
asterisk-sounds-extra-en-gsm-1.4.11-1_centos5
asterisk-sounds-core-en-ulaw-1.4.20-1_centos5
asterisk18-codec_g729a-1.8.0_3.1.4-1_centos5
asterisk18-dahdi-1.8.4.2-1_centos5

You blew your SIP module up with whatever command you added “manually”

You can check /var/log/asterisk/full for possible culprits.

The SIP commands disappear if SIP is not loaded.

This is the only thing I added to the sip_nat.conf file:

#include sip_custom.conf
externip=***.***.***.***
externrefresh=6
fromdomain=******.*********.net
localnet=192.168.0.0/255.255.255.0
localnet=10.10.10.0/255.255.255.0
nat=yes

I see these two error messages:
[Jun 2 14:22:03] ERROR[2847] config.c: The file ‘sip_nat.conf’ was listed as a #include but it does not exist.
[Jun 2 14:22:03] ERROR[2847] chan_sip.c: Contents of sip.conf are invalid and cannot be parsed

But sip_nat.conf does exist:
ls -al /etc/asterisk/sip_nat.conf
-rw-r–r-- 1 asterisk asterisk 0 Jun 2 15:17 /etc/asterisk/sip_nat.conf

And our sip.conf file looks exactly as it does on our secondary asterisk server.

I added the line #include sip_custom.conf to our sip_nat.conf file and it seems to reload all the sip stuff now, our phones register, but whenever i try to dial an ext I just get “declined”. With this error:
[Jun 3 08:25:07] WARNING[3471] pbx.c: No application ‘Macro’ for extension (from-internal, 1800, 2)
[Jun 3 08:25:07] VERBOSE[3471] pbx.c: == Spawn extension (from-internal, 1800, 2) exited non-zero on ‘SIP/5656-00000000’

I’m also seeing these errors on boot:

[Jun 3 08:12:11] WARNING[2872] loader.c: Error loading module ‘format_mp3.so’: /usr/lib/asterisk/modules/format_mp3.so: cannot open shared object file: No such file or directory
[Jun 3 08:12:14] ERROR[2872] res_stun_monitor.c: Unable to load config res_stun_monitor.conf
[Jun 3 08:12:14] ERROR[2872] res_calendar.c: Unable to load config calendar.conf
[Jun 3 08:12:14] WARNING[2872] loader.c: Error loading module ‘format_mp3.so’: /usr/lib/asterisk/modules/format_mp3.so: cannot open shared object file: No such file or directory
[Jun 3 08:12:14] WARNING[2872] loader.c: Error loading module ‘res_pktccops’: /usr/lib/asterisk/modules/res_pktccops.so: cannot open shared object file: No such file or directory
[Jun 3 08:12:14] WARNING[2872] loader.c: Error loading module ‘chan_mgcp.so’: /usr/lib/asterisk/modules/chan_mgcp.so: undefined symbol: ast_pktccops_gate_alloc
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 39 : disallow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 40 : allow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 62 : disallow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 63 : allow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 85 : disallow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 86 : allow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 126 : disallow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 127 : allow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 149 : disallow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 150 : allow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 172 : disallow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 173 : allow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 195 : disallow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 196 : allow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 218 : disallow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 219 : allow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 261 : disallow =
[Jun 3 08:12:15] WARNING[2872] chan_sip.c: Codec configuration errors found in line 262 : allow =
[Jun 3 08:12:15] WARNING[2872] chan_iax2.c: Error opening firmware directory ‘/var/lib/asterisk/firmware/iax’: No such file or directory
[Jun 3 08:12:15] ERROR[2872] cel_custom.c: Unable to load cel_custom.conf. Not logging CEL to custom CSVs.
[Jun 3 08:12:15] ERROR[2872] cdr_syslog.c: Unable to load cdr_syslog.conf. Not logging custom CSV CDRs to syslog.
[Jun 3 08:12:15] ERROR[2872] cdr_custom.c: Unable to load cdr_custom.conf. Not logging custom CSV CDRs.
[Jun 3 08:12:17] ERROR[2872] pbx_dundi.c: Unable to load config dundi.conf
[Jun 3 08:12:17] ERROR[2872] res_clialiases.c: res_clialiases configuration file ‘cli_aliases.conf’ not found
[Jun 3 08:12:17] ERROR[2872] chan_unistim.c: Unable to load config unistim.conf