Pjsip reload problem

Recently installed freepbx 15 after taking it as an iso image.
The interface works fine and i was able to register two accounts and make a call.

I was trying to add an account directly to pjsip.conf file through putty and then try to reload pjsip driver through CLI but that was not going well. It seems that freepbx does not allow editing pjsip.conf file directly!

Is there a way to work things around? Because i still need to be able to edit asterisk config files directly such as pjsip.conf and extensions.conf for my own purposes.

Do u advice me to install freepbx for experts which is as i understood just a web interface and it does not come with asterisk, since i already have an installed asterisk and it is configured? Or the thing i asked about in the above question could be achieved?


Don’t write to that file, use the custom.conf files.

Could i add users to custom.conf ? And how to reload it?

What about dialplan?
Could i write my own at extensions.conf?

There is no built in file called custom.conf. /etc/asterisk/pjsip.conf file refers to several custom files that you can edit as desired. Look at the contents to see how it works. If you edit these files, you can do a reload from the Asterisk command line, with the shell command
fwconsole reload
or with Apply Config from the GUI.

‘New’ dialplan goes in exensions_custom.conf
Dialplan to override FreePBX generated code can go in extensions_override_freepbx.conf, but you are at risk that an update will conflict with what you are overriding.

I recommend that you use custom code only when necessary. For example, if you have 100 Yealink phones configured similarly, use the GUI to get one phone working as desired. Then, export the extension with Bulk Handler, create 99 duplicates with Excel, change the items that vary (extension number, name, external caller ID, etc.) and import the result.

1 Like

If i want to write my dialplan in GUI.
Does it allow me to to write it.
As if it opens extensions.conf file (but from GUI) then i write the dialplan and i submit an apply changes then.
Did you get me?
Since sometimes i need applications in dialplan like trysytem and sendDTMF and others.

Does it allow me to WRITE dialplan but from GUI? In this way i do not need to write directly to the files from extensions.conf.
Another question: if i wrote to the file directly then i reloaded and i did not update my freepbx then everything will be fine?

Yes, you can write your dialplan from the GUI, use the Config Edit Module, as mentioned, you should write it in the extensions_custom.conf file which is being included. Unless you need to override the FreePBX dialplan, then use extensions_override_freepbx.conf

Again, you can write your own dialplan as mentioned, writing to extensions.conf will get removed every time you reload FreePBX.

If you write to extensions_custom.conf you could use the Custom Destination module to point your destinations to your custom dialplan.

The GUI automatically writes a dialplan to extensions_additional.conf. Normally you wouldn’t need to write any custom dialplan, unless you are building something custom like integrations etc.

Can you explain what you mean you did not update your freepbx?
Did you mean: not applying config/reloading FreePBX? Yes everything will be fine until you accidentally reload it.

As mentioned, FreePBX allows you to add your custom stuff in the custom conf files, if you need to override (rarely needed to) use the override conf files. That way you won’t run into issues.

1 Like

By writing you mean it opens a scratch and let me write in it just like i usually write in extensions.conf right?
This should work right?

Then this should not be done!?

Config edit module or custom destination module? Did not get since earlier you said config edit module.

I need my freepbx to work offline so there should be no need to kewping updating into a newer version right?
No i do not mean reloading

I do not think freepbx lets me use all applications something like trysystem app and sendDTMF app and other apps. That is my concern in first place and that is why i am trying to write directly into pjsip.conf and extensions.conf.
So i am afraid that sometime the gui apps wont be enough for me to do what i am trying to do.

Thanks in advance.

As a person who can craft asterisk by hand, all you need to remember is how asterisk reads and orders the dialplan from the files in ASTETCDIR , you will see that FreePBX mostly uses the base *.conf files suplementedthen by *_additional.conf files, while *_overide* files have higher precedent and *custom_* lower,

If you modify almost any file that says “don’t do that” at the top, it will be re-contructed from the mysql tables on a FBX reload, you can ‘dialplan reload’ to read any modification you craft by hand to test your code which WILL pertain until a ‘fwconsole reload or restart’

I suggest you do a clean install FPBX and add your old dialplan piecemeal into the FPBX infrastructure

Given that, FREEPBX allows you to anything you did before with asterisk

1 Like

That was helpful!
So i could still have my own dialplan but all i need to do is make a file and include it in extensions.conf that is what you propose ? Or do you propose to add it to a specific file !? If yes then what is that file because i did not catch it …
Big thanks guys.

Best if you spend some time getting acquainted with how asterisk works and how the dialplan is constructed, Here is a link to a respected Asterisk Definitive document


That way you will know the problems you are facing combining two methods.

1 Like

That must be incredibly helpful.
Thank you i will definetly read it.
But let me ask you these 2 questions just in order try my dialplan on freepbx.
In which file i should add my dialplan and it would not interfere with freepbx?
I know you prefer me to read in order to understand and i am goin to do that for sure. But all i want to do is make a quick try.

One final question:freepbx will work perfectly fine offline right? Even if it needed an update and i did not update it since it is offline? Thanks

That is impossible to answer in any short fashion, you would put your code in whatever file yhat is #included at the appropriate place starting at for example sip.conf or extensions.conf

1 Like

Okay so if i want to add my own dialplan then i must create a file called dialplan.conf for exapmle and then at extensions.conf i should add #include dialplan.conf
That’s it right?

No, read the manual ! :slight_smile:

1 Like

Haha, got it

1 Like

Do you have an answer for that?

Thanks in advance
best regards

Yes, updates usually either fix security, not needed in your case or add function, be aware that without a network any urls used need to be resolvable without DNS.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.