[SOLVED] How to disable directmedia in all pjsip endpoints

Hi Dave,

Default value for directmedia parameter in pjsip is ‘yes’.
From pjsip.conf.sample:

;direct_media=yes ; Determines whether media may flow directly between
; endpoints (default: “yes”)

After configuring a new pjsip extension, a ‘pjsip show endpoint 106’ shows:

direct_media : true
direct_media_glare_mitigation : none
direct_media_method : invite
disable_direct_media_on_nat : false

I’ve made several packet captures and I can say that, by default, the media goes directly between endpoints.
I found a workaround configuring direct_media parameter in pjsip.endpoint_custom_post.conf for each endpoint available.

[106](+)
type=endpoint
direct_media=no

After doing this, I can see the change in the endpoint

direct_media : false
direct_media_glare_mitigation : none
direct_media_method : invite
disable_direct_media_on_nat : false

Now the packet capture shows how the media goes through the asterisk interface.
But it’s not a good solution from an administration point of view.
There is a way to configure it globally? Or using a mask in pjsip.endpoint_custom_post.conf?

Thanks.