[asterisk-bugs] [JIRA] (ASTERISK-28966) chan_pjsip: Interaction with provider re-INVITE and RTP causes codec flip-flop

Robert Sutton (JIRA) noreply at issues.asterisk.org
Tue Jun 30 23:28:25 CDT 2020


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

Robert Sutton commented on ASTERISK-28966:
------------------------------------------

I would have thought that the problem is probably caused by jitter, lag or just a bad interaction between the 2 systems and that rate limiting the codec change would probably be a suitable solution.

Something like 0,250,500,1000 Millis. 

So upon seeing a different codec it will change immediately and then ignore the codec for 250ms. If after this period another packet with an alternate codec is detected then the codec would change again, and then ignore the codec for a further 500ms. etc. 

It's really to early to say, won't be sure for a week; but locking the system down to a single codec appears as though it may have solved the problem. However locking the system to a single codec is NOT desirable and fragile.

> chan_pjsip: Interaction with provider re-INVITE and RTP causes codec flip-flop
> ------------------------------------------------------------------------------
>
>                 Key: ASTERISK-28966
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28966
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip
>    Affects Versions: 16.10.0
>         Environment: ubuntu 18.04, docker, asterisk 16.10
>            Reporter: Robert Sutton
>            Assignee: Robert Sutton
>            Severity: Minor
>              Labels: fax, webrtc
>
> we had rtp_symmetric set to "no" on the trunk endpoint
> It seems that asterisk and our up stream sip provider got into a feed back loop as can be seen below. 
> This is just a small snippet of this, in 90 seconds this line was logged 600+ times across 3 channels.
> This was detected because the system was failing to bridge channels, it may not be the cause of failing to bridge, but either way it is a problem.
> {noformat}
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of ulaw on channel 'PJSIP/trunk-00000f60' when we're sending 'alaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of alaw on channel 'PJSIP/trunk-00000f60' when we're sending 'ulaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of ulaw on channel 'PJSIP/trunk-00000f60' when we're sending 'alaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of alaw on channel 'PJSIP/trunk-00000f60' when we're sending 'ulaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of ulaw on channel 'PJSIP/trunk-00000f60' when we're sending 'alaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of alaw on channel 'PJSIP/trunk-00000f60' when we're sending 'ulaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of ulaw on channel 'PJSIP/trunk-00000f60' when we're sending 'alaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of alaw on channel 'PJSIP/trunk-00000f60' when we're sending 'ulaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of ulaw on channel 'PJSIP/trunk-00000f60' when we're sending 'alaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of alaw on channel 'PJSIP/trunk-00000f60' when we're sending 'ulaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of ulaw on channel 'PJSIP/trunk-00000f60' when we're sending 'alaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of alaw on channel 'PJSIP/trunk-00000f60' when we're sending 'ulaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of ulaw on channel 'PJSIP/trunk-00000f60' when we're sending 'alaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of alaw on channel 'PJSIP/trunk-00000f60' when we're sending 'ulaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of ulaw on channel 'PJSIP/trunk-00000f60' when we're sending 'alaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of alaw on channel 'PJSIP/trunk-00000f60' when we're sending 'ulaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of ulaw on channel 'PJSIP/trunk-00000f60' when we're sending 'alaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of alaw on channel 'PJSIP/trunk-00000f60' when we're sending 'ulaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of ulaw on channel 'PJSIP/trunk-00000f60' when we're sending 'alaw', switching to match
> Jun 29 10:11:34 chan_pjsip.c:878 chan_pjsip_read_stream: Oooh, got a frame with format of alaw on channel 'PJSIP/trunk-00000f60' when we're sending 'ulaw', switching to match
> {noformat}



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



More information about the asterisk-bugs mailing list