Closed pali closed 4 years ago
Thanks for the patch. Could you please add a test for this new functionality to t/19_call_with_dtmf.t too?
Done! I added PCMA test into file t/19_call_with_dtmf.t and also added a new simple test t/24_dtmf_audio.t directly for DTMF audio module which does not use SIP.
During testing I found two issues. First issue was that I used incorrect formula for calculating a-law algorithm and second issue was in parsing media attributes in sub dtmf (name 'PCMA/8000' does not have to be present but there can be format 8 which is PCMA). Both issues I fixed and updated pull request.
If you think that that tests should be extended, please let me know. I can imagine another test: generate PCMU DTMF, convert PCMU to PCMA according to ITU-T Rec. G.711 tables and then extract DTMF from this PCMA audio. This could prove that PCMU a PCMA audio code is compatible.
@noxxi Anything else related to this pull request is needed?
Thanks for your contribution. I've merged it into Net::SIP but add some smaller enhancements and fixes on top, see bf9e4fc8d.
ok, great!
Some telecommunication operators prefer PCMA codec over PCMU. Analogue fixed telephone lines support DTMF only via in-band channel so RFC2833 cannot be used.
This patch adds simple support for generating and extracting DTMF via PCMA codec. PCMU is still preferred and default. DTMF over PCMA would be used only when user explicitly configure PCMA via rtp_param or when remote peer is using PCMA (and not PCMU).