Hello - 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: [trusted] type=transport protocol=udp bind=10.xx.yy.zz:5060 [untrusted] type=transport protocol=udp bind=12.4.aa.bb:5060 My internal endpoints use transport=internal and external endpoints use transport=external. I guess that's obvious. My netstat shows both transports listening: Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name udp 0 0 12.4.aa.bb:5060 0.0.0.0:* 25494/asterisk udp 0 0 10.xx.yy.xx:5060 0.0.0.0:* 25494/asterisk 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. I didn't have this problem with chan_sip. Am I just missing some configuration? To test, I have set up the most simple extension I can think of, and it duplicates the condition: exten => _9090,1,Answer same => n,Wait(2) same => n,Hangup -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150401/4151a2d7/attachment.html>
On Wed, Apr 1, 2015 at 9:08 AM, Trey Hilyard <kctrey at gmail.com> wrote:> Hello - > > 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: > > [trusted] > type=transport > protocol=udp > bind=10.xx.yy.zz:5060 > > [untrusted] > type=transport > protocol=udp > bind=12.4.aa.bb:5060 > > My internal endpoints use transport=internal and external endpoints use > transport=external. I guess that's obvious. > > You show transports trusted and untrusted, you don't show any transportsnamed internal and external... so that is confusing.> 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. > > I didn't have this problem with chan_sip. Am I just missing some > configuration? > > This sounds like improper configuration, or a bug.If you can pastebin a full (sanitized) pjsip.conf as well as an Asterisk log with verbose turned up[1], plus a SIP packet trace then we can take a look at it. [1]: https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information -- Rusty Newton Digium, Inc. | Community Support Manager445 Jan Davis Drive NW - Huntsville, AL 35806 - USdirect: +1 256 428 6200 Check us out at: http://digium.com & http://asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150402/184d4d21/attachment.html>
On Thu, Apr 2, 2015 at 10:43 AM, Rusty Newton <rnewton at digium.com> wrote:> On Wed, Apr 1, 2015 at 9:08 AM, Trey Hilyard <kctrey at gmail.com> wrote: > >> Hello - >> >> 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: >> >> [trusted] >> type=transport >> protocol=udp >> bind=10.xx.yy.zz:5060 >> >> [untrusted] >> type=transport >> protocol=udp >> bind=12.4.aa.bb:5060 >> >> My internal endpoints use transport=internal and external endpoints use >> transport=external. I guess that's obvious. >> >> You show transports trusted and untrusted, you don't show any transports > named internal and external... so that is confusing. >>You are right. That is my fault that I was sanitizing the configuration for the purpose of this email and uses different names.> 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. >> >> I didn't have this problem with chan_sip. Am I just missing some >> configuration? >> >> This sounds like improper configuration, or a bug. > > If you can pastebin a full (sanitized) pjsip.conf as well as an Asterisk > log with verbose turned up[1], plus a SIP packet trace then we can take a > look at it. > > [1]: > https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information > > > I actually got the issue resolved by upgrading to 13.3.rc-1, since this isjust my development system. I assume that the problem was resolved between the two releases. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150402/b00020fc/attachment.html>