Before posting a bug report on bugs.digium.com, I’d like to hear from others about the functionality of the Playtones application and, when dtmfmode=inband, of SendDTMF and the D() option of Dial, both of which also fall back on using the same primitive as Playtones (senddtmf_exec(struct ast_channel *chan, void *data) in apps/app_senddtmf.c). On several machines I set up, and both with Asterisk 1.0.7 and the CVS HEAD of one week ago, none of them works.
For Playtones, I have the following lines in extensions.conf:
exten => **804,1,Answer
exten => **804,2,PlayTones(!697+1336/1000,!0/100) ; Play 2
exten => **804,3,PlayTones(!770+1336/1000,!0/100) ; Play 5
exten => **804,4,PlayTones(!852+1336/1000,!0/100) ; Play 8
exten => **804,5,PlayTones(!852+1477/1000,!0/100) ; Play 9
exten => **804,6,PlayTones(ring)
exten => **804,7,Hangup
Therefore, I would expect that dialling the extension “**804” a caller heard the acoustic equivalent of the DTMF tones for “2589”, with each digit playing for one second and interdigit separation of 100 ms. However, I hear nothing, although the CLI reports:
OpenWrt*CLI>
-- Executing Answer("SIP/spa3kline1-ebf5", "") in new stack
-- Executing Playtones("SIP/spa3kline1-ebf5", "!697+1336/1000|!0/100") in new stack
-- Executing Playtones("SIP/spa3kline1-ebf5", "!770+1336/1000|!0/100") in new stack
-- Executing Playtones("SIP/spa3kline1-ebf5", "!852+1336/1000|!0/100") in new stack
-- Executing Playtones("SIP/spa3kline1-ebf5", "!852+1477/1000|!0/100") in new stack
-- Executing Playtones("SIP/spa3kline1-ebf5", "ring") in new stack
-- Executing Hangup("SIP/spa3kline1-ebf5", "") in new stack
OpenWrt*CLI>
Note that the CLI lines are printed very quickly, rather than taking 4 * (1000 + 100) milliseconds.
For SendDTMF, the entry in extensions.conf is:
exten => **802,1,Answer
exten => **802,2,SendDTMF(w1w2w3w4w#w)
exten => **802,3,Hangup
Again, calling **802 results in the call being answered, but nothing played if dtmfmode=inband. Here the situation is even worse, because the CLI doesn’t report the execution of Hangup():
OpenWrt*CLI>
-- Executing Answer("SIP/spa3kline1-1c5b", "") in new stack
-- Executing SendDTMF("SIP/spa3kline1-1c5b", "w1w2w3w4w#w") in new stack
…and if I issue the command “show channels” before hanging up on the caller’s side I get:
OpenWrt*CLI> sip show channels
Peer User/ANR Call ID Seq (Tx/Rx) Format
192.168.0.51 spa3kline1 7d3f87e0-d7 00101/00102 ulaw
1 active SIP channel(s)
This goes away after hanging up:
OpenWrt*CLI> show channels
Channel (Context Extension Pri ) State Appl. Data
0 active channel(s)
Similar results occur with the D() option of Dial(), as in the following case where calling the extension **801 should result in a call being placed to the extension 3001, and in the digits “1234#” being sent to the callee (with 500 ms pauses before and after the string of digits) before bridging the two sides:
exten => **801,1,Dial(local/3001,50,D(w1234#w${EXTEN:1}#))
As in the SendDTMF case, this only works if dtmfmode is NOT inband.
Can anybody run a quick test on his/her system and confirm or refute my results?
Thanks in advance,
Enzo