DTMF events not raised for ARI

I am trying to pass DTMF events from Asterisk via ARI to my own application.

The bridge is created as follows:

[Oct 30 13:02:25] VERBOSE[18234] res_ari.c: <— ARI request received from: 192.168.53.144:38530 —>
POST bridges
Host: 192.168.53.194:8088
Authorization: Basic YXN0ZXJpc2s6YXN0ZXJpc2s=
User-Agent: aricpp
Content-Type: application/json
Content-Length: 0
type: mixing,dtmf_events
body:

Based on the logging, I can see that the DTMF packets are received by Asterisk, but the ChannelDtmfReceived event is never raised.

The log file also indicates there is something wrong with building up the JSON object

[Oct 30 13:02:40] VERBOSE[18245][C-00000010] res_rtp_asterisk.c: Got RTP RFC2833 from 192.168.53.146:10028 (type 101, seq 001968, ts 032320, len 000004, mark 0, event 00000001, end 0, duration 01440)
[Oct 30 13:02:40] VERBOSE[18245][C-00000010] res_rtp_asterisk.c: Got RTP packet from 192.168.53.146:10028 (type 101, seq 001969, ts 032320, len 000004)
[Oct 30 13:02:40] VERBOSE[18245][C-00000010] res_rtp_asterisk.c: Got RTP RFC2833 from 192.168.53.146:10028 (type 101, seq 001969, ts 032320, len 000004, mark 0, event 00000001, end 1, duration 01600)
[Oct 30 13:02:40] DTMF[18245][C-00000010] channel.c: DTMF end ‘1’ received on SIP/9001-0000000b, duration 200 ms
[Oct 30 13:02:40] DTMF[18245][C-00000010] channel.c: DTMF end accepted with begin ‘1’ on SIP/9001-0000000b
[Oct 30 13:02:40] DTMF[18245][C-00000010] channel.c: DTMF end passthrough ‘1’ on SIP/9001-0000000b
[Oct 30 13:02:40] ERROR[17446] json.c: Error building JSON from ‘{s: s, s: o, s: s, s: I, s: o}’: NULL object.
[Oct 30 13:02:40] ERROR[17446] : Got -3 backtrace records

My Asterisk version is 18.24.3

The sip.conf file looks as follows

[general]
alwaysauthreject=yes
allowguest=no
rtptimeout=1000003
rtpholdtimeout=15
rtpkeepalive=5
dtmfmode=auto
transport=udp

[9001]
type=friend
dtmfmode=auto
nat=no

I’m trying to upload the full log file (which includes the ARI logging) but unfortunately I am not allowed

I’ve raised your level so you should be able to attach, but be aware you’re using an unsupported version of Asterisk and a channel driver few people will touch anymore.

In general though we’ve had no reports of issues like this currently.

Appreciate the quick response. I have attached the log file. I am aware we are not running the latest version of Asterisk and are looking into migrating to pjsip and a newer version of Asterisk.

asterisk-log.txt (89.1 KB)

Just in case anybody runs into the same issue: Our Asterisk application is part of a Linux image which is created using Yocto. We found that our Asterisk was compiled using

–with-jansson=${RECIPE_SYSROOT}/usr/lib

After changing this to –with-jansson-bundled we no longer observe the JSON errors in the logging and the DTMF events are raised correctly for ARI.

Do you know the version that was being used previously?

The version from libjansson? We were already using jansson in our Yocto image and as far as I can tell it’s still the same version: 2.14.

Very strange, then!