Howto:Simple Linear ACD with Voicemail XML Script
This article describes how to setup a simple automated call distribution by using custom voicemail XML script.
Applies To
This information applies to
- innovaphone PBX, V7 hotfix 1
More Information
In most cases it is possible to distribute incoming calls on innovaphone PBX as desired by using PBX features like a broadcast call, waiting queue and user groups. But some scenarios require more complex call routing between user objects. For this purpose a custom XML voicemail script can be used to implement a desired call distribution scenario.
This script is based on an example for a simple call flow:
- route incoming call to agents one by one
- try next agent if
- agent is away(CFU is enabled) or not registered
- agent is busy
- agent is not responding after 15 sec.
- at the end, when all agents have been tried
- route call to VM if no busy agents
- disconnect with cause code "busy", if busy agents available
The call distribution is intentional designed so that the first free agent gets the most calls.
![Call Distribution Diagramm.png](/images/3/34/Call_Distribution_Diagramm.png)
To make the script somewhat generic the numbers of agents and mailbox number are stored in separate files:
- 1.txt
- 101
- 2.txt
- 102
- 3.txt
- 103
- vm.txt
- 300
Please note, that this script is exemplary and free and can be modified to fulfill .
Configuration
The outline for the following configuration scenario shall be as follows:
- Create a new folder on the compact flash card e.g. "acd".
- Place a file with XML script listed below and named "acd.xml".
- Additionally place the text files with numbers of agents and voicemail box in this folder.
- Create a new voicemail object in the PBX with URL http://127.0.0.1/drive/CF0/acd/acd.xml?$_pbxfwd=true.
- In case an innovaphone voicemail is used instead of an external voicemail box:
- Create a dummy user with a CFU to <VM-Number>+<Box-Number>
Contents of acd.xml:
<?xml version="1.0" encoding="utf-8" ?>
<voicemail xmlns="http://www.innovaphone.com/xsd/voicemail6.xsd">
<function define="call">
<assign out="$call-result" value="ok" />
<if cond="$number">
<pbx-finduser-e164 e164="$number" out-cn="$cn" />
<if cond="$cn">
<pbx-query-obj name="$cn" type="cfu" out="$cfu" />
<if cond="$cfu">
<assign out="$call-result" value="away" />
<return />
</if>
</if>
<pbx-fwd e164="$number" out-cause="$cause" barge-in="false" sec="15" />
<switch var="$cause">
<case equal="17">
<assign out="$call-result" value="busy" />
<assign out="$busy" value="true" />
</case>
<case equal="18">
<assign out="$call-result" value="unreachable" />
</case>
<case equal="128">
<assign out="$call-result" value="timeout" />
</case>
</switch>
</if>
</function>
<function define="Main">
<assign out="$prefix" value="1" />
<lib-strcat out-string="$file" string="$prefix" string2=".txt" />
<store-cookie root="" name="$file" out="$number" />
<while cond="$number">
<call name="call" />
<switch var="$call-result">
<case equal="ok">
<pbx-disc />
</case>
</switch>
<add value="$prefix" value2="1" out="$prefix" />
<lib-strcat out-string="$file" string="$prefix" string2=".txt" />
<assign out="$number" value="" />
<store-cookie root="" name="$file" out="$number" />
</while>
<store-get root="" name="silence.g711a" out-url="$ctrl" />
<pbx-prompt url="$ctrl" sec="1" barge-in="false" />
<if cond="$busy">
<pbx-disc cause="17" />
</if>
<else>
<store-cookie root="" name="vm.txt" out="$vmdummy" />
<pbx-fwd e164="$vmdummy" />
</else>
</function>
</voicemail>
Known Problems
- no distribution to Broadcast Groups or Wating Queues possible
Related Articles
How to Configure the innovaphone Voicemail