Re: [asterisk-users] No audio for 10 seconds and then comfort noise

2022-05-19 Thread David Cunningham
Hi Joshua,

You're right, it was a firewall problem. One of those things where testing
a change in one place throws up a previously unseen problem somewhere else!
Thanks for the tip.


On Thu, 19 May 2022 at 21:18, Joshua C. Colp  wrote:

> On Thu, May 19, 2022 at 6:04 AM David Cunningham <
> dcunning...@voisonics.com> wrote:
>
>> Hi Dovid and Joshua,
>>
>> The PSTN is sending RTP immediately after the 200 OK, on both legs of the
>> call. Since the PCAP taken on the Asterisk server itself shows this RTP
>> from the PSTN then presumably it can't be a network issue preventing the
>> RTP.
>>
>> Having said that, the problem is not reproduced when the peer is another
>> Asterisk server on the same network, and that does point to a network
>> difference.
>>
>> Is there any other way in which the RTP keepalive might affect Asterisk's
>> behaviour?
>>
>
> No, the option only does anything if no RTP has been sent for a period of
> time. It doesn't fundamentally alter the behavior of RTP in general.
>
> Another thing to consider is that a PCAP is taken before any local
> firewall rules are applied, which can give a false impression that the
> firewall on the system is not an issue when in reality it can be. That's
> something to check.
>
> --
> Joshua C. Colp
> Asterisk Technical Lead
> Sangoma Technologies
> Check us out at www.sangoma.com and www.asterisk.org
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users



-- 
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] No audio for 10 seconds and then comfort noise

2022-05-19 Thread Joshua C. Colp
On Thu, May 19, 2022 at 6:04 AM David Cunningham 
wrote:

> Hi Dovid and Joshua,
>
> The PSTN is sending RTP immediately after the 200 OK, on both legs of the
> call. Since the PCAP taken on the Asterisk server itself shows this RTP
> from the PSTN then presumably it can't be a network issue preventing the
> RTP.
>
> Having said that, the problem is not reproduced when the peer is another
> Asterisk server on the same network, and that does point to a network
> difference.
>
> Is there any other way in which the RTP keepalive might affect Asterisk's
> behaviour?
>

No, the option only does anything if no RTP has been sent for a period of
time. It doesn't fundamentally alter the behavior of RTP in general.

Another thing to consider is that a PCAP is taken before any local firewall
rules are applied, which can give a false impression that the firewall on
the system is not an issue when in reality it can be. That's something to
check.

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] No audio for 10 seconds and then comfort noise

2022-05-19 Thread David Cunningham
Hi Dovid and Joshua,

The PSTN is sending RTP immediately after the 200 OK, on both legs of the
call. Since the PCAP taken on the Asterisk server itself shows this RTP
from the PSTN then presumably it can't be a network issue preventing the
RTP.

Having said that, the problem is not reproduced when the peer is another
Asterisk server on the same network, and that does point to a network
difference.

Is there any other way in which the RTP keepalive might affect Asterisk's
behaviour?

Thanks for your help on this.


On Thu, 19 May 2022 at 20:40, Joshua C. Colp  wrote:

> On Thu, May 19, 2022 at 3:52 AM Dovid Bender  wrote:
>
>> David,
>>
>> Are you getting any RTP from the PSTN for either leg? If not it could be
>> that they assume you are behind NAT and want to see where the SRC of the
>> RTP before they send it back. We had a few carriers that did this. The
>> easiest way to get around it was to play a 0.5 second audio clip to the
>> incoming leg. This will send RTP to the inbound carrier, causing them to
>> send RTP back to you which would then hit the terminating carrier, which
>> then sends you back RTP completing the loop. The dialplan looks
>> something like this.
>>
>> same =>n, Progress()
>> same =>n,
>> Playback(/var/lib//asterisk_custom/sounds/xc,noanswer)
>> same =>n, Dial(SIP/+${EXTEN}@carrier,,)
>>
>
> I've also seen this happen due to networking equipment, specifically the
> equipment wanting Asterisk to send packets before allowing packets in. If
> both sides of the call are in this state, then you reach a stalemate and
> media won't flow. Since rtp_keepalive is generated by Asterisk, it gets
> sent, and media starts flowing.
>
> --
> Joshua C. Colp
> Asterisk Technical Lead
> Sangoma Technologies
> Check us out at www.sangoma.com and www.asterisk.org
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users



-- 
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] No audio for 10 seconds and then comfort noise

