PJSIP: Contact header format for inbound calls. One way audio inbound calls behind NAT.

Dear community,

I faced a situation of one way audio at inbound calls using PJSIP channel on Asterisk 18.3.0 installation. Previously I had the same situation when I was using SIP (chan_sip & sip.conf) channel and my SIP provider explained that they require Contact header in the following format: sip:callee_number@external_ip:port in transmitted portion of SIP headers to them. That time the issue was caused by private IP address used by Asterisk to form contact header and as I remember it has been fixed by “from_domain=” parameter in a trunk description. Here I would like to tell that despite the fact that Asterisk is located behind NAT, the firewall is configured correctly and allows inbound RTP sessions. Since migration to PJSIP channel the contact header looks like <sip: external_ip_addr:5060> and we do not have audio signal from remote parties. Is there a way to modify any settings in order to affect the format of contact header? Or any other related suggestions much appreciated.

Audio should be using the c lines in the SDP, not the contact header.

The user part of the Contact header should be no business of the service provider; they should simply return the whole URI as the request URI.

1 Like