Disable "rport" in Via header using PJSIP

I have an issue when I take an outgoing call(sending INVITE) with pjsip.
Could you like to answer or give comments?

I can not take an outgoing call with pjsip.
I guess the cause is including “rport” string in Via header in INVITE message.
Thus, I need the way to remove/disable it.
I investigate with a few documents and comment in this community, and I found the following.

So I tried setting as the following at pjsip.conf.

type = system
disable_rport = yes
type = endpoint
rtp_symmetric = no
force_rport = no
rewrite_contact = no

Saddly enough, my asterisk sends “rport” string in Via header in INVITE message although I set the above.

Would you like to tell me the ussue of my pjsip.conf?
Or, let me know the way to remove “rport”, if my understanding is incorrect.

–additional information–
I have been trying to use asterisk in my home connected to Japanese phone network.
(The network is called as “NTT”, “Flets”, or “Hikari Denwa”.)
I already get the success of register, receiving the call, and taking the outgoing with sip.conf.
And I get the success of register and receiving with pjsip.conf.
I guess the reason by comparing INVITE message between using sip.conf and using pjsip.conf.

$ asterisk -V
Asterisk GIT-master-a96eb6de6c

Right now, I clear the issue that I could not take outgoing call with using pjsip.

It is cleared by running Asterisk 18.2.0 installed from tar.gz file on downloads.asterisk.org
It means that Asterisk installed from git server is not function by setting these parameter, right now.
(I guess it is development version. Thus, I never guess it is issue.)
The cause is that my confirming version number of Asterisk on git server was not well.

I’m going to organize these experiences, and write articles at Japanese developer website.
I expect to reduce same questions from another Japanese Asterisk users.

Thank you!

I’m unable to reproduce the issue with “disable_rport” in master.

With disable_rport enabled:

Via: SIP/2.0/UDP;branch=z9hG4bKPj63df0efa-5d03-4510-a244-52679594e1a4

With disable_rport disabled:

Via: SIP/2.0/UDP;rport;branch=z9hG4bKPj5e5f39a9-703d-495f-a54b-e90324c4f280

This is on an outgoing INVITE.


Thank you for the confirming and the comment.
My comment before written your comment had been hidden by community staff.
(Right now, Although it is already shown.)

I can confirmed the behavior of “disable_rport” with Asterisk 18.2.0
And I got more understanding to set it with your comment.
Did you run Asterisk greater than or equal 18.0.0?

I ran Asterisk master from git.

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