Hi. I tried the aricpp example ‘play_and_record’, dtmf event is not occur.
Removing dtmf part and playback on stasis start, it plays sound well.
I am using asterisk 18.12.1 with ubuntu 20.4 and chan_pjsip
I tried changing pjsip endpoint option dtmf_mode to each, but it is same.
I am new with asterisk, can anyone tell me what to check?
Enable DTMF logging in the logger.conf configuration file, and verify that DTMF is being detected and received. If it’s sent using RFC4733 you can also use “rtp set debug on” and see if it is received.
and there is nothing in CLI when I pushed a button.
this is CLI log from rtp set debug on to end of call.
xyz*CLI> rtp set debug on
RTP Packet Debugging Enabled
Creating Stasis app 'test'
== WebSocket connection from '127.0.0.1:56542' for protocol '' accepted using version '13'
-- Executing [07076630135@incoming:1] Log("PJSIP/provider-00000000", "NOTICE") in new stack
[Jun 28 03:49:06] NOTICE[396474][C-00000001]: Ext. 07076630135:1 @ incoming:
-- Executing [07076630135@incoming:2] Stasis("PJSIP/provider-00000000", "test") in new stack
> 0x7f9a5001ac50 -- Strict RTP learning after remote address set to: 211.233.26.249:20220
-- Channel PJSIP/provider-00000000 joined 'simple_bridge' stasis-bridge <7f5920fe-20c5-4c09-8e24-94a4f4420ea4>
-- Channel PJSIP/provider-00000000 left 'simple_bridge' stasis-bridge <7f5920fe-20c5-4c09-8e24-94a4f4420ea4>
If nothing shows up with “rtp set debug on” then that means Asterisk isn’t sending or receiving media. Have you answered the incoming call? Is Asterisk behind NAT? (If so, have you configured it to know it is behind NAT and also forwarded ports)
[general]
static=yes
writeprotect=no
clearglobalvars=no
[globals]
[incoming]
exten => _X.,1,Log(NOTICE, Dialing out from ${CALLERID(all)})
same => n, Stasis(test)
same => n,Hangup()
same => n,Log(NOTICE, ${CALLERID(all)} hanged up)
If Asterisk is behind NAT then the local_net, external_signaling_address, and external_media_address settings have to be set on the transport otherwise things may or may not work. Ports for media should also be forwarded to Asterisk (by default 10000 to 20000).