Difference between revisions of "WorkMan Agent+WebAPI"

From WorkManSoft Wiki
Jump to navigationJump to search
 
(3 intermediate revisions by the same user not shown)
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
+
<pre>
  echo "CALLERID = " . $_REQUEST["callerid"] . "<br>";
+
  <?php
  echo "CALLEDID = " . $_REQUEST["calledid"] . "<br>";
+
    echo "CALLERID = " . $_REQUEST["callerid"] . "<br>";
  echo "MY EXTENSION = " . $_REQUEST["extension"] . "<br>";   
+
    echo "CALLEDID = " . $_REQUEST["calledid"] . "<br>";
  echo "MACHINENAME = " . $_REQUEST["machinename"] . "<br>";   
+
    echo "MY EXTENSION = " . $_REQUEST["extension"] . "<br>";   
  echo "IP = " . $_REQUEST["ip"] . "<br>";   
+
    echo "MACHINENAME = " . $_REQUEST["machinename"] . "<br>";   
?>
+
    echo "IP = " . $_REQUEST["ip"] . "<br>";   
 +
  ?>
 +
</pre>
  
 
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!
Line 32: Line 34:
 
[[File:Webapicallcontrol.jpg]]
 
[[File:Webapicallcontrol.jpg]]
  
 +
=== Parameters being sent to Internet Explorer ===
 +
 +
* callerid_secret is used when an secure key is configured, otherwise ordinary callerid is used
 +
* calledid_secret is used when an secure key is configured, otherwise ordinary calledid is used
  
 
=== Call Control ===
 
=== Call Control ===
Line 44: Line 50:
  
 
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.
 
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.
 +
 +
[[Category:WorkMan Agent]]

Latest revision as of 15:54, 26 April 2011

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"] . "<br>";
    echo "CALLEDID = " . $_REQUEST["calledid"] . "<br>";
    echo "MY EXTENSION = " . $_REQUEST["extension"] . "<br>";  
    echo "MACHINENAME = " . $_REQUEST["machinename"] . "<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!

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

Parameters being sent to Internet Explorer

  • callerid_secret is used when an secure key is configured, otherwise ordinary callerid is used
  • calledid_secret is used when an secure key is configured, otherwise ordinary calledid is used

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.