2022-05-19 Thread Joshua C. Colp
On Thu, May 19, 2022 at 3:52 AM Dovid Bender  wrote:

> David,
>
> Are you getting any RTP from the PSTN for either leg? If not it could be
> that they assume you are behind NAT and want to see where the SRC of the
> RTP before they send it back. We had a few carriers that did this. The
> easiest way to get around it was to play a 0.5 second audio clip to the
> incoming leg. This will send RTP to the inbound carrier, causing them to
> send RTP back to you which would then hit the terminating carrier, which
> then sends you back RTP completing the loop. The dialplan looks
> something like this.
>
> same =>n, Progress()
> same =>n,
> Playback(/var/lib//asterisk_custom/sounds/xc,noanswer)
> same =>n, Dial(SIP/+${EXTEN}@carrier,,)
>

I've also seen this happen due to networking equipment, specifically the
equipment wanting Asterisk to send packets before allowing packets in. If
both sides of the call are in this state, then you reach a stalemate and
media won't flow. Since rtp_keepalive is generated by Asterisk, it gets
sent, and media starts flowing.

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] No audio for 10 seconds and then comfort noise

2022-05-19 Thread Dovid Bender
David,

Are you getting any RTP from the PSTN for either leg? If not it could be
that they assume you are behind NAT and want to see where the SRC of the
RTP before they send it back. We had a few carriers that did this. The
easiest way to get around it was to play a 0.5 second audio clip to the
incoming leg. This will send RTP to the inbound carrier, causing them to
send RTP back to you which would then hit the terminating carrier, which
then sends you back RTP completing the loop. The dialplan looks
something like this.

same =>n, Progress()
same =>n,
Playback(/var/lib//asterisk_custom/sounds/xc,noanswer)
same =>n, Dial(SIP/+${EXTEN}@carrier,,)






On Thu, May 19, 2022 at 12:13 AM David Cunningham 
wrote:

> We found that the 10 seconds relates to the "rtpkeepalive =10" in our
> sip.conf. If the rtpkeepalive is reduced then the delay reduces as well. If
> rtpkeepalive is removed from sip.conf then audio never starts flowing.
>
> Does that help anyone make sense of what's happening?
>
> We have DAHDI running on the server:
>
> # asterisk -rx 'dahdi show version'
> DAHDI Version: 3.0.0 Echo Canceller:
> # asterisk -rx 'dahdi show status'
> Description  Alarms  IRQbpviol CRCFra
> Codi Options  LBO
>
>
> On Thu, 19 May 2022 at 15:51, David Cunningham 
> wrote:
>
>> Hello,
>>
>> We are running an Asterisk 13 server which is having a strange problem,
>> where on calls which are received from the PSTN and then forwarded out to
>> the PSTN again there is no audio for the first 10 seconds of the call. At
>> the 10 second mark audio starts flowing fine, and in a PCAP we see that it
>> starts with a few "comfort noise" packers before the real audio starts.
>>
>> It can be reproduced with a very simple extension like this:
>> exten => 4081234567, 2, Dial(SIP/6501234...@bb.bb.bb.138)
>> where 4081234567 is the number we receive the call on, and 6501234567 is
>> the number we're forwarding it out to.
>>
>> In the Asterisk log we don't see any obvious reason for the audio to
>> start flowing at the 10 second mark. All that is logged at that time is the
>> following below.
>>
>> Would anyone have any ideas? Historically Asterisk didn't generate
>> comfort noise - has that changed in version 13?
>>
>> [May 17 20:26:24] VERBOSE[11933] res_rtp_asterisk.c: Sent Comfort Noise
>> RTP packet to aa.aa.aa.76:64280 (type 02, seq 009268, ts 00, len 01)
>> [May 17 20:26:24] VERBOSE[17794][C-0027] res_rtp_asterisk.c: Got RTP
>> packet from aa.aa.aa.76:64280 (type 00, seq 000662, ts 105920, len 000160)
>> [May 17 20:26:24] DEBUG[17725][C-0027] res_rtp_asterisk.c: Ooh,
>> format changed from none to ulaw
>> [May 17 20:26:24] DEBUG[17725][C-0027] res_rtp_asterisk.c: Starting
>> RTCP transmission on RTP instance '0x14f4cc025998'
>> [May 17 20:26:24] VERBOSE[17725][C-0027] res_rtp_asterisk.c: Sent RTP
>> packet to bb.bb.bb.20:35412 (type 00, seq 020934, ts 105920, len 000160)
>> [May 17 20:26:24] VERBOSE[17725][C-0027] res_rtp_asterisk.c: Got RTP
>> packet from bb.bb.bb.20:35412 (type 00, seq 029996, ts 102760, len 000160)
>>
>> Thanks very much,
>>
>> --
>> David Cunningham, Voisonics Limited
>> http://voisonics.com/
>> USA: +1 213 221 1092
>> New Zealand: +64 (0)28 2558 3782
>>
>
>
> --
> David Cunningham, Voisonics Limited
> http://voisonics.com/
> USA: +1 213 221 1092
> New Zealand: +64 (0)28 2558 3782
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] No audio for 10 seconds and then comfort noise

