[asterisk-users] Asterisk not following SDP port change

Joshua C. Colp jcolp at digium.com
Wed Mar 3 11:06:25 CST 2021


On Wed, Mar 3, 2021 at 12:51 PM Nick Olsen <nick at 141networks.com> wrote:

> Hello!
>
> I've got a number of asterisk systems running asterisk 16.12.0 currently.
> They're configured with PJSIP.
> Some of them are behind NAT, some aren't.
> All systems have SIP trunks to a Sansay INX.
> 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.
>
> Good call:
> 1. Asterisk sends invite to Sansay INX.
> 2. Sansay replies 100 Trying without SDP.
> 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.
> 4. RTP starts to exchange. Asterisk sending to 192.168.1.2 on port 20100.
> 5. 200OK is received from Sansay, again it includes SDP showing
> 192.168.1.2 with port 20100 for RTP.
> 6. Call works normally.
>
> Bad Call:
> 1. Asterisk sends invite to Sansay INX.
> 2. Sansay replies 100 Trying without SDP.
> 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.
> 4. RTP starts to exchange. Asterisk sending to 192.168.1.2 on port 20100.
> 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.
> 6. Asterisk continues to send to SDP 20100.
>
> 2nd example of bad call:
> 1. Asterisk sends invite to Sansay INX.
> 2. Sansay replies 100 Trying without SDP.
> 3. Sansay starts sending RTP FROM 192.168.1.2 port 20100
> 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).
> 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).
> 6. Asterisk is still sending to 192.168.1.2 port.20100 (Ignoring SDP in
> step 5 183 progress)
> 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.
> 8. Asterisk continues to send to SDP 20100. (Ignoring SDP received at step
> 5 and 7)
>
> I'm hoping I'm missing a simple setting here like "Ignore SDP = no" in
> PJSIP. But I've not found it yet.
>
> 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.
>
> 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.
>

Actual SDP and Asterisk debug log would most likely be needed to see what
is going on.

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20210303/f2d4c0cf/attachment.html>


More information about the asterisk-users mailing list