Asterisk not reading FreePBX conf files

I have a fresh install of Asterisk and FreePBX.

  • Asterisk:
    dhcpCLI> core show version
    Asterisk SVN-branch-1.8-r299989 built by root @ dhcp on a i686 running Linux on 2011-01-02 16:44:51 UTC
    dhcp
    CLI>

  • FreePBX:

2.8.0.4

I’ve created an extension as well as a SIP Trunk. I’ve verified the configuration has been added to the correct conf files in /etc/asterisk

Trunk:

[root@dhcp asterisk]# grep callwithus *
extensions_additional.conf:OUT_2 = SIP/callwithus
extensions_additional.conf:exten => 2,1,Set(TDIAL_STRING=SIP/callwithus)
extensions_additional.conf:[from-trunk-sip-callwithus]
extensions_additional.conf:include => from-trunk-sip-callwithus-custom
extensions_additional.conf:; end of [from-trunk-sip-callwithus]
sip_registrations.conf:register=XXXXXX:[email protected]

The trunk does not establish and there is no trunk shown in the SIP information in Asterisk.

If I copy the config from sip_additiona.conf to sip.conf and then issue a sip reload in the CLI, the trunk is established.

So, I believe (maybe an incorrect assumption) that Asterisk is not reading the additional FreePBX conf files.

The same should also be noted for an extension that I created. The SIP device could not register until I copied the config into the sip.conf.

I checked file permissions:

-rw-rw-r–. 1 asterisk asterisk 844 Jan 3 21:18 sip_additional.conf
-rw-rw-r–. 1 asterisk asterisk 74660 Jan 3 20:52 sip.conf
-rw-rw-r–. 1 asterisk asterisk 991 Jan 3 21:18 sip_general_additional.conf
-rw-rw-r–. 1 asterisk asterisk 779 Jan 3 21:18 sip_notify_additional.conf
-rw-rw-r–. 1 asterisk asterisk 725 Jan 3 20:36 sip_notify.conf
-rw-rw-r–. 1 asterisk asterisk 463 Jan 3 21:18 sip_registrations.conf

Thanks for the support guys. I ended up resolving this by removing the /etc/asterisk folder and reinstalling asterisk. I then checked that there weere no files in /etc/asterisk. I then started asterisk via the freepbx asterisk_start script. I then installed FreePBX and once I wupdated the config via the GUI the sym link was created. I ‘believe’ the issue I had may have been due to having asterisk creating config files in /etc/asterisk.

It’s supposed to be a symbolic link to the FreePBX files within /var/www:

Skippy, make sure when you reinstall that you are seeing the symbolic link before you move forward. Your directory listing above shows a regular file.

Ok,

I removed /etc/asterisk and rebuilt Asterisk 1.8.1.1 from scratch.

I did an install (make && make install). What was interesting was that once that was complete there were no files in /etc/asterisk

Anyway, I then went and did the amp_install and the following appeared in /etc/asterisk:

[root@dhcp asterisk]# ll
total 136
-rw-rw-r–. 1 asterisk asterisk 335 Jan 4 12:51 asterisk.conf
-rw-rw-r–. 1 asterisk asterisk 696 Jan 4 12:51 cdr_mysql.conf
-rw-rw-r–. 1 asterisk asterisk 696 Jan 4 12:51 cdr_mysql.conf.bak
-rw-rw-r–. 1 asterisk asterisk 715 Jan 4 12:51 chan_dahdi.conf.template
-rw-rw-r–. 1 asterisk asterisk 50 Jan 4 12:51 enum.conf
-rw-rw-r–. 1 asterisk asterisk 2671 Jan 4 12:51 extensions_custom.conf.sample
-rw-rw-r–. 1 asterisk asterisk 1494 Jan 4 12:51 freepbx_featurecodes.conf.template
-rw-rw-r–. 1 asterisk asterisk 1235 Jan 4 12:51 freepbx_menu.conf.template
-rw-rw-r–. 1 asterisk asterisk 730 Jan 4 12:51 freepbx_module_admin.conf
-rw-rw-r–. 1 asterisk asterisk 24419 Jan 4 12:51 indications.conf
-rw-rw-r–. 1 asterisk asterisk 917 Jan 4 12:51 logger.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 manager_additional.conf
-rw-rw-r–. 1 asterisk asterisk 912 Jan 4 12:51 manager.conf
-rw-rw-r–. 1 asterisk asterisk 917 Jan 4 12:51 manager.conf.bak
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 manager_custom.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 meetme_additional.conf
-rw-rw-r–. 1 asterisk asterisk 40 Jan 4 12:51 meetme.conf
-rw-rw-r–. 1 asterisk asterisk 1774 Jan 4 12:51 modem.conf
-rw-rw-r–. 1 asterisk asterisk 2393 Jan 4 12:51 modules.conf
-rw-rw-r–. 1 asterisk asterisk 127 Jan 4 12:51 musiconhold_additional.conf
-rw-rw-r–. 1 asterisk asterisk 208 Jan 4 12:51 musiconhold.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 musiconhold_custom.conf
-rw-rw-r–. 1 asterisk asterisk 1418 Jan 4 12:51 phone.conf
-rw-rw-r–. 1 asterisk asterisk 90 Jan 4 12:51 phpagi.conf
-rw-rw-r–. 1 asterisk asterisk 81 Jan 4 12:51 privacy.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 queues_additional.conf
-rw-rw-r–. 1 asterisk asterisk 522 Jan 4 12:51 queues.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 queues_custom.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 queues_custom_general.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 queues_general_additional.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 queues_post_custom.conf
-rw-rw-r–. 1 asterisk asterisk 282 Jan 4 12:51 rtp.conf
-r–rw-r–. 1 asterisk asterisk 16 Jan 4 12:51 version
-rw-rw-r–. 1 asterisk asterisk 558 Jan 4 12:51 vm_email.inc
-rw-rw-r–. 1 asterisk asterisk 1835 Jan 4 12:51 vm_general.inc
-rw-rw-r–. 1 asterisk asterisk 67 Jan 4 12:51 voicemail.conf
-rw-rw-r–. 1 asterisk asterisk 67 Jan 4 12:51 voicemail.conf.template
-rw-rw-r–. 1 asterisk asterisk 699 Jan 4 12:51 zapata.conf.template
[root@dhcp asterisk]#

Note that there is no sip.conf

Once I logged in though to amp portal and wrote the config they all appeared. So, I think this may have been an issue with putting in existing sip.conf from Asterisk (owned by root) and then when amp portal tried to create the files including the sym links it failed. After downloading the config via the portal, I now have:

