Compte Utilisateur

Jump to Confluence navigation Side navigation Page Xenialab Templates Create XCALLY Motion V3 XCALLY Motion V3 XCALLY for Developers Phonebar API Owned by Product Knowledge Last updated: Jan 25, 2022 2 min read The XCALLY Phonebar provides CTI capabilities to call external application on one hand and many API to allow your applications to control the phonebar and perform several operations. API are easy to be called via http requests. The API answers are available via http JSON standard requests (XML is not supported). Endpoints are documented with the HTTP method for the request and a partial resource identifier. Example: GET /api/calls Prepend your Motion Phonebar URL to the resource identifier to get the full endpoint URL: http://domain:port/api/calls Default port is the 9888 (you can change the port inside the Motion GUI section agent/motiobar/advanced) Curly braces, {}, indicate values you have to supply. Example: GET /api/answer/{sessionId} The examples in the docs are cURL statements. You can run the statements on a command line to try out different API requests. In order to enable APIs, please see the configuration steps Here Please note we can update APIs from time to time Calls List calls Get information about the active calls. GET /api/calls Using curl: curl http://{domain}:{port}/api/calls -v NULL = 0, IDLE = 1, CONNECTING = 2, OUTBOUND CALL IN PROGRESS ALERTING = 4, CALLED NUMBER IS RINGING ACTIVE = 8, ACTIVE CALL RELEASED = 16, CHANNEL RELEASED (eg. ON TRANSFER COMPLETE) INCOMING = 32, INCOMING CALL RINGING HOLDING = 64, ON HOLD TERMINATED = 128 HANGUP Answer Answer an incoming call GET /api/answer Using curl: curl http://{domain}:{port}/api/answer -v Answer a specific incoming call GET /api/answer/{sessionId} Using curl: curl http://{domain}:{port}/api/answer/{sessionId} -v Originate Originate a new call from number Number is mandatory. GET /api/originate/{number} Using curl: curl http://{domain}:{port}/api/originate/{number} -v Hangup Hangup all active calls GET /api/hangup Using curl: curl http://{domain}:{port}/api/hangup -v Hangup a specific active call GET /api/hangup/{sessionId} Using curl: curl http://{domain}:{port}/api/hangup/{sessionId} -v Hold Put on hold an active call get /api/hold Using curl: curl http://{domain}:{port}/api/hold -v Put on hold a specific active call get /api/hold/{session} Using curl: curl http://{domain}:{port}/api/hold/{sessionId} -v Transfer Transfer an active call GET /api/transfer?number={number} {number} is mandatory Using curl: curl http://{domain}:{port}/api/transfer?number={number} -v Transfer a specific active call GET /api/transfer/{sessionId}?number={number} Using curl: curl http://{domain}:{port}/api/transfer/{sessionId}?number={number} -v Attended transfer GET /api/transfer/attendant/{sessionId}/{partnerSessionId} Using curl: curl http://{domain}:{port}/api/transfer/attendant/{sessionId}/{partnerSessionId} curl http://127.0.0.1:9888/api/originate/12498398500 -v Conference Conference 2 active calls GET /api/conference Using curl: curl http://{domain}:{port}/api/conference -v Example Here you can download a html/javascript file to use as Motion Phonebar API example. MotionBar.html 25 Jan 2022, 05:20 PM In particular you will see how to: manage the Motion Phonebar status manage a call, inserting the phone number as input manage a direct call to a specific agent (i.e. john doe) manage active calls You just need to launch the html file, after the Motion Phonebar login, to get to the result. Related pages Phonebar Installation Phonebar Installation XCALLY Motion V3 Often read together Phonebar Agent Phonebar Agent XCALLY Motion V3 Often read together WebRTC Agent WebRTC Agent XCALLY Motion V3 Often read together MotionBar.html html · 5 KB MotionBar

Example Motionbar API

1) Example manage Status Motionbar http://localhost:9888

Status: DISCONNECTED

2) Example call from input

3) Example direct call to john.doe

4) Example list Calls

Calling Nuber Duration Session Incoming StateID Actions