DTMF relay

We have the following setup:

UPLINK <--> BRU3-CORE <--> BRU3-TRUNK <--> CUSTOMER

BRU3-CORE = 11.6-cert6 with chan_sip
BRU3-TRUNK = 11.6-cert4 with chan_sip
CUSTOMER = 13.6.0, with pjsip

We have a SIP call coming in from UPLINK to BRU3-CORE, what gets forwarded to BRU3-TRUNK what gets forwarded to CUSTOMER.

The CUSTOMER accepts the call, and sends an 200 OK with SDP. Dtmfmode is on auto on all servers.

The 200 OK we receive from CUSTOMER is fine, however, the 200 OK that is relayed to BRU3-CORE doesn’t contain the rtpmap:101 telephone-event/8000 and fmtp:101 0-16 lines in the SDP. This gets relayed further down the chain what causes an issue that we don’t receive the DTMF events.

I assume asterisk should relay the rtpmap:101 telephone-event/8000 and fmtp:101 0-16 lines to BRU3-CORE.

SDP from CUSTOMER to BRU3-TRUNK:

v=0
o=- 249438027 249438029 IN IP4 1.1.1.1
s=Asterisk
c=IN IP4 1.1.1.1
t=0 0
m=audio 16088 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

SDP from BRU3-TRUNK to BRU3-CORE:

v=0
o=destiny 1484284222 1484284222 IN IP4 2.2.2.2
s=Destiny Voice Infrastructure
c=IN IP4 2.2.2.2
t=0 0
m=audio 22566 RTP/AVP 8 0
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

Am I missing something here, or is this a known bug?

Asterisk doesn’t relay SDP information except for some direct media information. Each side is negotiated independently. What is the actual configuration on BRU3-TRUNK for going to CUSTOMER?

DTMF-mode is auto for both peers.

root@bru3-trunk:~# asterisk -rx “sip show peer BRU3-CORE”

  • Name : BRU3-CORE
    Description : CORE @ BRU3 (preferred)
    Secret :
    MD5Secret :
    Remote Secret:
    Context : from-external
    Record On feature : automon
    Record Off feature : automon
    Subscr.Cont. :
    Language :
    Tonezone : be
    AMA flags : Unknown
    Transfer mode: open
    CallingPres : Presentation Allowed, Not Screened
    Callgroup :
    Pickupgroup :
    Named Callgr :
    Nam. Pickupgr:
    MOH Suggest :
    Mailbox :
    VM Extension : asterisk
    LastMsgsSent : 0/0
    Call limit : 0
    Max forwards : 0
    Dynamic : No
    Callerid : “” <>
    MaxCallBR : 384 kbps
    Expire : -1
    Insecure : no
    Force rport : Auto (No)
    Symmetric RTP: No
    ACL : No
    DirectMedACL : No
    T.38 support : Yes
    T.38 EC mode : Redundancy
    T.38 MaxDtgrm: -1
    DirectMedia : Yes
    PromiscRedir : No
    User=Phone : No
    Video Support: No
    Text Support : No
    Ign SDP ver : No
    Trust RPID : Yes
    Send RPID : Yes
    Subscriptions: Yes
    Overlap dial : No
    DTMFmode : auto
    Timer T1 : 500
    Timer B : 32000
    ToHost : 1.1.1.1
    Addr->IP : 1.1.1.1:5060
    Defaddr->IP : (null)
    Prim.Transp. : UDP
    Allowed.Trsp : UDP
    Reg. exten :
    Def. Username:
    SIP Options : replaces replace timer
    Codecs : (ulaw|alaw)
    Codec Order : (alaw:20,ulaw:20)
    Auto-Framing : No
    Status : OK (1 ms)
    Useragent :
    Reg. Contact :
    Qualify Freq : 120000 ms
    Keepalive : 0 ms
    Sess-Timers : Accept
    Sess-Refresh : uas
    Sess-Expires : 1800 secs
    Min-Sess : 300 secs
    RTP Engine : asterisk
    Parkinglot :
    Use Reason : Yes
    Encryption : No

root@bru3-trunk:~# asterisk -rx “sip show peer michael-pbx”

  • Name : michael-pbx
    Description :
    Secret :
    MD5Secret :
    Remote Secret:
    Context : from-internal
    Record On feature : automon
    Record Off feature : automon
    Subscr.Cont. :
    Language :
    Tonezone : be
    Accountcode : michael-pbx
    AMA flags : Unknown
    Transfer mode: open
    CallingPres : Presentation Allowed, Not Screened
    Callgroup :
    Pickupgroup :
    Named Callgr :
    Nam. Pickupgr:
    MOH Suggest :
    Mailbox :
    VM Extension : asterisk
    LastMsgsSent : 0/0
    Call limit : 0
    Max forwards : 0
    Dynamic : Yes
    Callerid : “” <>
    MaxCallBR : 384 kbps
    Expire : 1805
    Insecure : no
    Force rport : No
    Symmetric RTP: No
    ACL : No
    DirectMedACL : No
    T.38 support : Yes
    T.38 EC mode : Redundancy
    T.38 MaxDtgrm: -1
    DirectMedia : No
    PromiscRedir : No
    User=Phone : No
    Video Support: No
    Text Support : No
    Ign SDP ver : No
    Trust RPID : Yes
    Send RPID : Yes
    Subscriptions: Yes
    Overlap dial : No
    DTMFmode : auto
    Timer T1 : 500
    Timer B : 32000
    ToHost :
    Addr->IP : 2.2.2.2:5060
    Defaddr->IP : (null)
    Prim.Transp. : UDP
    Allowed.Trsp : UDP
    Reg. exten :
    Def. Username: michael-pbx
    SIP Options : (none)
    Codecs : (ulaw|alaw)
    Codec Order : (alaw:20,ulaw:20)
    Auto-Framing : No
    Status : OK (1 ms)
    Useragent : Asterisk PBX 13.6.0~dfsg-0~ppa1
    Reg. Contact : sip:s@2.2.2.2:5060
    Qualify Freq : 120000 ms
    Keepalive : 0 ms
    Sess-Timers : Accept
    Sess-Refresh : uas
    Sess-Expires : 1800 secs
    Min-Sess : 300 secs
    RTP Engine : asterisk
    Parkinglot :
    Use Reason : Yes
    Encryption : No

The INVITE from BRU3-CORE to BRU3-TRUNK contains this:

v=0
o=destiny 1102058744 1102058744 IN IP4 9.9.9.9
s=Destiny Voice Platform
c=IN IP4 9.9.9.9
t=0 0
m=audio 13848 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

The INVITE that BRU3-TRUNK sends to CUSTOMER contains this:

v=0
o=destiny 1895430652 1895430652 IN IP4 1.1.1.1
s=Destiny Voice Infrastructure
c=IN IP4 1.1.1.1
t=0 0
m=audio 21516 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

So, it seems to be relaying fine in setting up out of band DTMF signalling.

The 200 OK from CUSTOMER TO BRU3-TRUNK contains this:

v=0
o=- 1895430652 1895430654 IN IP4 3.3.3.3
s=Asterisk
c=IN IP4 3.3.3.3
t=0 0
m=audio 19674 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

This means that between BRU3-TRUNK and CUSTOMER, out of band is negotiated, right?

However, then BRU3-TRUNK sends the following to BRU3-CORE:

v=0
o=destiny 1700343976 1700343976 IN IP4 2.2.2.2
s=Destiny Voice Infrastructure
c=IN IP4 2.2.2.2
t=0 0
m=audio 26678 RTP/AVP 8 0
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

As you can see, suddenly the DTMF is negotiated inband, and I have no idea why…