[root@dhcp asterisk]# ll /etc/asterisk/
total 256
-rw-rw-r–. 1 asterisk asterisk 335 Jan 4 12:51 asterisk.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 cdr.conf
-rw-rw-r–. 1 asterisk asterisk 696 Jan 4 12:51 cdr_mysql.conf
-rw-rw-r–. 1 asterisk asterisk 696 Jan 4 12:51 cdr_mysql.conf.bak
-rw-r–r--. 1 asterisk asterisk 418 Jan 4 12:58 chan_dahdi_additional.conf
-rw-rw-r–. 1 asterisk asterisk 715 Jan 4 12:51 chan_dahdi.conf.template
-rw-rw-r–. 1 asterisk asterisk 50 Jan 4 12:51 enum.conf
-rw-r–r--. 1 asterisk asterisk 72973 Jan 4 12:58 extensions_additional.conf
lrwxrwxrwx. 1 asterisk asterisk 52 Jan 4 12:58 extensions.conf -> /var/www/html/admin/modules/core/etc/extensions.co
nf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 extensions_custom.conf
-rw-rw-r–. 1 asterisk asterisk 2671 Jan 4 12:51 extensions_custom.conf.sample
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 extensions_override_freepbx.conf
-rw-r–r--. 1 asterisk asterisk 418 Jan 4 12:58 features_applicationmap_additional.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 features_applicationmap_custom.conf
lrwxrwxrwx. 1 asterisk asterisk 50 Jan 4 12:58 features.conf -> /var/www/html/admin/modules/core/etc/features.conf
-rw-r–r--. 1 asterisk asterisk 466 Jan 4 12:58 features_featuremap_additional.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 features_featuremap_custom.conf
-rw-r–r--. 1 asterisk asterisk 433 Jan 4 12:58 features_general_additional.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 features_general_custom.conf
-rw-rw-r–. 1 asterisk asterisk 1494 Jan 4 12:51 freepbx_featurecodes.conf.template
-rw-rw-r–. 1 asterisk asterisk 1235 Jan 4 12:51 freepbx_menu.conf.template
-rw-rw-r–. 1 asterisk asterisk 730 Jan 4 12:51 freepbx_module_admin.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 globals_custom.conf
-rw-r–r--. 1 asterisk asterisk 418 Jan 4 12:58 iax_additional.conf
lrwxrwxrwx. 1 asterisk asterisk 45 Jan 4 12:58 iax.conf -> /var/www/html/admin/modules/core/etc/iax.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 iax_custom.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 iax_custom_post.conf
-rw-r–r--. 1 asterisk asterisk 488 Jan 4 12:58 iax_general_additional.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 iax_general_custom.conf
-rw-r–r--. 1 asterisk asterisk 418 Jan 4 12:58 iax_registrations.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 iax_registrations_custom.conf
-rw-rw-r–. 1 asterisk asterisk 841 Jan 4 12:58 indications.conf
-rw-r–r--. 1 asterisk asterisk 418 Jan 4 12:58 localprefixes.conf
-rw-rw-r–. 1 asterisk asterisk 917 Jan 4 12:51 logger.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 manager_additional.conf
-rw-rw-r–. 1 asterisk asterisk 912 Jan 4 12:51 manager.conf
-rw-rw-r–. 1 asterisk asterisk 917 Jan 4 12:51 manager.conf.bak
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 manager_custom.conf
-rw-rw-r–. 1 asterisk asterisk 418 Jan 4 12:58 meetme_additional.conf
-rw-rw-r–. 1 asterisk asterisk 40 Jan 4 12:51 meetme.conf
-rw-rw-r–. 1 asterisk asterisk 1774 Jan 4 12:51 modem.conf
-rw-rw-r–. 1 asterisk asterisk 2393 Jan 4 12:51 modules.conf
-rw-rw-r–. 1 asterisk asterisk 127 Jan 4 12:51 musiconhold_additional.conf
-rw-rw-r–. 1 asterisk asterisk 208 Jan 4 12:51 musiconhold.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 musiconhold_custom.conf
-rw-rw-r–. 1 asterisk asterisk 1418 Jan 4 12:51 phone.conf
-rw-rw-r–. 1 asterisk asterisk 90 Jan 4 12:51 phpagi.conf
-rw-rw-r–. 1 asterisk asterisk 81 Jan 4 12:51 privacy.conf
-rw-rw-r–. 1 asterisk asterisk 418 Jan 4 12:58 queues_additional.conf
-rw-rw-r–. 1 asterisk asterisk 522 Jan 4 12:51 queues.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 queues_custom.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 queues_custom_general.conf
-rw-rw-r–. 1 asterisk asterisk 440 Jan 4 12:58 queues_general_additional.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 4 12:51 queues_post_custom.conf
-rw-r–r--. 1 asterisk asterisk 67 Jan 4 12:58 res_fax.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 res_fax_custom.conf
-rw-r–r--. 1 asterisk asterisk 54 Jan 4 12:58 res_fax_digium.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 res_fax_digium_custom.conf
-rw-rw-r–. 1 asterisk asterisk 282 Jan 4 12:51 rtp.conf
-rw-r–r--. 1 asterisk asterisk 844 Jan 4 12:58 sip_additional.conf
lrwxrwxrwx. 1 asterisk asterisk 45 Jan 4 12:58 sip.conf -> /var/www/html/admin/modules/core/etc/sip.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 sip_custom.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 sip_custom_post.conf
-rw-r–r--. 1 asterisk asterisk 991 Jan 4 12:58 sip_general_additional.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 sip_general_custom.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 sip_nat.conf
-rw-r–r--. 1 asterisk asterisk 779 Jan 4 12:58 sip_notify_additional.conf
lrwxrwxrwx. 1 asterisk asterisk 52 Jan 4 12:58 sip_notify.conf -> /var/www/html/admin/modules/core/etc/sip_notify.co
nf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 sip_notify_custom.conf
-rw-r–r--. 1 asterisk asterisk 463 Jan 4 12:58 sip_registrations.conf
-rw-r–r--. 1 asterisk asterisk 0 Jan 4 12:58 sip_registrations_custom.conf
-r–rw-r–. 1 asterisk asterisk 16 Jan 4 12:51 version
-rw-rw-r–. 1 asterisk asterisk 558 Jan 4 12:51 vm_email.inc
-rw-rw-r–. 1 asterisk asterisk 1835 Jan 4 12:51 vm_general.inc
-rw-rw-r–. 1 asterisk asterisk 67 Jan 4 12:51 voicemail.conf
-rw-rw-r–. 1 asterisk asterisk 67 Jan 4 12:51 voicemail.conf.template
-rw-rw-r–. 1 asterisk asterisk 699 Jan 4 12:51 zapata.conf.template
[root@dhcp asterisk]#

