Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Http Request:
http://localhost:9888/xcally/svc/channels/xml

XML answer:

Code Block
languagexml
<root xmlns:xsi=

...

"http://www.w3.org/2001/XMLSchema-instance

...

" xmlns:xsd=

...

"http://www.w3.org/2001/XMLSchema

...

">
<method>channels</method>

...


<response>true</response>

...


<row>

...


<extension>600</extension>

...


<queue/>

...


<calldata/>

...


<channel/>

...


<evt/>

...


<uniqueid/>

...


<status>ACTIVE</status>

...


<duration>2</duration>

...


<codec>PCMU</codec>

...


</row>

...


</root>

Click to Call simple HTML example:
The following html snippet create a simple Click2Call web form, allowing you to place brower calls through the xCALLY phone bar:

<html>
<head>
<script type=”text/javascript” language=”javascript”>

...


Code Block
languagexml
<html>
<head>
<script type="text/javascript" language="javascript">
function originate_call()

...


{

...


//alert(document.getElementById(

...

"phone").value);

...


var s = document.getElementById(

...

"phone").value;

...


var xmlhttp;

...


if (window.XMLHttpRequest)

...


{// code for IE7+, Firefox, Chrome, Opera, Safari

...


xmlhttp=new XMLHttpRequest();

...


}

...


else

...


{// code for IE6, IE5

...


xmlhttp=new ActiveXObject(

...

"Microsoft.

...

XMLHTTP");

...


}

...


xmlhttp.onreadystatechange=function()

...


{

...


if (xmlhttp.readyState==4 && xmlhttp.status==200)

...


{

...


//document.getElementById(

...

"myDiv").innerHTML=xmlhttp.responseText;

...


}

...


}

...


xmlhttp.open(

...

"GET", "http://localhost:9888/xcally/svc/originate/xml/

...

" + s, true);

...


xmlhttp.send();

...


}

...


</script>

...


<title>Application Executer</title>

...


</head>

...


<body>

...


<p>

...


Phone number

...


<input type=

...

"text" id=

...

"phone">
<input type="button" value="ORIGINATE" onclick="originate_call();

...

"/>

...


</body>

...


</html>


xcally click to call form