Skip to content

Supplemental "telephone-event" codec lost when using "allow-asymmetric-codecs" flag #2084

@lassebm

Description

@lassebm

rtpengine version the issue has been seen with

12.5.1.47+0mr12.5.1.47 and 14.2.0.0+0mr14.2.0.0 (master)

Used distribution and its version

Debian GNU/Linux 12 (bookworm)

Linux kernel version used

No response

CPU architecture issue was seen on (see uname -m)

x86_64

Expected behaviour you didn't see

When transcoding between AMR-WB/16000 and PCMA/8000 using the allow-asymmetric-codecs flag, the supplemental telephone-event codecs for both clock rates are kept towards the caller.

Unexpected behaviour you saw

The telephone-event/16000 clock rate is removed towards the caller breaking DTMF compatibility with some providers. The allow-asymmetric-codecs flag is used for logic in abbc022. The telephone-event/16000 clock rate is kept without using the allow-asymmetric-codecs flag.

Steps to reproduce the problem

  • Patch rtpengine-ng-client to support allow-asymmetric-codecs flag:
    $ sed -i '/asymmetric-codecs/a\        allow-asymmetric-codecs' rtpengine-ng-client
  • Send UA offer:
    $ rtpengine-ng-client offer --call-id=foo --from-tag=foo --codec-transcode=PCMA --codec-transcode=G729 --allow-asymmetric-codecs --sdp-file=<(cat <<EOF
    v=0
    o=- 886916473740350 1145423270 IN IP4 10.10.10.10
    s=-
    c=IN IP4 10.10.10.10
    t=0 0
    m=audio 60818 RTP/AVP 96 97 8 98 99
    b=AS:80
    a=rtpmap:96 AMR-WB/16000
    a=fmtp:96 mode-change-capability=2; max-red=0
    a=rtpmap:97 AMR/8000
    a=fmtp:97 mode-change-period=2; mode-change-neighbor=1; max-red=0
    a=rtpmap:8 PCMA/8000
    a=rtpmap:98 telephone-event/8000
    a=rtpmap:99 telephone-event/16000
    a=ptime:20
    a=maxptime:20
    EOF
    )
    Received rtpengine offer:
    v=0
    o=- 886916473740350 1145423270 IN IP4 10.10.10.10
    s=-
    c=IN IP4 10.42.42.42
    t=0 0
    m=audio 34102 RTP/AVP 96 97 8 18 98 99
    b=AS:80
    a=maxptime:20
    a=rtpmap:96 AMR-WB/16000
    a=fmtp:96 mode-change-capability=2; max-red=0
    a=rtpmap:97 AMR/8000
    a=fmtp:97 mode-change-period=2; mode-change-neighbor=1; max-red=0
    a=rtpmap:8 PCMA/8000
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=yes
    a=rtpmap:98 telephone-event/8000
    a=rtpmap:99 telephone-event/16000
    a=sendrecv
    a=rtcp:34103
    a=ptime:20
    
  • Send UA answer:
    $ rtpengine-ng-client answer --call-id=foo --from-tag=foo --to-tag=bar --codec-transcode=PCMA --codec-transcode=G729 --allow-asymmetric-codecs --sdp-file=<(cat <<EOF
    v=0
    o=root 1112911144 1112911144 IN IP4 10.20.20.20
    s=-
    c=IN IP4 10.20.20.20
    t=0 0
    m=audio 43694 RTP/AVP 8 18 98
    a=rtpmap:8 PCMA/8000
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=no
    a=rtpmap:98 telephone-event/8000
    a=fmtp:98 0-16
    a=ptime:20
    a=maxptime:150
    a=sendrecv
    EOF
    )
    Received rtpengine answer with missing telephone-event/16000 clock rate:
    v=0
    o=root 1112911144 1112911144 IN IP4 10.20.20.20
    s=-
    c=IN IP4 10.42.42.42
    t=0 0
    m=audio 34638 RTP/AVP 8 96 98
    a=maxptime:150
    a=rtpmap:8 PCMA/8000
    a=rtpmap:96 AMR-WB/16000
    a=fmtp:96 mode-change-capability=2; max-red=0
    a=rtpmap:98 telephone-event/8000
    a=sendrecv
    a=rtcp:34639
    a=ptime:20
    

Additional program output to the terminal or logs illustrating the issue

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions