diff -aur asterisk-13.4.0.orig/formats/format_wav.c asterisk-13.4.0.patched/formats/format_wav.c --- asterisk-13.4.0.orig/formats/format_wav.c 2015-06-04 19:20:51.000000000 +0600 +++ asterisk-13.4.0.patched/formats/format_wav.c 2016-11-19 18:21:31.957821553 +0700 @@ -326,8 +326,10 @@ if we did, it would go here. We also might want to check and be sure it's a valid file. */ struct wav_desc *tmp = (struct wav_desc *)s->_private; - if ((tmp->maxlen = check_header(s->f, ast_format_get_sample_rate(s->fmt->format))) < 0) + int hz = ast_format_get_sample_rate(s->fmt->format); + if ((tmp->maxlen = check_header(s->f, hz)) < 0) return -1; + tmp->hz = hz; return 0; }