Difference between revisions of "WorkMan Agent+WebAPI"

From WorkManSoft Wiki
Jump to navigationJump to search
Line 14: Line 14:
 
This is the URL to our test-page on the web. The code is quite easy:
 
This is the URL to our test-page on the web. The code is quite easy:
  
<?php
+
  <?php
  echo "CALLERID = " . $_REQUEST["callerid"] . "<br>";
+
    echo "CALLERID = " . $_REQUEST["callerid"] . "<br>";
  echo "CALLEDID = " . $_REQUEST["calledid"] . "<br>";
+
    echo "CALLEDID = " . $_REQUEST["calledid"] . "<br>";
  echo "MY EXTENSION = " . $_REQUEST["extension"] . "<br>";   
+
    echo "MY EXTENSION = " . $_REQUEST["extension"] . "<br>";   
  echo "MACHINENAME = " . $_REQUEST["machinename"] . "<br>";   
+
    echo "MACHINENAME = " . $_REQUEST["machinename"] . "<br>";   
  echo "IP = " . $_REQUEST["ip"] . "<br>";   
+
    echo "IP = " . $_REQUEST["ip"] . "<br>";   
?>
+
  ?>
  
 
Note that only the first two is implemented in the current release but is expected to change during the next few months. On the screenshot above the Webserver Start checkbox refer to the usage of Call Control through the web. If you only need flash this can be turned off, but don't forget to save!
 
Note that only the first two is implemented in the current release but is expected to change during the next few months. On the screenshot above the Webserver Start checkbox refer to the usage of Call Control through the web. If you only need flash this can be turned off, but don't forget to save!

Revision as of 21:45, 12 November 2010

WorkMan Agent+WebAPI is the same as WorkMan Agent but adds support for Internet Explorer so that contactcards can be displayed in your webbased solutions.

Flash incoming call

WebAPI - Flash incoming calls The purpose of WebAPI is to allow webapplications to be aware of telephony-data. You enter the configure dialog and set up on which events you want

Webapi.jpg

You can automatically load URLs on startup of WorkMan Agent and when there is an incoming ring and incoming answered. By right-clicking you can get a list of possible options. If you don't have your page ready yet you use:

http://agent.larsson.tc/agenttest.php?callerid={callerid}&calledid={calledid}

This is the URL to our test-page on the web. The code is quite easy:

 <?php
   echo "CALLERID = " . $_REQUEST["callerid"] . "
"; echo "CALLEDID = " . $_REQUEST["calledid"] . "
"; echo "MY EXTENSION = " . $_REQUEST["extension"] . "
"; echo "MACHINENAME = " . $_REQUEST["machinename"] . "
"; echo "IP = " . $_REQUEST["ip"] . "
"; ?>

Note that only the first two is implemented in the current release but is expected to change during the next few months. On the screenshot above the Webserver Start checkbox refer to the usage of Call Control through the web. If you only need flash this can be turned off, but don't forget to save!

The flash-function can be easily turned on and off. Just rightclick and turn Use WebAPI on or off:

Webapienable.jpg

So what does it look like when it's working? Well something like this if you are using our test-page:

Webapicallcontrol.jpg


Call Control

By opening up the local adress and port 21080 you can access the Call Control features. This requires that WorkMan Agent's webserver has been started (see flash incoming calls screenshot over configuration).

Webapicallcontrol.jpg

Answering is just a call to the path api_answer.

Hangup is just a call to the api_hangup. As a response you get a ; delimited text string such as API_HANGUP;OK.

To dial you call api_dial and the parameter phonenum. WorkMan Agent also parse + ( ) and spaces to build a correct phonenumber depending upon your local settings.