Koozali.org: home of the SME Server

Play An Audio FIle when a Particular Inbound Line is called

Offline Teviot

  • *
  • 610
  • +0/-0
Play An Audio FIle when a Particular Inbound Line is called
« on: March 25, 2012, 07:14:11 AM »
Hi All

I want to set up an audio file to play when a inbound trunk is called. I allready have the audio file and can't work out how to get it to play when the inbound trunk is called.

(Example)
Anyone calls number 1234.   Number 1234 is answered by my PBX.  My PBX plays prerecorded audio file with containing information.  PBX hangs up after Audio File is played.

Can anyone help me??
« Last Edit: March 25, 2012, 07:16:14 AM by M0GLJ »
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Play An Audio FIle when a Particular Inbound Line is called
« Reply #1 on: March 26, 2012, 04:46:29 PM »
You can do what you request with a custom app.  You can use the Asterisk Playback command to play the sound file.

If you don't wish to write any code you can use an IVR with no choices defined.  You will need to rename your sound file to usergreetingnnnn.ttt, where nnnn is a unique 4 digit number and ttt is the recording type  (wav, gsm, ulaw, etc.)

Create an IVR and select your usergreeting as the sound file.  Set the IVR outcome to Hangup and don'r select any key choices.

Kind Regards

S

Offline Teviot

  • *
  • 610
  • +0/-0
Re: Play An Audio FIle when a Particular Inbound Line is called
« Reply #2 on: March 31, 2012, 02:38:02 AM »
S

Can you give me some website with examples of custom apps to look at so I can put an app of my own together
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Play An Audio FIle when a Particular Inbound Line is called
« Reply #3 on: March 31, 2012, 10:37:45 AM »
custom apps are just regular Asterisk extensions.conf contexts.  You can read up on them at any of the Asterisk related web sites (e.g. voip-info.org) or you can grab a copy of "Asterisk, the definitive guide" published by O'Reilly.


Kind Regards

S