Adding new SIP extension does not add SIP peer (and should it ?)

I’m adding a sip extension but it seem that it’s just added in the asterisk database and not in SIP peers (sip show peers). If I place the configuration in sip.conf everything works as expected, the peers shows in “sip show peers” and I’m able to connect via Ekiga.
I’m kind of stuck and I’m not exactly sure if I should add extension for the softphone or trunk ?
Regards.

you have not provided any real details. What version of things are you running. Did you just add a extension and not click on the orange or “red” bar to apply changes? if you have not then nothing was generated until after you do that.

Also you should not EVER edit the sip.conf file. For more information on that please see: http://freepbx.org/configuration_files

If you are using the latest 2.4.x or later you should have seen the comment that you should NOT edit this file and to see that location for further information. The sip extensions are placed into a different file: sip_additional.conf. which you should also NOT edit.

I’m using 2.5.1 and it is even updated to the latest modules versions, and yes I’m applying changes after I add the extension with that bar on top and the frog eats the fly ;). I edited sip.conf for a testing purposes, to see if asterisk/sip is working at all and the test show that it is, it’s just that FreePBX is not applying SIP changes for some reason.

PS: Thanks for the link, it looks it may hold the answer :slight_smile:

without a lot more details it’s almost impossible to help you. I know for a fact that it does generate the files needed and loaded them otherwise 95% of all systems would not work.

How was this system built? asterisk version, etc… they more you tell us the more we can help.

For starters its a FreeBSD with asterisk 1.6, and I’m starting to think that some hard coded leftover in some module that is not updated to read from amportal.conf the ASTETCDIR is responsible for the problem :(. I’m now exploring that possibility.

Ah, FreeBSD. ok I’ve not used that distro but that is one of the hardest ones to get working properly with asterisk. It uses a different file structure layout then all other linux distros. Please provide a link to the directions you followed, as how it’s setup is important, and any things you did different then those directions. one simple example is, apache running as the user asterisk?

You really need to provide a complete list of specifics upfront when you post a question. otherwise you’ll be answering these questions over and over.

I’m going to say it’s probably a permissions problem of some form if it’s not updating the files properly.

FreeBSD is NOT Linux :slight_smile: its completely different OS a bit like Gentoo compared to linux distros and asterisk actually works fine and had no problems setting up at all (it works for more than a year with almost no touching). The problems come with some of the support files in FreePBX which do not obey amportal.conf setting and use a hard coded ones. As far as I saw around google even Ubuntu uses different layout then those hard coded ones. The apache is running with user ‘www’ but group ‘asterisk’ which group is allowed to write every single file which has something to do with asterisk or FreePBX. The only lead I got is this in FreePBX log:

Failed to copy from module agi-bin
Retrieve conf failed to copy file(s) from a module’s agi-bin dir:
chmod(): Operation not permitted
chmod(): Operation not permitted
chmod(): Operation not permitted
chmod(): Operation not permitted
chmod(): Operation not permitted
chmod(): Operation not permitted
chmod(): Operation not permitted
chmod(): Operation not permitted

Added 15 hours, 4 minutes ago
(retrieve_conf.CPAGIBIN)

But that was 15h ago and I did a lot of changes since then and lot of commits of those changes. Can you tell me which file do the the actual commit to asterisk file ?

Many of them do, it’s not just one (the core, framework, and each active module). The “chmod(): operation not permitted” means there is a permission problem someplace and it can’t change the settings on at least some the files. That will be the root issue. IF it can’t change some file then it can’t write to it.

Yes I know , but that seems to have happened early in the installation process before I chowned/chmoded all of the dirs/files. And that problem seems to have gone away after I did that. Looking at the sources I found out that many many many files were not converted to honor the amportal.conf settings and it looks like a big mess :). I really want to help cleaning (updating) this files so the actually use the FreePBX settings not their own (and wrong) ones. Who I should contact if I want to help clean up the things ? Judging by the sources it seems that somebody is already doing that cleaning file by file I want to help him :).

if you come across code that is still hard coding paths vs. using the settings in amportal.conf, feel feel free to file bugs to address them. If you include a patch that fixes it, it will probably be reviewed and hopefully applied even quicker.

Starting right now. I already patched some of the files , but they were overwritten by the updates but I’ll do it again and will file bug reports with patches.

I just updated the patch for freepbx_engine pidof to include and hard coded paths fix.
http://support.freepbx.org/trac/attachment/ticket/3639/freepbx_engine.pidof%2Bharcoded_fix.diff

Great Job - Asterisk is in the BSD ports collection and works great.

It would be slick to have FreePBX in the ports collection also.

BSD was around long before Linux and it is still a very relevant platform.

Relevant it is, I have more than 90 servers and about 80 are FreeBSDs, some linuxes and a few windows servers. But the most important thing I want to achieve is not just FreeBSD compatibility but making FreePBX multi-platform compatible (at least for POSIX systems) and the way to make that happen is to make a more configurable installation script (which I almost did for my local installation). And executable scripts should use /usr/bin/env [interpreter] and not directly the interpreter because on linux /bin/sh is actually bash and on BSDs its really ‘sh’ and not bash (and some scripts expect it to be bash …). It would have been easy to make the port just change the interpreters to actual ones but after updating FreePBX everything will fail again which is probably why there is no FreeBPX port for the moment. It’s to linux dependent and probably even CentOS dependent and I really want to make it more compatible and I already started doing by filling bug reports about some hard coded paths including patches :slight_smile:

Regards