[VoIP] Legacy Ringback from Recordings in Asterisk

John R. Covert john_reads_cnet_via_archives at covert.org
Tue Apr 3 07:08:44 CDT 2007


It has been asked before if it's possible in Asterisk to use a
recording for ringback.  The answer is YES.  IMHO, don't bother
unless you've got a good ulaw recording, but anyway, here's how.

In musiconhold.conf:

[5xbring]
mode=files
directory=/var/lib/asterisk/moh-5xbring

Put a single .ulaw file in that directory.  Note that I had to
take an mp3 original; I need to replace this with something that
was never compressed.  I trimmed some silence from the front so
that we get ring pretty quickly (so that people will hear it if
I answer on the first actual ring before the "tone plant" cycles
in with this recording).  I made it an exact number of cycles
long so that if it wraps around on no answer, it doesn't sound
weird.

sox 5xbring.mp3 -r 8000 -tul 5xbring.ulaw trim 2.7 50

Then the dial statement in extensions.conf gets the music-on-hold
modifier with the class created above, thus:

Dial(${RINGALL},120,m(5xbring)t)

I use it whenever ringing my "reach-me" numbers, whether ringing
everything in the PBX, the default for generic incoming calls, or
when forwarding to my cellphones and remote stations when I'm
travelling.  You'd hear it if you call me on CNET 1-263-9900.

/john

P.S.: I think we lost some submissions from last Friday, because I sent
this in once before and there are some gaps in the archive, as
though we all went on hols [getting ready for my UK/Germany trip
next week].


More information about the VoIP mailing list