[asterisk-bugs] [JIRA] (ASTERISK-24127) chan_sip option rtpkeepalive results in comfort noise packets being sent despite flowing RTP - resulting in audible interruptions to audio

zvision (JIRA) noreply at issues.asterisk.org
Fri Apr 21 12:05:58 CDT 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=236633#comment-236633 ] 

zvision commented on ASTERISK-24127:
------------------------------------

I have just faced the same problem. CN packets get sent even if RTP is flowing when rtpkeepalive is set.
In my sample setup there are 2 Asterisk servers calls go through, one mostly performs RTP P2P bridging,
while the other one performs full RTP handling. For each call, the one in P2P mode sends unneccessary
CN packets (they also originate with different SSRC and RTP timestamp 0, which messes up the main RTP
stream on the other asterisk server, generating a new SSRC each time CN packets is received).

Here is the situation:
Server 1 (P2P bridging after a call is answered) - output stream to Server 2:
Main RTP stream has SSRC=1 and monotonic timestamps
CN packets every 30 seconds have SSRC=2 and timestamps = 0

Server 2 (forwarding calls further in full bridging mode) - output stream:
Main RTP stream is split into 30 seconds long parts with different SSR, each lasting 30 seconds.

Quick look at the chan_sip,c sources may suggest, that dialog->lastrtptx
is not updated correctly in P2P bridging mode, so checks inside check_rtp_timeout always trigger
CN generation. Another note is that my 30 seconds keepalives intervals start counting on SIP 200 OK
which is the exact moment RTP enters P2P bridging mode.

> chan_sip option rtpkeepalive results in comfort noise packets being sent despite flowing RTP - resulting in audible interruptions to audio
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-24127
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24127
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_rtp_asterisk
>    Affects Versions: 11.11.0
>            Reporter: alexr1
>            Severity: Minor
>
> I was experiencing minor audio clipping/interruptions and when I did a packet capture I found an RTP Comfort Noise packet corresponding with each interruption (PT=comfort noise). An easy fix is to disable rtpkeepalive.
> In sip.conf, rtpkeepalive specifies the number of seconds of no rtp activity before sending a comfort noise rtp packet as a keep alive. In some cases, Asterisk sends one in the middle of rtp streams (It seems to send it to both parties simultaneously, too).
> directmedia=no, so all rtp traffic is being handled by both asterisk servers.
> Interruptions every 10 seconds:
> AST11 Playing MOH <alaw> AST11 <alaw> SIP Phone
> No Interruptions when transcoding takes place:
> AST11 Playing MOH <alaw> AST11 <ulaw> SIP Phone
> AST11 Playing MOH <ulaw> AST11 <alaw> SIP Phone
> Unfortunately I don't have time to help further isolate the issue on our production system - mainly posting this so that someone else can find it if they're looking for a solution!



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list