Posted: Sat Oct 16, 2004 12:01 am Post subject: [Asterisk-bsd] Re: One Way Audio
Jay Adelson <jay@adelson.org> writes:
Quote:
If the remote side calls my phone, particularly with reinvite on, I
can hear the remote side fine and the call works normally.
Well, since the call runs through an Asterisk that has one foot on the
outside, with real addresses, and one on the inside, with the phones
on, and NAT in between, it's important that canreinvite=no. Otherwise,
the phone end points will try to speak RTP directly, and while your
phone is then able to address packets to the real IP address on the
other end, that end can't reach your phone through NAT.
You may also have a codec selection problem. You should probably
clean out the passwords from a copy of your sip.conf, and post it
here. At the same time, check which codecs your phones support, and
whether they can be set up with preferences for codec choice.
-tih
--
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway Hosting
www.eunet.no T +47-22092958 M +47-93013940 F +47-22092901 FWD 484145
On Sat, Oct 16, 2004 at 10:01:25AM +0200, Tom Ivar Helbekkmo wrote:
Quote:
Jay Adelson <jay@adelson.org> writes:
> If the remote side calls my phone, particularly with reinvite on, I
> can hear the remote side fine and the call works normally.
Well, since the call runs through an Asterisk that has one foot on the
outside, with real addresses, and one on the inside, with the phones
on, and NAT in between, it's important that canreinvite=no. Otherwise,
the phone end points will try to speak RTP directly, and while your
phone is then able to address packets to the real IP address on the
other end, that end can't reach your phone through NAT.
You may also have a codec selection problem. You should probably
clean out the passwords from a copy of your sip.conf, and post it
here. At the same time, check which codecs your phones support, and
whether they can be set up with preferences for codec choice.
Posted: Sat Oct 16, 2004 7:05 am Post subject: [Asterisk-bsd] Re: One Way Audio
Tom Ivar Helbekkmo wrote:
Quote:
Jay Adelson <jay@adelson.org> writes:
>If the remote side calls my phone, particularly with reinvite on, I
>can hear the remote side fine and the call works normally.
>
>
Well, since the call runs through an Asterisk that has one foot on the
outside, with real addresses, and one on the inside, with the phones
on, and NAT in between, it's important that canreinvite=no. Otherwise,
the phone end points will try to speak RTP directly, and while your
phone is then able to address packets to the real IP address on the
other end, that end can't reach your phone through NAT.
(I've been working with Jay on this problem for a few days now - a bit
of the blind leading the blind :-)
One of the interesting things about this setup is that the _only_
situation where audio is actually two-way is where canreinvite=yes is
set on both his extension (1000) and the connection to sipphone.com, and
he calls _out_. When I do a tcpdump on his inside interface, the thing
that I notice is that in the half-duplex audio situation, packets from
the phone to asterisk are destined for one of the interfaces on the
asterisk box, and packets from asterisk to the phone are destined for
the other interface, which makes me wonder if the phone itself (a
polycom 500) is ignoring them.
Audio _does_ work both ways when he uses a softphone (SJphone), even
though the same situation of packets from the phone going to one
interface, and packets to the phone come from the other.
Quote:
You may also have a codec selection problem. You should probably
clean out the passwords from a copy of your sip.conf, and post it
here. At the same time, check which codecs your phones support, and
whether they can be set up with preferences for codec choice.
We did play with codecs a little, but as I said we're still kind of
----- Original Message -----
From: "Jeff Rizzo" <riz+asterisk@boogers.sf.ca.us>
To: "Asterisk on BSD discussion" <asterisk-bsd@lists.digium.com>
Sent: Saturday, October 16, 2004 6:05 PM
Subject: Re: [Asterisk-bsd] Re: One Way Audio
Quote:
Tom Ivar Helbekkmo wrote:
>Jay Adelson <jay@adelson.org> writes:
>
>
>
>>If the remote side calls my phone, particularly with reinvite on, I
>>can hear the remote side fine and the call works normally.
>>
>>
>
>Well, since the call runs through an Asterisk that has one foot on the
>outside, with real addresses, and one on the inside, with the phones
>on, and NAT in between, it's important that canreinvite=no. Otherwise,
>the phone end points will try to speak RTP directly, and while your
>phone is then able to address packets to the real IP address on the
>other end, that end can't reach your phone through NAT.
>
>
>
(I've been working with Jay on this problem for a few days now - a bit
of the blind leading the blind :-)
One of the interesting things about this setup is that the _only_
situation where audio is actually two-way is where canreinvite=yes is
set on both his extension (1000) and the connection to sipphone.com, and
he calls _out_. When I do a tcpdump on his inside interface, the thing
that I notice is that in the half-duplex audio situation, packets from
the phone to asterisk are destined for one of the interfaces on the
asterisk box, and packets from asterisk to the phone are destined for
the other interface, which makes me wonder if the phone itself (a
polycom 500) is ignoring them.
Audio _does_ work both ways when he uses a softphone (SJphone), even
though the same situation of packets from the phone going to one
interface, and packets to the phone come from the other.
>You may also have a codec selection problem. You should probably
>clean out the passwords from a copy of your sip.conf, and post it
>here. At the same time, check which codecs your phones support, and
>whether they can be set up with preferences for codec choice.
>
>
>
We did play with codecs a little, but as I said we're still kind of
stumbling around in the dark here. :)
Posted: Sat Oct 16, 2004 9:27 am Post subject: [Asterisk-bsd] Re: One Way Audio
I've checked the codecs, and everything seems to be using an acceptable
one on all sides. I've been able to watch the call from the polycom,
it shows the properly negotiated codecs and that the call is active.
The phone itself shows packets received, the LINE on the phone shows zero
packets received.
On a completely different note, my NetBSD compile repeats this error
with some frequency:
Oct 16 10:10:12 WARNING[1262485504]: chan_sip.c:683 retrans_pkt: Maximum retries exceeded on call 771bcfc62949fb87708d6ab43df176dd@1.2.3.4 for seqno 102 (Non-critical Request)
Anything I shoudl worry about?
-j
On Sat, Oct 16, 2004 at 08:05:50AM -0700, Jeff Rizzo wrote:
Quote:
Tom Ivar Helbekkmo wrote:
>Jay Adelson <jay@adelson.org> writes:
>
>
>
>>If the remote side calls my phone, particularly with reinvite on, I
>>can hear the remote side fine and the call works normally.
>>
>>
>
>Well, since the call runs through an Asterisk that has one foot on the
>outside, with real addresses, and one on the inside, with the phones
>on, and NAT in between, it's important that canreinvite=no. Otherwise,
>the phone end points will try to speak RTP directly, and while your
>phone is then able to address packets to the real IP address on the
>other end, that end can't reach your phone through NAT.
>
>
>
(I've been working with Jay on this problem for a few days now - a bit
of the blind leading the blind :-)
One of the interesting things about this setup is that the _only_
situation where audio is actually two-way is where canreinvite=yes is
set on both his extension (1000) and the connection to sipphone.com, and
he calls _out_. When I do a tcpdump on his inside interface, the thing
that I notice is that in the half-duplex audio situation, packets from
the phone to asterisk are destined for one of the interfaces on the
asterisk box, and packets from asterisk to the phone are destined for
the other interface, which makes me wonder if the phone itself (a
polycom 500) is ignoring them.
Audio _does_ work both ways when he uses a softphone (SJphone), even
though the same situation of packets from the phone going to one
interface, and packets to the phone come from the other.
>You may also have a codec selection problem. You should probably
>clean out the passwords from a copy of your sip.conf, and post it
>here. At the same time, check which codecs your phones support, and
>whether they can be set up with preferences for codec choice.
>
>
>
We did play with codecs a little, but as I said we're still kind of
stumbling around in the dark here. :)
Posted: Sat Oct 16, 2004 7:45 pm Post subject: [Asterisk-bsd] Re: One Way Audio
On Sat, Oct 16, 2004 at 10:27:29AM -0700, Jay Adelson wrote:
Quote:
I've checked the codecs, and everything seems to be using an acceptable
one on all sides. I've been able to watch the call from the polycom,
it shows the properly negotiated codecs and that the call is active.
I would try something like this:
[general]
disallow=all
allow=ulaw
Quote:
The phone itself shows packets received, the LINE on the phone shows zero
packets received.
On a completely different note, my NetBSD compile repeats this error
with some frequency:
Oct 16 10:10:12 WARNING[1262485504]: chan_sip.c:683 retrans_pkt: Maximum retries exceeded on call 771bcfc62949fb87708d6ab43df176dd@1.2.3.4 for seqno 102 (Non-critical Request)
Anything I shoudl worry about?
Well, it means something funky is happening. I got this when I forgot
the above lines in my sip.conf. I would get it when trying to dial out,
but dialing from another phone worked okay.
Posted: Sun Oct 17, 2004 12:24 am Post subject: [Asterisk-bsd] Re: One Way Audio
Jeff Rizzo <riz+asterisk@boogers.sf.ca.us> writes:
Quote:
When I do a tcpdump on his inside interface, the thing that I notice
is that in the half-duplex audio situation, packets from the phone
to asterisk are destined for one of the interfaces on the asterisk
box, and packets from asterisk to the phone are destined for the
other interface, which makes me wonder if the phone itself (a
polycom 500) is ignoring them. Audio _does_ work both ways when he
uses a softphone (SJphone), even though the same situation of
packets from the phone going to one interface, and packets to the
phone come from the other.
This *does* seem strange. Are you saying that packets addressed to
the phone are sent out the wrong interface? I thought they were
outside and inside interfaces on a NAT gateway? How do the packets
reach the phone from the wrong side? Or are they sent out the right
interface, but addressed from the wrong one?
It may be that the Asterisk system is doing something wrong there, and
while the hard phones refuse the RTP packets, the soft phone isn't as
choosy. Maybe there's a problem with the BSD specific code that's
invoked when bindaddr is 0.0.0.0, to resolve the proper route to each
target? It obviously hadn't been tested until you guys started using
it, since there was a bug there that we only uncovered the other day.
I'll see if I can rig my system to do some debugging -- it's got a few
interfaces configured.
-tih
--
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway Hosting
www.eunet.no T +47-22092958 M +47-93013940 F +47-22092901 FWD 484145
Posted: Sun Oct 17, 2004 12:26 am Post subject: [Asterisk-bsd] Re: One Way Audio
Jay Adelson <jay@adelson.org> writes:
Quote:
On a completely different note, my NetBSD compile repeats this error
with some frequency:
Oct 16 10:10:12 WARNING[1262485504]: chan_sip.c:683 retrans_pkt: Maximum retries exceeded on call 771bcfc62949fb87708d6ab43df176dd@1.2.3.4 for seqno 102 (Non-critical Request)
Should there be a communication partner at address 1.2.3.4? Or is
that something that accidentally wasn't changed when you copied some
sample configuration or other on one of the systems or phones?
-tih
--
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway Hosting
www.eunet.no T +47-22092958 M +47-93013940 F +47-22092901 FWD 484145
Posted: Sun Oct 17, 2004 2:33 am Post subject: [Asterisk-bsd] Re: One Way Audio
Tom Ivar Helbekkmo <tih@eunetnorge.no> writes:
Quote:
I'll see if I can rig my system to do some debugging -- it's got a
few interfaces configured.
I can certainly duplicate the situation here. I don't do NAT, but my
Asterisk *is* running on the system that functions as a gateway
between outside and inside networks, and letting it bind to all
interfaces (bindaddr=0.0.0.0) breaks it just as has been described.
The obvious workaround is, as I've been doing anyway, to keep Asterisk
bound to one, official, IP address. It's not as if it's a problem for
the gateway system to route (and NAT) between two of its interfaces
while talking to phones on the inside.
However, I'll be looking at this more closely.
-tih
--
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway Hosting
www.eunet.no T +47-22092958 M +47-93013940 F +47-22092901 FWD 484145
Posted: Sun Oct 17, 2004 10:49 am Post subject: [Asterisk-bsd] Re: One Way Audio
Tom Ivar Helbekkmo wrote:
Quote:
Tom Ivar Helbekkmo <tih@eunetnorge.no> writes:
>I'll see if I can rig my system to do some debugging -- it's got a
>few interfaces configured.
>
>
I can certainly duplicate the situation here. I don't do NAT, but my
Asterisk *is* running on the system that functions as a gateway
between outside and inside networks, and letting it bind to all
interfaces (bindaddr=0.0.0.0) breaks it just as has been described.
The obvious workaround is, as I've been doing anyway, to keep Asterisk
bound to one, official, IP address. It's not as if it's a problem for
the gateway system to route (and NAT) between two of its interfaces
while talking to phones on the inside.
I don't think he has the option of binding to a specific address in this
case; here, the asterisk box is also the NAT itself, and there's only a
single external IP address. I seem to recall we were having even
greater problems before your patch to fix binding to 0.0.0.0...
However, it *might* work in this case to bind to the external address...
we'll give that a try. (Though I don't think we'll be able to do so
until at least Wednesday, maybe later)
Quote:
However, I'll be looking at this more closely.
-tih
I may try digging through the asterisk code to see if I can figure out
why it's sourcing packets with the wrong IP under these circumstances,
but I doubt I'll be able to get to that for a little while. What I find
curious is that the Polycom phone seems to be rejecting the packets with
the unexpected IP, but the softphone ("sjphone") seems to be OK with
it. I wonder if polycom has a setting for this...
Posted: Sun Oct 17, 2004 11:17 am Post subject: [Asterisk-bsd] Re: One Way Audio
Jeff Rizzo <riz+asterisk@boogers.sf.ca.us> writes:
Quote:
However, it *might* work in this case to bind to the external address...
That's what I meant, yes.
However, I've gotten a bit further by now: it seems that the problem
is actually a bug in the NetBSD routing socket handling, and the patch
I supplied earlier actually just got rid of the visible symptom. I'll
be digging deeper, and will supply a proper fix later, but for now you
should try the above mentioned workaround.
-tih
--
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway Hosting
www.eunet.no T +47-22092958 M +47-93013940 F +47-22092901 FWD 484145
Posted: Sun Oct 17, 2004 11:29 pm Post subject: [Asterisk-bsd] Re: One Way Audio
Tom Ivar Helbekkmo <tih@eunetnorge.no> writes:
Quote:
However, I've gotten a bit further by now: it seems that the problem
is actually a bug in the NetBSD routing socket handling, and the patch
I supplied earlier actually just got rid of the visible symptom. I'll
be digging deeper, and will supply a proper fix later, but for now you
should try the above mentioned workaround.
Such was, indeed, the case. :-(
I've submitted a new patch to Digium to reinstate the proper use of
the routing socket, and will be submitting a patch to the NetBSD
maintainers to make this feature actually work there. Meanwhile, what
you want is for the relevant bit of Asterisk's acl.c to look like this:
Specifically, "| RTA_IFA" needs to be added to the line setting the
value of rtm_addrs. This flag in that field has a special, overloaded
meaning when rtm_type is RTM_GET, which is seldom used, and, in fact,
doesn't work in NetBSD due to overzealous sanity checking of the
parameters. (Yes, this usage is a kludge in the routing socket.)
If you want "bindaddr = 0.0.0.0" to work, you have to change acl.c
back to the above (the attached patch DIFFS.acl.txt will do it, from
the current CVS), and apply the attached patch DIFFS.rtsock.txt to
your NetBSD kernel source. NOTE: this is NOT a sanctioned patch to
NetBSD; it is what I think is the right thing to do. It may or may
not be acceptable to the NetBSD maintainers. Your mileage may vary.
-------------- next part --------------
Index: acl.c
===================================================================
RCS file: /usr/cvsroot/asterisk/acl.c,v
retrieving revision 1.28
diff -u -r1.28 acl.c
--- acl.c 14 Oct 2004 18:48:04 -0000 1.28
+++ acl.c 18 Oct 2004 06:53:04 -0000
@@ -242,13 +242,12 @@
Posted: Mon Oct 18, 2004 2:21 am Post subject: [Asterisk-bsd] Re: One Way Audio
Tom Ivar Helbekkmo <tih@eunetnorge.no> writes:
Quote:
I've submitted a new patch to Digium to reinstate the proper use of
the routing socket, and will be submitting a patch to the NetBSD
maintainers to make this feature actually work there. Meanwhile, what
you want is for the relevant bit of Asterisk's acl.c to look like this:
One more change is needed, actually, because with just that one, and
the NetBSD kernel fix, it only works the first time. :-) There's a
hard coded '1' in acl.c that needs to be a reference to the sequence
number used for the query. Change...
do {
l = read(s, (char *)&m_rtmsg, sizeof(m_rtmsg));
} while (l > 0 && (m_rtmsg.m_rtm.rtm_seq != 1 || m_rtmsg.m_rtm.rtm_pid != pid));
...into...
do {
l = read(s, (char *)&m_rtmsg, sizeof(m_rtmsg));
} while (l > 0 && (m_rtmsg.m_rtm.rtm_seq != seq || m_rtmsg.m_rtm.rtm_pid != pid));
...that is, just replace that '1' with 'seq', and it'll be OK. The
submitted patch is updated; it (and the one for NetBSD) can be found
in Mantis, in bug number 2668.
-tih
--
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway Hosting
www.eunet.no T +47-22092958 M +47-93013940 F +47-22092901 FWD 484145
Posted: Mon Oct 18, 2004 6:22 am Post subject: [Asterisk-bsd] Re: One Way Audio
I'll be away from my setup until Friday, but I will test it as soon
as I can. I'm extremely curious what the impact will be from the polycom
point of view.
On Mon, Oct 18, 2004 at 12:21:00PM +0200, Tom Ivar Helbekkmo wrote:
Quote:
Tom Ivar Helbekkmo <tih@eunetnorge.no> writes:
> I've submitted a new patch to Digium to reinstate the proper use of
> the routing socket, and will be submitting a patch to the NetBSD
> maintainers to make this feature actually work there. Meanwhile, what
> you want is for the relevant bit of Asterisk's acl.c to look like this:
One more change is needed, actually, because with just that one, and
the NetBSD kernel fix, it only works the first time. :-) There's a
hard coded '1' in acl.c that needs to be a reference to the sequence
number used for the query. Change...
do {
l = read(s, (char *)&m_rtmsg, sizeof(m_rtmsg));
} while (l > 0 && (m_rtmsg.m_rtm.rtm_seq != 1 || m_rtmsg.m_rtm.rtm_pid != pid));
...into...
do {
l = read(s, (char *)&m_rtmsg, sizeof(m_rtmsg));
} while (l > 0 && (m_rtmsg.m_rtm.rtm_seq != seq || m_rtmsg.m_rtm.rtm_pid != pid));
...that is, just replace that '1' with 'seq', and it'll be OK. The
submitted patch is updated; it (and the one for NetBSD) can be found
in Mantis, in bug number 2668.
Posted: Sat Oct 23, 2004 12:59 pm Post subject: [Asterisk-bsd] Re: One Way Audio
I wrote:
Quote:
I've submitted a new patch to Digium to reinstate the proper use of
the routing socket, and will be submitting a patch to the NetBSD
maintainers to make this feature actually work there.
Both of these patches have now been committed to the cvs heads of the
respective projects. A pullup to the upcoming NetBSD 2.0 release has
been requested, but it is yet to be seen whether this will be done.
-tih
--
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway Hosting
www.eunet.no T +47-22092958 M +47-93013940 F +47-22092901 FWD 484145
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum