I found that the latest distro/FreePBX core release does not set PJSIP transport tos or endpoint tos_audio/tos_video and as far as I can see doesn’t allow for a webgui method of setting these parameters.
As result all SIP and RTP traffic from the PBX is not and can not be prioritized on the network when using PJSIP, which is bad practise.
A temporary workaround is changing modules/core/functions.inc/pjsip.class.php at lines 428 and 752 for respectively trunks and endpoints. Further adding the SIP tos parameter for both transports to /etc/asterisk/pjsip.transports_custom_post with ….
Would be great to see custom (or dedicated) FreePBX fields for PJSIP as they exist for chan_sip in the future.
It’s noteworthy that endpoints need individual tos params, but would hate to have to set it per extension.
Sidestepping, but: is there a generic gui way to alter extensions default settings?
This has been requested, but rejected, at least for now. The slightest mis-configuration of pjsip causes asterisk to unload the pjsip module(s) creating havoc. Custom user settings will be confined to the *custom.conf files for the time being.
I was trying to play with pjsip.endpoint_custom_post.conf and pjsip.transport_custom_post.conf files but with no success. (Edit: originally I stated *_custom.conf, but this was a mistyping)
FreePBX13 + Asterisk 13 official distibution with all updates installed.
Transport:
[0.0.0.0-udp]
type=transport
tos=cs3
cos=3
causes PJSIP fail to load
Endpoint:
[## endpoint ##]
type=endpoint
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
Does nothig - TOS fields are still 0.
Generally in FreePBX, the *custom.conf files are intended for users to add their own contexts, and *post.conf files are intended to modify FreePBX generated contexts. To use the pjsip conf files for adding your own parameters to existing generated contexts, do the following:
Locate the conf file in /etc/asterisk/ that contains the context which you wish to modify. Make a note of the file name and the context.
Locate the corresponding *post.conf file to the file from step 1.
If the context you wish to modify is called [2014] in file pjsip.endpoint.conf, then to the file pjsip.endpoint_custom_post.conf, you add the lines:
HI ,
thank you for your post, and it works fine. But… Is there a way to set tos_audio globally and not each extension? I have a lot of extensions and it could be much easier…
Assuming the context settings for those are named correctly, that should work fine as long as the trunks settings carry down to the extensions. Your syntax seems to be correct.