Howto:ACD with Voicemail XML Script and external Database or Application: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
(New page: This article describes how to setup a simple automated call distribution by using custom voicemail XML script and an external database or a CRM application. ==Applies To== This informatio...)
 
(code examples fixed)
Line 34: Line 34:
     <pbx-getcallinfo out-cgpn="$cgpn" out-cdpn="$cdpn" out-leg2="$leg2" />
     <pbx-getcallinfo out-cgpn="$cgpn" out-cdpn="$cdpn" out-leg2="$leg2" />
      
      
    <!-- default number for call froward, in case URL not available -->
    <assign out="$forward" value="999"/>
   
     <!-- external database query -->
     <!-- external database query -->
     <exec url="http://172.16.0.17/countrybynumber.pl?cgpn=$cgpn"/>
     <exec url="http://172.16.0.17/query.php?cgpn=$cgpn"/>
   
    <!-- forward the call to Number 999 (e.g. Multicast Announcement Object) -->
    <pbx-fwd e164="999"  out-cause="$cause" barge-in="false" />
      
      
    <!-- forward the call to the number returned by the URL -->
    <pbx-fwd e164="$forward"  out-cause="$cause" barge-in="false" />
      
      
   </function>
   </function>
Line 73: Line 75:
?>
?>
</code>
</code>


===Known Problems===
===Known Problems===

Revision as of 10:12, 14 April 2009

This article describes how to setup a simple automated call distribution by using custom voicemail XML script and an external database or a CRM application.

Applies To

This information applies to

  • innovaphone PBX, V7


More Information

A frequently asked feature for incoming call centers is ability to connect incoming customer calls to their respective personal point of contact(an agent or agent group). The relationship of customer calling number and responsible agent is stored in the external database or CRM application. For this purpose a custom XML voicemail script can be used to perform a query from innovaphone PBX to an external application via HTTP.


The voicemail command exec url executes an HTTP GET CGI-request. The URL is supposed to contain arbitrary script variables. The remote CGI script shall return a short voicemail script comprising assign elements.

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


Please note, that the scripts are 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 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.xml?$_pbxfwd=true.


Contents of acd.xml: <xml version="1.0" encoding="utf-8" ?> <voicemail xmlns="http://www.innovaphone.com/xsd/voicemail6.xsd">

  <function define="Main">
    <pbx-getcallinfo out-cgpn="$cgpn" out-cdpn="$cdpn" out-leg2="$leg2" />
    
    <assign out="$forward" value="999"/>
   
    <exec url="http://172.16.0.17/query.php?cgpn=$cgpn"/>
    
    <pbx-fwd e164="$forward"  out-cause="$cause" barge-in="false" />
    
  </function>

</voicemail

A very simple server side code example based on PHP: <?php

  //default forward destination
  $forward = "999";
  
  //just for test: if CGPN is 235, forward to 103
  //implement your db query etc. here instead
  if ($_GET['cgpn'] == "235") $forward = "103";


  echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n";
  echo "<voicemail xmlns=\"http://www.innovaphone.com/xsd/voicemail6.xsd\">\r\n";
  echo "  <assign out=\"\$forward\" value=\"$forward\"/>\r\n";
  echo "</voicemail>\r\n";

?>


The response of the PHP script should be as follows(if CGPN is 235): <?xml version="1.0" encoding="utf-8"?>

  <voicemail xmlns="http://www.innovaphone.com/xsd/voicemail6.xsd">
     <assign out="$forward" value="103"/>
  </voicemail>

?>

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

Related Articles

How to Configure the innovaphone Voicemail