Upgrade 3CX to v18 and get it hosted free!

Asterisk tips testing number

Author image

Asterisk Howto: Set up a test number

This recipe will allow you to dial a number, hear the caller ID number and channel associated with the number and then record/playback a test message, to verify the phone is functioning. It’s useful for testing phones and locating what extension and/or channel is associated with a phone.

This recipe was tested with Asterisk 1.6.

You need to have an exten entry in extensions.conf to enter into this channel. For the purposes of this example, extension 802 was used.

Example

This example depends on two additional sound files: channel and readback-instructions. Channel is simply the word “Channel” while readback-instructions is a recording that says, “Now entering readback mode. Please record a message after the beep and press # to finish your recording. The system will then play your message back to you, to test sound quality on this line.”

exten => 802,1,Ringing()
exten => 802,n,Wait(3)
exten => 802,n,Answer()
exten => 802,n,Playback(dir-multi3)
exten => 802,n,Wait(1)
exten => 802,n,SayDigits(${CALLERID(num)})
exten => 802,n,Wait(1)
exten => 802,n,Playback(channel)
exten => 802,n,Wait(1)
exten => 802,n,SayAlpha(${CHANNEL})
exten => 802,n,Wait(1)
exten => 802,n,Playback(readback-instructions)
exten => 802,n,Record(/tmp/802-${UNIQUEID}.wav,0,30)
exten => 802,n,Playback(/tmp/802-${UNIQUEID})
exten => 802,n,System(rm /tmp/802-${UNIQUEID}.wav)
exten => 802,n,Wait(1)
exten => 802,n,Playback(vm-goodbye)
exten => 802,n,Hangup()


Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.