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?
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’
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.
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.