<div dir="ltr">Hello - <div><br></div><div>I am trying to decide if I have stumbled across a bug in PJSIP or I am just missing something. My Asterisk has two interfaces, an "internal" eth0 and an "external" eth1. In pjsip.conf, I define the following transports:</div><div><br></div><div><div>[trusted]</div><div>type=transport</div><div>protocol=udp</div><div>bind=10.xx.yy.zz:5060</div><div><br></div><div>[untrusted]</div><div>type=transport</div><div>protocol=udp</div><div>bind=<a href="http://12.4.aa.bb:5060">12.4.aa.bb:5060</a></div></div><div><br></div><div>My internal endpoints use transport=internal and external endpoints use transport=external. I guess that's obvious.</div><div><br></div><div>My netstat shows both transports listening:</div><div><div>Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name<br></div><div>udp        0      0 <a href="http://12.4.aa.bb:5060">12.4.aa.bb:5060</a>       0.0.0.0:*                           25494/asterisk</div><div>udp        0      0 10.xx.yy.xx:5060      0.0.0.0:*                           25494/asterisk</div></div><div><br></div><div>Everything works fine, most of the time. INVITEs, 1XX, 2XX are sent to the right interface using the right source IP. But, when Asterisk tries to send a BYE to any internal endpoint, it sends using the external IP, but it is sent of the correct internal interface eth0. Only the IP layer is incorrect. The SIP layer has the correct IP in the Via header. From what I can tell, only BYE is affected.</div><div><br></div><div>I didn't have this problem with chan_sip. Am I just missing some configuration?</div><div><br></div><div>To test, I have set up the most simple extension I can think of, and it duplicates the condition:</div><div><div>exten => _9090,1,Answer</div><div> same => n,Wait(2)<br></div><div> same => n,Hangup</div></div></div>