<div dir="ltr">Hello!<div><br></div><div>I've got a number of asterisk systems running asterisk 16.12.0 currently. They're configured with PJSIP.</div><div>Some of them are behind NAT, some aren't.</div><div>All systems have SIP trunks to a Sansay INX.</div><div>I've had one-way audio issues calling a particular number. After some investigation, It seems that the audio is lost due to port changes in SDP. Other calls don't seem to have any issues. Here's what happens.</div><div><br></div><div>Good call:</div><div>1. Asterisk sends invite to Sansay INX.</div><div>2. Sansay replies 100 Trying without SDP.</div><div>3. Sansay replies 183 Progress and provides SDP. This SDP specifies a Media server and Port. Let's say 192.168.1.2 and port 20100.</div><div>4. RTP starts to exchange. Asterisk sending to 192.168.1.2 on port 20100.</div><div>5. 200OK is received from Sansay, again it includes SDP showing 192.168.1.2 with port 20100 for RTP.</div><div>6. Call works normally.</div><div><br></div><div>Bad Call:</div><div><div>1. Asterisk sends invite to Sansay INX.</div><div>2. Sansay replies 100 Trying without SDP.</div><div>3. Sansay replies 183 Progress and provides SDP. This SDP specifies a Media server and Port. Let's say 192.168.1.2 and port 20100.</div><div>4. RTP starts to exchange. Asterisk sending to 192.168.1.2 on port 20100.</div><div>5. 200OK is received from Sansay, This time, It includes modified STP, The IP is still 192.168.1.2, but the port is now 20180.</div><div>6. Asterisk continues to send to SDP 20100.</div></div><div><br></div><div>2nd example of bad call:</div><div><div>1. Asterisk sends invite to Sansay INX.</div><div>2. Sansay replies 100 Trying without SDP.</div><div>3. Sansay starts sending RTP FROM 192.168.1.2 port 20100</div><div>4. Asterisk starts sending RTP to 192.168.1.2 port 20100 (Even with force rport and comedia, and rewrite contact off, before we ever get the first SDP).</div><div>5. Sansay replies 183 Progress and provides SDP. This SDP specifies a Media server and Port. Let's say 192.168.1.2 and port 20180 (This is a CHANGE from step 4).</div><div>6. Asterisk is still sending to 192.168.1.2 port.20100 (Ignoring SDP in step 5 183 progress)</div><div>7. 200OK is received from Sansay, Now a third port is received, The IP is still 192.168.1.2, but the port is now 20250.</div><div>8. Asterisk continues to send to SDP 20100. (Ignoring SDP received at step 5 and 7)</div></div><div><br></div><div>I'm hoping I'm missing a simple setting here like "Ignore SDP = no" in PJSIP. But I've not found it yet.</div><div><br></div><div>Secondly, in all cases, Inbound audio (Sansay to asterisk) is fine. And the source port of RTP DOES change in both bad call examples above. But I assume asterisk is handling it because the traffic is still arriving on the same port from asterisk's point of view.</div><div><br></div><div>Why calling this one particular number results in 2-3 SDP port changes I don't yet know. But from what I can see, It's not improper to have port changes in later SDP. And asterisk *should* follow them. But someone please correct me if I'm wrong.</div><div><br></div><div>Thank you!</div></div>