Versions Compared

Key

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

...

xCALLY phone bar API list v.2:

xcally asterisk call apiImage Removed


Perform a Call (originate):
http://localhost:9888/xcally/svc/originate/phonenumber
http://localhost:9888/xcally/svc/originate/xml/phonenumberxcally asterisk answer apiImage Removed


Answer a Call (answer):
http://localhost:9888/xcally/svc/answer
http://localhost:9888/xcally/svc/answer/xmlxcally asterisk hanup apiImage Removed


Hang-up a Call (hangup):
http://localhost:9888/xcally/svc/hangup/phonenumber
http://localhost:9888/xcally/svc/hangup/xml/phonenumberxcally asterisk music on holdImage Removed


MOH (holding):
http://localhost:9888/xcally/svc/holding/phonenumber
http://localhost:9888/xcally/svc/holding/xml/phonenumber
Place on hold an active call or move on to the Pause status an agent not on a callxcally active asterisk callsImage Removedxcally active asterisk callsImage Removed


Show the active calls (channels):
http://localhost:9888/xcally/svc/channels
http://localhost:9888/xcally/svc/channels/xmlxcally active asterisk callsImage Removed


Show the single active channel (channel)
http://localhost:9888/xcally/svc/channel/phonenumber
http://localhost:9888/xcally/svc/channel/xml/phonenumberxcally asterisk recent callsImage Removed


Show the Recent calls (recents):
http://localhost:9888/xcally/svc/recents
http://localhost:9888/xcally/svc/recents/xml

 


Show the Queues:
http://localhost:9888/xcally/svc/queues
http://localhost:9888/xcally/svc/queues/xml 


Show the Peer Information:
http://localhost:9888/xcally/svc/peer
http://localhost:9888/xcally/svc/peer/xmlxcally asterisk blind transferImage Removed


Blind Transfer (transfer)
http://localhost:9888/xcally/svc/transfer/phonenumber
http://localhost:9888/xcally/svc/transfer/xml/phonenumberxcally asterisk attended transferImage Removed


Attended Transfer (atxfer)
http://localhost:9888/xcally/svc/atxfer/phonenumber
http://localhost:9888/xcally/svc/atxfer/xml/phonenumber

xcally asterisk conferenceImage Removed


Conference (conference):
http://localhost:9888/xcally/svc/conference/phonenumber*
http://localhost:9888/xcally/svc/conference/xml/phonenumber*

...

JSON answer:
{“method”:”channels”,”response”:”true”,”rows”:[{“extension”:”600″,”queue”:””,”calldata”:””,”channel”:””,”event”:””, “uniqueid”:””,”status”:”ACTIVE”,”duration”:6,”codec”:”PCMU”}]} 


XML example:

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:


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