[Issue] DialPlan sendDtmf dosen´t work after 1 day

Hi,
I am using Asterisk 11.7.0 and trying to send DTMF tones using the Asterisk Dialplan like this :

exten => s,1,Answer()
exten => s,n,Wait(2);
exten => s,n,SendDTMF(123456,100,100)
exten => s,n,Read(MESSAGE,,6)

The really strange thing is that Asterisk must send a DTMF tones to the phone when it picks up but after 1 day (more or less) it stops working. Asterisk runs SendDTMF but I am not able to hear the tone and the device neither because it dosen´t answer.

I am using a Sangoma card B500 BRI. Does it happen to you before? Do you know what is happening?

Thank you very much for your help.

Have you finally found out what happened? I have a similar code and it is not sending DTMF. The text-to-speech works but no dtmf.

exten => 1213xxxxxxx,1,Answer()
same => n,Wait(4)
same => n,SendDTMF(9)
same => n,agi(googletts.agi,“Hello there”,en)
same => n,SendDTMF(9)
same => n,hangup()

Connected to Asterisk 17.4.0 currently running on ip-10-0-1-178 (pid = 1289)
== Setting global variable ‘SIPDOMAIN’ to ‘18.xx.xx.xx’
– Executing [1213xxxxxxx@from-external:1] Answer(“PJSIP/flowroute-000001f2”, “”) in new stack
> 0x7fd360042a80 – Strict RTP learning after remote address set to: 23.29.31.59:14162
– Executing [1213xxxxxxx@from-external:2] Wait(“PJSIP/flowroute-000001f2”, “4”) in new stack
> 0x7fd360042a80 – Strict RTP switching to RTP target address 23.xx.xx.xx:14162 as source
– Executing [1213xxxxxxx@from-external:3] SendDTMF(“PJSIP/flowroute-000001f2”, “9”) in new stack
– Executing [1213xxxxxxx@from-external:4] AGI(“PJSIP/flowroute-000001f2”, “googletts.agi,“Hello there”,en”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
<PJSIP/flowroute-000001f2>AGI Tx >> agi_request: googletts.agi
<PJSIP/flowroute-000001f2>AGI Tx >> agi_channel: PJSIP/flowroute-000001f2
<PJSIP/flowroute-000001f2>AGI Tx >> agi_language: en
<PJSIP/flowroute-000001f2>AGI Tx >> agi_type: PJSIP
<PJSIP/flowroute-000001f2>AGI Tx >> agi_uniqueid: 1616865831.925
<PJSIP/flowroute-000001f2>AGI Tx >> agi_version: 17.4.0
<PJSIP/flowroute-000001f2>AGI Tx >> agi_callerid: +1415xxxxxxx
<PJSIP/flowroute-000001f2>AGI Tx >> agi_calleridname: unknown
<PJSIP/flowroute-000001f2>AGI Tx >> agi_callingpres: 0
<PJSIP/flowroute-000001f2>AGI Tx >> agi_callingani2: 0
<PJSIP/flowroute-000001f2>AGI Tx >> agi_callington: 0
<PJSIP/flowroute-000001f2>AGI Tx >> agi_callingtns: 0
<PJSIP/flowroute-000001f2>AGI Tx >> agi_dnid: 1213xxxxxxx
<PJSIP/flowroute-000001f2>AGI Tx >> agi_rdnis: unknown
<PJSIP/flowroute-000001f2>AGI Tx >> agi_context: from-external
<PJSIP/flowroute-000001f2>AGI Tx >> agi_extension: 1213xxxxxxx
<PJSIP/flowroute-000001f2>AGI Tx >> agi_priority: 4
<PJSIP/flowroute-000001f2>AGI Tx >> agi_enhanced: 0.0
<PJSIP/flowroute-000001f2>AGI Tx >> agi_accountcode:
<PJSIP/flowroute-000001f2>AGI Tx >> agi_threadid: 140545899247360
<PJSIP/flowroute-000001f2>AGI Tx >> agi_arg_1: Hello there.
<PJSIP/flowroute-000001f2>AGI Tx >> agi_arg_2: en
<PJSIP/flowroute-000001f2>AGI Tx >>
> 0x7fd360042a80 – Strict RTP learning complete - Locking on source address 23.29.31.59:14162
<PJSIP/flowroute-000001f2>AGI Rx << CHANNEL STATUS
<PJSIP/flowroute-000001f2>AGI Tx >> 200 result=6
<PJSIP/flowroute-000001f2>AGI Rx << GET FULL VARIABLE ${CHANNEL(audionativeformat)}
<PJSIP/flowroute-000001f2>AGI Tx >> 200 result=1 ((ulaw))
<PJSIP/flowroute-000001f2>AGI Rx << STREAM FILE /tmp/b71a129f74813db643255be3944ce67e “”
– <PJSIP/flowroute-000001f2> Playing ‘/tmp/b71a129f74813db643255be3944ce67e.slin’ (escape_digits=) (sample_offset 0) (language ‘en’)
<PJSIP/flowroute-000001f2>AGI Tx >> 200 result=0 endpos=41088
– <PJSIP/flowroute-000001f2>AGI Script googletts.agi completed, returning 0
– Executing [1213xxxxxxx@from-external:5] SendDTMF(“PJSIP/flowroute-000001f2”, “9”) in new stack
– Executing [1213xxxxxxx@from-external:6] Hangup(“PJSIP/flowroute-000001f2”, “”) in new stack
== Spawn extension (from-external, 1213xxxxxxx, 6) exited non-zero on ‘PJSIP/flowroute-000001f2’

The OP wasn’t using VoIP, but you are.

There are lots of options for sending DTMF over VoIP, but you haven’t provided your configuration, or shown if and how Asterisk actually tried to send the DTMF.

Hi david551, thanks for your response. Is this what you are looking for?

[flowroute]
type=endpoint
transport=udp
context=from-external
disallow=all
allow=g722
allow=ulaw
outbound_auth=flowroute
aors=flowroute
dtmf_mode=rfc2833

Connected to Asterisk 17.4.0 currently running on ip-10-0-1-178 (pid = 1289)
– Added contact ‘sip:boss@75.xx.xx.xx:60803;transport=TLS;ob’ to AOR ‘boss’ with expiration of 300 seconds
== Endpoint boss is now Reachable
== Setting global variable ‘SIPDOMAIN’ to ‘18.xx.xx.xx’
– Executing [1213xxxxxxx@from-external:1] Answer(“PJSIP/flowroute-000001f3”, “”) in new stack
> 0x7fd360042a80 – Strict RTP learning after remote address set to: 23.xx.xx.xx:26984
– Executing [1213xxxxxxx@from-external:2] Wait(“PJSIP/flowroute-000001f3”, “4”) in new stack
– Executing [1213xxxxxxx@from-external:3] SendDTMF(“PJSIP/flowroute-000001f3”, “9”) in new stack
– Executing [1213xxxxxxx@from-external:4] AGI(“PJSIP/flowroute-000001f3”, “googletts.agi,“Hello there.”,en”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
<PJSIP/flowroute-000001f3>AGI Tx >> agi_request: googletts.agi
<PJSIP/flowroute-000001f3>AGI Tx >> agi_channel: PJSIP/flowroute-000001f3
<PJSIP/flowroute-000001f3>AGI Tx >> agi_language: en
<PJSIP/flowroute-000001f3>AGI Tx >> agi_type: PJSIP
<PJSIP/flowroute-000001f3>AGI Tx >> agi_uniqueid: 1616867886.927
<PJSIP/flowroute-000001f3>AGI Tx >> agi_version: 17.4.0
<PJSIP/flowroute-000001f3>AGI Tx >> agi_callerid: +1415699xxxx
<PJSIP/flowroute-000001f3>AGI Tx >> agi_calleridname: unknown
<PJSIP/flowroute-000001f3>AGI Tx >> agi_callingpres: 0
<PJSIP/flowroute-000001f3>AGI Tx >> agi_callingani2: 0
<PJSIP/flowroute-000001f3>AGI Tx >> agi_callington: 0
<PJSIP/flowroute-000001f3>AGI Tx >> agi_callingtns: 0
<PJSIP/flowroute-000001f3>AGI Tx >> agi_dnid: 1213xxxxxxx
<PJSIP/flowroute-000001f3>AGI Tx >> agi_rdnis: unknown
<PJSIP/flowroute-000001f3>AGI Tx >> agi_context: from-external
<PJSIP/flowroute-000001f3>AGI Tx >> agi_extension: 1213xxxxxxx
<PJSIP/flowroute-000001f3>AGI Tx >> agi_priority: 4
<PJSIP/flowroute-000001f3>AGI Tx >> agi_enhanced: 0.0
<PJSIP/flowroute-000001f3>AGI Tx >> agi_accountcode:
<PJSIP/flowroute-000001f3>AGI Tx >> agi_threadid: 140544439924480
<PJSIP/flowroute-000001f3>AGI Tx >> agi_arg_1: Hello there
<PJSIP/flowroute-000001f3>AGI Tx >> agi_arg_2: en
<PJSIP/flowroute-000001f3>AGI Tx >>
<PJSIP/flowroute-000001f3>AGI Rx << CHANNEL STATUS
<PJSIP/flowroute-000001f3>AGI Tx >> 200 result=6
<PJSIP/flowroute-000001f3>AGI Rx << GET FULL VARIABLE ${CHANNEL(audionativeformat)}
<PJSIP/flowroute-000001f3>AGI Tx >> 200 result=1 ((ulaw))
<PJSIP/flowroute-000001f3>AGI Rx << STREAM FILE /tmp/b71a129f74813db643255be3944ce67e “”
– <PJSIP/flowroute-000001f3> Playing ‘/tmp/b71a129f74813db643255be3944ce67e.slin’ (escape_digits=) (sample_offset 0) (language ‘en’)
> 0x7fd360042a80 – Strict RTP switching to RTP target address 23.xx.xx.xx:26984 as source
> 0x7fd360042a80 – Strict RTP learning complete - Locking on source address 23.xx.xx.xx:26984
<PJSIP/flowroute-000001f3>AGI Tx >> 200 result=0 endpos=49152
<PJSIP/flowroute-000001f3>AGI Rx << STREAM FILE /tmp/c4d1273977c42d4fe4abcbc000c84b58 “”
– <PJSIP/flowroute-000001f3> Playing ‘/tmp/c4d1273977c42d4fe4abcbc000c84b58.slin’ (escape_digits=) (sample_offset 0) (language ‘en’)
<PJSIP/flowroute-000001f3>AGI Tx >> 200 result=0 endpos=41088
– <PJSIP/flowroute-000001f3>AGI Script googletts.agi completed, returning 0
– Executing [1213xxxxxxx@from-external:5] SendDTMF(“PJSIP/flowroute-000001f3”, “9”) in new stack
– Executing [1213xxxxxxx@from-external:6] Hangup(“PJSIP/flowroute-000001f3”, “”) in new stack
== Spawn extension (from-external, 1213xxxxxxx, 6) exited non-zero on ‘PJSIP/flowroute-000001f3’

Is this an incoming call from the PSTN?

Yes. I was tinkering with the extension yesterday, and SendDTMF worked after rebooted the Asterisk. I wasn’t sure if it was something I fixed or the reboot but I am glad it is working now. Before that, I hadn’t rebooted it for 5-6 months.