2022-05-18 Thread David Cunningham
We found that the 10 seconds relates to the "rtpkeepalive =10" in our
sip.conf. If the rtpkeepalive is reduced then the delay reduces as well. If
rtpkeepalive is removed from sip.conf then audio never starts flowing.

Does that help anyone make sense of what's happening?

We have DAHDI running on the server:

# asterisk -rx 'dahdi show version'
DAHDI Version: 3.0.0 Echo Canceller:
# asterisk -rx 'dahdi show status'
Description  Alarms  IRQbpviol CRCFra
Codi Options  LBO


On Thu, 19 May 2022 at 15:51, David Cunningham 
wrote:

> Hello,
>
> We are running an Asterisk 13 server which is having a strange problem,
> where on calls which are received from the PSTN and then forwarded out to
> the PSTN again there is no audio for the first 10 seconds of the call. At
> the 10 second mark audio starts flowing fine, and in a PCAP we see that it
> starts with a few "comfort noise" packers before the real audio starts.
>
> It can be reproduced with a very simple extension like this:
> exten => 4081234567, 2, Dial(SIP/6501234...@bb.bb.bb.138)
> where 4081234567 is the number we receive the call on, and 6501234567 is
> the number we're forwarding it out to.
>
> In the Asterisk log we don't see any obvious reason for the audio to start
> flowing at the 10 second mark. All that is logged at that time is the
> following below.
>
> Would anyone have any ideas? Historically Asterisk didn't generate comfort
> noise - has that changed in version 13?
>
> [May 17 20:26:24] VERBOSE[11933] res_rtp_asterisk.c: Sent Comfort Noise
> RTP packet to aa.aa.aa.76:64280 (type 02, seq 009268, ts 00, len 01)
> [May 17 20:26:24] VERBOSE[17794][C-0027] res_rtp_asterisk.c: Got RTP
> packet from aa.aa.aa.76:64280 (type 00, seq 000662, ts 105920, len 000160)
> [May 17 20:26:24] DEBUG[17725][C-0027] res_rtp_asterisk.c: Ooh, format
> changed from none to ulaw
> [May 17 20:26:24] DEBUG[17725][C-0027] res_rtp_asterisk.c: Starting
> RTCP transmission on RTP instance '0x14f4cc025998'
> [May 17 20:26:24] VERBOSE[17725][C-0027] res_rtp_asterisk.c: Sent RTP
> packet to bb.bb.bb.20:35412 (type 00, seq 020934, ts 105920, len 000160)
> [May 17 20:26:24] VERBOSE[17725][C-0027] res_rtp_asterisk.c: Got RTP
> packet from bb.bb.bb.20:35412 (type 00, seq 029996, ts 102760, len 000160)
>
> Thanks very much,
>
> --
> David Cunningham, Voisonics Limited
> http://voisonics.com/
> USA: +1 213 221 1092
> New Zealand: +64 (0)28 2558 3782
>


-- 
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users