Now things are looking better, but I seem to have an issue in that Asterisk is not listening on 5060… I should be able to figure that out though as that seems like a freepbx config issue.

There are no includes in sip.conf so until that is fixed nothing will work.

I do not understand why install_amp did not reinstall, you may need to delete /etc/asterisk and start all over again.

Did you ever change sip.conf ?

You never edit the “additional” files as they are re-written every time asterisk is reloaded. Put your “custom” stuff in the “custom” files.

@SkykingOH : I installed Asterisk and then installed FreePBX by running install_amp

@w5waf : I’m aware of that. however, as I was having an issue with Asterisk I tried temporarily manually configurring to help eliminate certain things.

I’ve just attempted another install of install_amp.

Still the same issue. Not sure if any of this info helps:

[root@dhcp asterisk]# pwd
/etc/asterisk
[root@dhcp asterisk]# grep sip_additional.conf *
[root@dhcp asterisk]# grep ‘#include’ *
chan_dahdi.conf.template:#include chan_dahdi_additional.conf
cli_aliases.conf:;#include "/etc/asterisk/aliases"
extensions_additional.conf:#include globals_custom.conf
extensions.conf:; You can include other config files, use the #include command
extensions.conf:; that includes contexts within other contexts. The #include command works
extensions.conf:;#include "filename.conf"
extensions.conf:;#include <filename.conf>
extensions.conf:;#include filename.conf
manager.conf:#include manager_additional.conf
manager.conf:#include manager_custom.conf
manager.conf.bak:#include manager_additional.conf
manager.conf.bak:#include manager_custom.conf
meetme.conf:#include meetme_additional.conf
musiconhold.conf:#include musiconhold_custom.conf
musiconhold.conf:#include musiconhold_additional.conf
queues.conf:#include queues_general_additional.conf
queues.conf:#include queues_custom_general.conf
queues.conf:#include queues_custom.conf
queues.conf:#include queues_additional.conf
queues.conf:#include queues_post_custom.conf
res_fax.conf:#include res_fax_custom.conf
res_fax_digium.conf:#include res_fax_digium_custom.conf
voicemail.conf:; not currently work with the "#include " directive for Asterisk
voicemail.conf.template:#include vm_general.inc
voicemail.conf.template:#include vm_email.inc
zapata.conf.template:#include zapata_additional.conf
[root@dhcp asterisk]#

what #includes are missing? is this a fault of the install_amp installer or is it user error in the order I have installed everthing? My understanding was Asterisk followed by FreePBX.

How did you install FreePBX?

Sounds like you overwrote the sip.conf from FreePBX that #INCLUDES all the other files.

Suggest rerunning install_amp to rewrite config and get everything back to a known good configuration.

Doing this is generating some errors like

[2012-07-04 15:29:25] ERROR[6632]: res_config_ldap.c:1627 parse_config: Cannot load configuration file: res_ldap.conf
[2012-07-04 15:29:25] NOTICE[6632]: res_config_ldap.c:1592 reload: Cannot reload LDAP RealTime driver.
[2012-07-04 15:29:25] WARNING[6632]: app_minivm.c:2876 load_config: Failed to load configuration file. Module activated with default settings.
[2012-07-04 15:29:25] ERROR[6632]: cel_custom.c:89 load_config: Unable to load cel_custom.conf. Not logging CEL to custom CSVs.
[2012-07-04 15:29:25] ERROR[6632]: cdr_custom.c:90 load_config: Unable to load cdr_custom.conf. Not logging custom CSV CDRs.
[2012-07-04 15:29:25] WARNING[6632]: cdr_adaptive_odbc.c:100 load_config: Unable to load cdr_adaptive_odbc.conf. No adaptive ODBC CDRs.
[2012-07-04 15:29:25] NOTICE[6580]: chan_mgcp.c:4625 reload_config: Unable to load config mgcp.conf, MGCP disabled
[2012-07-04 15:29:25] NOTICE[6632]: app_queue.c:6469 reload_queue_rules: No queuerules.conf file found, queues will not follow penalty rules
[2012-07-04 15:29:25] ERROR[6632]: res_clialiases.c:183 load_config: res_clialiases configuration file ‘cli_aliases.conf’ not found

And these files are present in the previous asterisk folder. What to do about this.???

abhittd - Do not hijack and old post and change the subject.

Please start a new thread and provide more detail on issue.

1 Like