When does sip.conf get replaced / preserving sip.conf

When does sip.conf get replaced? Is it after a freePBX Framework update?

What is the recommended method for preserving sip.conf as I have entries such as externip, localnet and a different bindport - should I put these into a different sip…conf file?

Thanks,
Chris.

The tail end of that file has some includes for other files, I think it’s standard across the board, mine shows:

[code:1]; #, in this configuration file, is NOT A COMMENT. This is exactly
; how it should be.
#include sip_nat.conf
#include sip_registrations_custom.conf
#include sip_registrations.conf
#include sip_custom.conf
#include sip_additional.conf
[/code:1]

So if you put your code in sip_custom.conf, it should survive upgrades.

[quote=“dirk”]The tail end of that file has some includes for other files, I think it’s standard across the board, mine shows:

[code:1]; #, in this configuration file, is NOT A COMMENT. This is exactly
; how it should be.
#include sip_nat.conf
#include sip_registrations_custom.conf
#include sip_registrations.conf
#include sip_custom.conf
#include sip_additional.conf
[/code:1]

So if you put your code in sip_custom.conf, it should survive upgrades.[/quote]

Ah, ok. I’d assumed that it worked the same as extensions.conf and others where if something was already defined that it could not be redefined.

As these includes are at the end and bindport is already set I’d assumed that I couldn’t change it again. I’ll try it…

Thanks
C.

OK, I tried it and it didn’t work.

I created sip_custom.conf and added bindport=5065 but Asterisk still only binds to 5060.

I have to modify the original sip.conf each time.

C.

sip_custom.conf isn’t included in the generated file.

There is however a sip_registrations_custom.conf included that you could put your setting in.

[quote=“Peri”]sip_custom.conf isn’t included in the generated file.

There is however a sip_registrations_custom.conf included that you could put your setting in.[/quote]

You sure? It’s in mine…

it could very well be that i’m just dumb, i missed it somehow amongst the other includes.

What does your sip_custom.conf look like?

[quote=“Peri”]it could very well be that i’m just dumb, i missed it somehow amongst the other includes.

What does your sip_custom.conf look like?[/quote]

All too easily done with all these conf files and includes :frowning:

[code:1]bindport = 5065
externip=81.86.xxx.xxx
localnet=192.168.1.0/255.255.255.0[/code:1]

C.

Do you have a custom context?

You’ll have to put the settings under a context heading and call it from the main file.

[quote=“Peri”]Do you have a custom context?

You’ll have to put the settings under a context heading and call it from the main file.[/quote]

Sorry, I missed that on the copy/paste. I wasn’t sure what context I should use as the normal context is [general] so I put it under the same, [general].

And if I need to add something extra to the main file (sip.conf?) then that will also get overwritten on a module/framework update wouldn’t it?

Perhaps I’m being particularly thick here… :confused:

C.