Asterisk 16 PJSIP Multiple IP Addresses . Answer from wrong network interface

Hello!

Today (04/29/2020) I installed Asterisk 17 from the source code.

ast-staging*CLI> core show version
Asterisk 17.3.0 built by root @ ast-staging on a x86_64 running Linux on 2020-04-28 13:04:08 UTC
ast-staging*CLI> pjsip show version
PJPROJECT version currently running against: 2.9

The problem is when the Asterisk responds to OPTIONS with the wrong interface saved.

The problem can be divided into 2 cases:

  1. When my Asterisk is the initiator of OPTIONS requests ( qualify_frequency=30 in contact section ) . In this case, everything works correctly.

  2. When the provider sends me an OPTIONS request (provider - initiator of OPTIONS requests ) . Astersik was answer from wrong interface.

pcap logs was attached .Please change extension txt -> pcap. And open in wireshark.
dump-ens20.txt (7.6 KB)