With the help of tim942’s post in this thread, I was able to get my Yealink T42G phone, running firmware 220.127.116.11, to automatically retrieve voicemail from an Asterisk server.
1. Enable Enhanced DSS Keys (EDK) in your config file:
features.enhanced_dss_keys.enable = 1
2. In the phone’s web UI, on the Dsskey tab, set a DSS key Type to “Custom Key”.
3. Enter the macro/number string in the Value. Example: *97$Cp4$1453721#4133#$Tdtmf$
$Cwc$ – Macro to wait until call is connected before continuing
$Cp#$ – Macro to wait for # seconds
$Tdtmf$ – Macro to submit the preceding numbers as DTMF tones
The example macro dials *97 to reach the Asterisk voicemail system, waits four seconds, then dials, as DTMF tones, the mailbox number 1453721 and password 4133. Hash tags (#) are added to let Asterisk know that an entry is completed.
To code that in a config file on line key 7:
linekey.7.type = 73
linekey.7.value = *97$Cp4$1453721#4133#$Tdtmf$
linekey.7.line = 0
linekey.7.label = Voicemail
linekey.8.xml_phonebook = 0
According to tim942 on May 5, 2017, that only works on Custom Keys in DSS. He wishes it would work in the Address Book. I wish it would work in the Account > Advanced > Voice Mail field so the user could use the envelope icon rather than a DSS key to retrieve voicemail.