Howto:Announcement Before Answering (simplified)

From innovaphone-wiki

Jump to: navigation, search

This is a simplified version of the Howto:Announcement Before Answering utility. This version is based on an XML script that plays the announcement. As opposed to the other version, it will first play the announcement and then connect to the called party. The called party is not called simultaneously to playing the announcement. It is simpler in so far as it does not require to create a separate PBX object for each called party using this service.


Applies To

This information applies to

  • V10 SR10 PBX and later.

More Information


This announcement before answering configuration is based on the Voicemail PBX object. The Waiting Queue has a personal announcement configured separately for each PBX User object.

We assume an existing PBX user with the name PBX User 1 and number 201 with following desired behaviour: an external call to this user is always immediately connected to the announcement. The announcement is played and when it is finished, the caller is put through to the extension.

Create a Voicemail vm-txt. Configure the Script URL as http://x.x.x.x/drive/CF0/txtvormelden/announcement_before_answer.xml?$_trace=255 and the Number to 9 (check Voicemail Reference for more information).
Image:Announcement Before Answering (simplified) 01.png

Image:Announcement Before Answering (simplified) 01a.png
Call Forward to Voicemail
Create a so-called administrative call forward on the User object: create a CFU with Only Not. from 9 (which is the Number of the voicemail object) to the Number of the Voicemail object followed by the Number of the user (9202 in our example). This CFs can not be deleted by user configured CFs via a phone function key etc., but will be overridden by user configured CFUs (if there is one).
Image:Announcement Before Answering (simplified) 02.png

Finally you should have something like this:

Image:Announcement Before Answering (simplified) 04.png

Alternate Configuration of Redirect to Announcement

As an alternative to the aforementioned individual CFU for each user, you can create a routing rule prefixing the voicemail object's Number (9 in our example) to the respective incoming called party number in the trunk gateway's call routing table.


Please see the Download section for the most recent version of the voicemail script. The following commented version is reproduced here to demonstrate the idea, it may be outdated though.

<?xml version="1.0" encoding="utf-8" ?>
<voicemail xmlns="" _ver="--VER--">
<!-- text vor melden -->
<!-- this function is called when the voicemail object instantiates -->
<function define="Main">
<!-- prepare for receipt for overlapped dialled digits -->
<assign out="digitsdone" value="false"/>
<!-- terminate main loop as soon as inter-digit timer has elapsed -->
<event type="timer" name="guard">
<assign out="digitsdone" value="true"/>
<pbx-getcallinfo out-cgpn="$cgpn" out-cdpn="$cdpn" out-leg2="$leg2" />
<dbg string="### timer-expired: " string2="$cdpn"/>
<!-- catch call-info events (overlapped dialling) -->
<event type="call-info" block="false">
<dbg string="### call-info"/>
<!-- reset inter-digit timer -->
<timer name="guard" sec="0"/>
<timer name="guard" sec="4"/>
<!-- setup inter-digit time -->
<timer name="guard" sec="4"/>
<!-- wait for inter-digit timer to expire -->
<while notcond="$digitsdone">
<wait sec="1"/>
<dbg string="### wait"/>
<dbg string="### final called-party: " string2="$cdpn"/>
<!-- get announcement -->
<store-get root="" name="en_you_will_be_connected.g711a" out-url="$url"/>
<!-- play announcement -->
<pbx-prompt url="$url" barge-in="false"/>
<!-- transfer to final destination -->
<pbx-xfer e164="$cdpn" out-cause="$cause" />

Known Problems

  • The announcement is triggered by a call forward unconditional for the respective user. If the user is busy, the announcement will be played and only then the busy situation will be detected. Same goes true for an unreachable situation (e.g. no phone registered). It might be necessary to play around with more elaborate call forwards thus (e.g. define a Busy and/or Rejected target int the Trunk object).
  • The script supports overlapped dialling. This adds an additional 4 second delay before the announcement can be heard. If overlapped dialling is not a requirement, set the sec attribute in the <timer> tag to 0 wherever it is 4 in the original script.
  • When using the add voicemail object prefix in gateway routing, then also calls to otherwise invalid extensions will hear the announcement and only then a busy tone (as the extension is invalid)


Related Articles

Personal tools