Asterisk 15.1.2 Request URI

Hello all,

I’m reaching out to see if anyone could potentially help me with an Asterisk issue that my team and I have recently discovered.

Currently, we are running Asterisk 15.1.2 with the latest PJSIP and we have noticed that if Asterisk sends a re-invite, it does not use the SIP URI in the Contact header of the other VRS server on the call to generate the request URI.

For example if Asterisk receives an inbound call from port 44785 and the caller has a contact URI ending in 5062, it will send all SIP messages (including the re-invite) to port 44785. Not 5062. We believe we are dropping some calls due to this behavior.

Can anyone provide insight as to how Asterisk goes about handling the selection of this port? Do any of the configuration parameters within the configuration files address this or would it be a source code level modification?

Any help or advice would be greatly appreciated!

The “rewrite_contact” endpoint options does as it says, it rewrites the Contact address to the source IP address and port. If this option is on then the behavior you are stating is expected.

thanks! literally stumbled upon that endpoint option after posting. I thought our dev team had already attempted this as a possible solution but I was incorrect. Appreciate the input!