How to enable rtp_symmetric and rewrite_contact for pjsip Trunk?

I can’t find any form field to enable rtp_symmetric and rewrite_contact for trunks.

How can I activate it?

Thanks.
Daniel

According to the wiki those settings can only be using on endpoints. Not trunks.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip

Okay, my mistake.

Asterisk is behind a NAT and has an dynamic public ip address. PJSIP works perfect, but registers with the local ip address at the provider. I’m not sure if that’s so fine.

What must be considered with a dynamic public IP address?

You manage this in “Asterisk SIP Settings” in FreePBX.

In “General SIP Settings” I have “External Address” blank.
In “Chan PJSIP Settings” the field “Domain the transport comes from” and “External IP Address” are both blank.
A STUN Server is registered.

I have only a DynDNS Domain. Where can I set this for PJSIP?

PJSIP does not support dynamic domains.

I don’t need support for dynamic domains.

It would be sufficient if anyway the external ip address be found and used (e.g. STUN). Does this pjsip?

Under Asterisk Info → Peers the trunk is listed as endpoint:

Endpoint: (trunk name)

In this case the options should be allowed…

No. That is not the case. Those options are not compatible for trunks.

To be doubly sure about this I contacted one of the lead developers for Asterisk. His reply is below

rtp_symmetric and rewrite_contact only control messages RECEIVED

Therefore setting those for your trunk would have no bearing on what you are trying to fix. Hence. Not compatible.

Okay, thank you for the clarification.

To be sure:
With my dynamic ip address I cannot use pjsip correctly and I should go backward to chan_sip.
Right?