Playing alaw files with extension alw


Does anyone know if it is possible to specify in the asterisk config that files with extension alw should be treated as alaw files. This would be good for backwards compatibility and for running my application together with other telephony solutions we have.

Or must I modify the asterisk code for this?

Thanks in advance!

I solved this one easily myself by modifying formats/format_pcm.c
and rebuilding asterisk:

static const struct ast_format alaw_f = {
.name = “alaw”,

  • .exts = “alaw|al”,
  • .exts = “alaw|al|alw”,
    .format = AST_FORMAT_ALAW,