I’ve configured two PJSIP extensions, and they call between them without problems. But, I see on the Flow SIP, Asterisk send a INVITE to endpoint B with contact IP Asterisk, later, send another INVITE with contact IP endpoint A to endpoint B. And, the flow RTP seems wrong.
Please proved a description of your network, in particular the role of 192.168.1.30, your dialplan, the pjsip set logger on output for both sides, and your pjsip.conf, redacted for passwords. As all the addresses are private, I see no need to redact addresses. Please confirm that SIP ALG has been disabled in routers.
Something strange is happening, but there is insufficient information to understand what. The main strange thing is that the exact same destination URI appears on both sides, although that is not impossible. Asterisk a a back to back user agent, so generally completely rewrites the request URI.
As @david551 has written, there is a lack of information about Your network. But I would guess, media is directed to flow between the endpoints. This is controlled by the directive “drectmedia” in the endpoint section.
all components (phones and asterisk) are on the same network and you do not have a
directmedia statement in the endpoint sections.
After both phones are connected, asterisk sends INVITE requests to the phones. The SDP in this INVITES directs media directly from phone to phone. If You do not want this behavior put