Playing an audio file before connecting an exnteranl (mobile) extention to the remote party

In our FreePBX setup we have 2 internal, desk, phones and one extension setup to call out to a mobile number.
This is done split so the external number is only called if the internal phones are not picked up or, if we don’t forget it, set to DND before we leave the office.
Problem is that if a call is forwarded, we see the office number and not the original callerID, making number matching to known callers (clients) impossible and therefore the response to the call not personal.
Whilst I understand KPN requires this, CallerID spoofing, it’s a bit annoying.
As such I was wondering if I can play an audio fragment to the remote party, me or my business partner when answering the mobile call, before Asterisk/freePBX connects the call through.
In effect the sequence would be:

  • call is routed to extension with mobile number as first and only paramater (if unreachable it goes to Voicemail on the PBX)
  • if the call is answered
  • play an audio file
  • then connect the call
  • if unanswered after timeout PBX goes to internal voicemail.
    The script options above marked * need to be implemented.
    Voicemail is disable on the mobile phone line.
    Call confirm is off as it only will read the phone number and not the name.
  • directly play audio file (best choice)
    if not possible:
  • use call confirm (option 3) and play audio file instead of spelling the callerID if a match is available in the system.

There are various ways to achieve this. On the extension that calls out to a mobile phone, set up the find me/follow me tab with the outside number of your mobile phone (with a ‘#’ behind that number.) In the announcement field, insert the name of an announcement you have recorded that voices something like “Office overflow.”

Then when the call flows to your extension, it will go out via follow me and play the announcement when you answer.

The other option is to use a ring group with your mobile phone in it which gives you some additional options to like *press 1 to accept, 2 to decline, etc."

The audio file needs to be selectable.
Which would work if you could set the remote announce option dynamically.
If there is a way to do this, based on CID, the solution (with a bit of work) is clear.
Any suggestions?
(combined with call confirm this would give the option to know which client is calling and then accept or reject)

I’ve been able to set the unknown caller audio, now the following 2 things need to be changed and any help is greatly appreciated.

  • make sure that the ALT audiofile is set to some value available in the FreePBX phonebook and/or via supervecta (matching audio file required in custom/ ofcourse)
  • upon playback (background line) insert a 2-3 second silence before playback starts.

Removal of all the IVR code, insert just a 5 second silence delay, followed by a playback of “connecting” or something and then connect the call.
Obviously if you hangup before that, the ring group should fail over to the destination set there (which in our case is voicemail).

Any suggestions?

silence fixed, using the silence/1 or 2 audio files and & to string them together.

I will leave the IVR bits in place, although it would helpt to set a timeout for it to automatically select option 1.