VGSM Known Issues
From VoiSmart Open Source Wiki
DTMF issues
Inconsistencies in inbound DTMF detection
While the GSM network does have a specific protocol to transport out-of-band DTMF tones from the mobile terminal to the phone network, no such provision is available in the opposite direction. DTMF tones sent to the vGSM modules will only be transported in-band and will be subject to distortion by the GSM codecs.
Thus, inbound DTMF handling is not guaranteed to be reliable, the quality of DTMF detection is heavily dependent on the CODEC used and on the specific CODEC implementation.
Our tests revealed that using GSM Full Rate CODECs and relaxed DTMF detection in vgsm.conf (dtmf_relax=true) will usually lead to reliable decoding on the italian networks, however, other networks severely (on purpose?) degrade DTMF tones to the point of making them completely unusable.
Furtherly you may try to make the GSM module advertise support only for restricted CODECs by setting the following parameters in vgsm.conf:
amr_enabled gsm_hr_enabled gsm_preferred
We are investigating the possibility to implement a DTMF detector that could be tolerant to the GSM CODECs distortion and reliable enough for general use.
Possible (experimental) workaround using asterisk RADIO_RELAX
First of all, you need to check the codec used with your mobile operator. To do that, during a call, issue the command "vgsm me show <module_name> moni", where module_name is the name of your module as in vgsm.conf. For example, if your module is called "tim" :
vgsm me show tim moni
Then watch the output:
*CLI> vgsm me show tim moni Serving Cell I Dedicated channel chann rs dBm MCC MNC LAC cell NCC BCC PWR RXLev C1 I chann TS timAdv PWR dBm Q ChMod 10 20 -90 222 01 D6B1 1649 2 4 33 -103 13 I h 2 3 5 -89 4 A_HR
Now look at the value under the last field "ChMod":
- A_HR = means AMR Half Rate
- S_HR = means GSM Half Rate
- S_EFR = means GSM Enhanched Full Rate
Now, what we can do?
- If the codec is S_EFR Asterisk dsp routines are able to detect DTMF, normally.
- If the codec is A_HR you are out of luck: try with
amr_enabled = no
into vgsm.conf . If the moni command changes to S_HR we can go to next step. Otherwise nothing can be done.
- If the codec is S_HR you can try to enable RADIO_RELAX into asterisk dsp routines. To do that, with asterisk 1.4, issue "make menuconfig", then select submenu "Compiler Flags" and enable the flags "RADIO_RELAX". At this point rebuild asterisk and test again.
In our tests with RADIO_RELAX option we have the following scenarios:
- S_EFR = dtmf are correctly detected, even without RADIO_RELAX
- S_HR = dmtf are correctly detected almost always, but sometimes a digit is not (1 out of 20)
- A_HR = dtmf are never recognized

