Where to access "Default" options

trying to tackle an annoyance i’ve had with PJSIP.

I see many of the default options are set via
getDefaultDeviceSettings($id, $displayname, &$flag)

and on many of the settings, it uses $this->freepbx->Config->get('DEVICE_CALLGROUP'),

I haven’t been able to find any reference (yet) as to where Contig->get searches, or how to find those variables.
Heck, I cant even find that variable via grep on my server.

tldr: I want to pull max_contacts into a configurable variable, instead of forcing it to 1 by default.

Anyone able to provide a breadcrumb as to where variables like the above would be stored / made editable?

Advanced Settings - Device Settings

that doesnt work for adding a new variable that doesn’t exist yet.

surely this is in a config file or database somewhere, which is Read by the code I am referring to.

Sorry, really have no idea what you are asking. I understood you wanted to know where the device defaults were set. The advanced settings page sets the value in the database (asterisk.freepbx_settings).

Entirely fair.

I am trying to create a NEW default value (changeable) to replace something that is currently hard-coded to be 1.

When you create a new pjsip extension, max_contacts will be set to 1.

That’s an extra step for every extension to change this, when a system default value (for new extensions) would streamline that.

My opinion would be to set the default there in the section I mentioned. (new key in the freepbx_settings table, changeable in the Advanced Settings screen)

Then in the extensions part of the core module, use the default setting from the table rather than the hard coded value that is currently there.

Caveat: I am not a FreePBX core developer. I do not know whether this way of doing defaults is the current best practice. Evidently this is how it was done in the past.

1 Like

That is a great breadcrumb. I will investigate that later this week. Thank you for the ideas !

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