I need to add a config option to some endpoints created into pjsip.endpoint.conf, more specifically rtp_timeout_hold and rtp_timeout options, because I am having issues with extensions recording long intervals of MOH and it’s eating a lot of disk space.
I’ve solved this issue by adding $endpoint = “rtp_timeout_hold=120”; $endpoint = “rtp_timeout=60”; to line 975 in the PJSip.class.php located at /var/www/html/admin/modules/core/functions.inc/drivers/.
This brings other problems like module signing and no control over which extension this should be enabled. I also don’t know how asterisk will behave if this option is set with endpoints participating in a native_rtp scenario. Since I need to record all calls, this should not pose a problem.
So, what’s the best way to add an option to the GUI of the PJSIP extensions that will be used to generate the pjsip.endpoint.conf accordingly?
Other related question: Is it possible to modify modules in FreePBX and have them signed to that machine? I know that I can disable the warning, but I wonder if I could sign it for my use, I would be warned if someone else changed the code without my knowledge.
Your help will be very much appreciated, Thanks guys.
Billsimon, thank you very much, I have an idea that should make easier to manage: I could create a custom module that populate pjsip.endpoint_custom_post.conf with the structure you mentioned. Better yet if I could create a module that would add the option to the advanced tab of a pjsip extension (like extension routes module do). Do you know if it’s possible to do it?
@billsimon, one thing to watch out for when making custom entries like that is to remember to remove the entry when you delete the extension.
Otherwise if your setting is overwriting a Freepbx default then all the extensions for which you have an entry in the custom config file, that are below the one for which the extension was deleted but the custom entry left, will take the Freepbx default again and lose their custom one.
Not sure if this applies to specific settings only, but I ran into this couple of times with media_address.