Howto:Simple Linear ACD with Voicemail XML Script: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
m (New page: 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 ...)
 
 
(21 intermediate revisions by 3 users not shown)
Line 19: Line 19:
*at the end, when all agents have been tried
*at the end, when all agents have been tried
**route call to VM if no busy agents
**route call to VM if no busy agents
**disconnect with cause code "busy", if busy agents available
**disconnect with cause code "busy", if an agent in the call distribution is busy


The call distribution is intentional designed so that the first free agent gets the most calls.
The call distribution is intentional designed so that the first free agent gets the most calls.
Line 34: Line 34:
; vm.txt : 300
; vm.txt : 300


Please note, that this script is exemplary and free and can be modified to fulfill .
Please note, that this script is exemplary and free and can be modified to fulfill your special requirements.




Line 40: Line 40:
The outline for the following configuration scenario shall be as follows:
The outline for the following configuration scenario shall be as follows:
*Create a new folder on the compact flash card e.g. "acd".
*Create a new folder on the compact flash card e.g. "acd".
*Place a file with XML script listed below and named "acd.xml".
*Place a files provided in the download section in this folder.
*Additionally place the text files with numbers of agents and voicemail box in this folder.
*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''.
*Create a new voicemail object in the PBX with URL <code>http://127.0.0.1/drive/CF0/acd/acd.xml?$_pbxfwd=true</code>.
*In case an innovaphone voicemail is used instead of an external voicemail box:
*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>
**Create a dummy user with a CFU to <VM-Number>+<Box-Number>


===Known Problems===


Contents of acd.xml:
*Don't forget to provide additional option to the script URL, since it is required for the executing of call forwards: <code>?$_pbxfwd=true</code>
<code xml>
*Make sure there are no administrative CFUs (using boolean, "only not for" etc.) configured on the PBX users/agents.
<?xml  version="1.0" encoding="utf-8" ?>
*Make sure the CFNR Timeout is longer than timeout defined in the ACD XML Script. CFNR defined on User Objects with no registered device are executed immediately.
<voicemail xmlns="http://www.innovaphone.com/xsd/voicemail6.xsd">
*If "No Answer" on Trunk Object is configured, configure a CFNR on the ACD VoiceMail Object with "-" (minus sign) as number (see [[Reference7:Administration/PBX/Objects/Edit CFs]] for more information).
 
<!-- Place call. IN $number=e164, OUT $call-result=away(CFU),busy,unreachable(unregistered),timeout(no answer) -->
 
<function define="call">
  <!-- Assign 'happy end' as default  -->
  <assign out="$call-result"  value="ok"  />
 
  <if cond="$number">
    <!-- check, whether a CFU is active  -->
    <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>
 
    <!-- forward the call  -->
    <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" />
   
    <!-- call current $number  -->
    <switch var="$call-result">
      <case equal="ok">
        <pbx-disc />
        <!-- happy end  -->
      </case>
    </switch>
 
    <!-- next round  -->
    <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>
 
  <!-- Silence (just a workaround to be able to disconnect with busy cause)  -->
  <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>
 
</code>
 
 
===Known Problems===
*no distribution to Broadcast Groups or Wating Queues possible


== Download ==
*[http://wiki.innovaphone.com/index.php?title=Howto:Wiki_Sources#linearacd Download] the complete file package of scripts and files described in this article.


== Related Articles ==
== Related Articles ==
Line 139: Line 60:


[[Category:Sample|{{PAGENAME}}]]
[[Category:Sample|{{PAGENAME}}]]
<!-- voice recording, legal interception -->

Latest revision as of 13:48, 23 August 2021

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 an agent in the call distribution is busy

The call distribution is intentional designed so that the first free agent gets the most calls.


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 your special requirements.


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 files provided in the download section in this folder.
  • 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>

Known Problems

  • Don't forget to provide additional option to the script URL, since it is required for the executing of call forwards: ?$_pbxfwd=true
  • Make sure there are no administrative CFUs (using boolean, "only not for" etc.) configured on the PBX users/agents.
  • Make sure the CFNR Timeout is longer than timeout defined in the ACD XML Script. CFNR defined on User Objects with no registered device are executed immediately.
  • If "No Answer" on Trunk Object is configured, configure a CFNR on the ACD VoiceMail Object with "-" (minus sign) as number (see Reference7:Administration/PBX/Objects/Edit CFs for more information).

Download

  • Download the complete file package of scripts and files described in this article.

Related Articles

How to Configure the innovaphone Voicemail