API למפתחים

התראות Webhook על שיחות, חיוג בלחיצה, סטטוס שלוחה, דוחות CDR ותור שיחה חוזרת.

כל ה-API של המרכזיה במקום אחד. ההפעלה נעשית מול נציג, בהתאם לצורכי העסק; פרטי ההתחברות והפרמטרים הסופיים נמסרים בהפעלה. לפנייה לנציג.

התיעוד הטכני כתוב באנגלית, כמו שמפתחים עובדים איתו. רשימת כל שדות ה-Webhook, לפי סוג אירוע ועם חיפוש: Webhook API. התיעוד המלא והעדכני: webhook-docs.

Call event webhooks

The PBX sends a webhook when a call comes in, before it is answered, and again when a call ends, incoming or outgoing. A webhook can be sent as JSON or XML, by POST or GET. You choose which fields each request carries. Every field, by call event, is in the webhook field reference.

Incoming call

FieldDescription
caller_numberCaller phone number
did_numberDialed number (DID)
extensionExtension
queueNameQueue name, when the call is in a queue
call_idSame ID on every leg of the call, to match ring, answer and end
org_nameOrganization
https://your.server/incoming?caller={{caller_number}}&did={{did_number}}&ext={{extension}}&call={{call_id}}

End of call

Sent for every incoming and outgoing call when it ends.

FieldDescription
caller_numberCaller phone number
did_numberDialed number (DID)
directionCall direction
starttimeCall start time
durationTotal call duration (seconds)
talk_timeBillable seconds (after answer)
dispositionCall result: ANSWERED, NO ANSWER, BUSY, FAIL
answeringExtensionExtension that answered the call
queueNameQueue name
recording_play_urlRecording link for playback
recording_download_urlRecording link for download
call_idSame ID on every leg of the call
org_nameOrganization

Recording links

When a call is recorded, the end-of-call webhook carries ready-made links to the recording: recording_play_url to play it and recording_download_url to download it.

Click2Call

Dial at the push of a button by sending a GET/POST request. The system first dials the extension or internal service (dial1), and once it answers dials the destination (dial2), unless Reverse is set. To record a Click2Call call, SetCID must be set in the request.

https://voip.globalex.co.il/API/dialup.php?user=XXXX&pass=XXXX&org=XXXX&dial1=XXXX&dial2=XXXX&Response=yes&SetCID=XXXX
ParameterRequiredDescription
userYesUsername
passYesPassword
orgYesOrganization
dial1YesExtension / first number to dial
dial2YesDestination, E.164 format
ResponseNoRequest a response (yes)
RFormatNoResponse format: text (default), html, xml, json
SetCIDNoCaller ID to present, digits only. Required for recording.
ReverseNoReverse the dial order (dial2 first)
TimeoutNoSeconds to wait for an answer, 1–300. Default 20.

Extension status and hangup

Returns the current extension status (free, busy, ringing, unavailable) and, during an active call, the channel, the bridged channel's unique ID, the call's unique ID and the recording file if available. With operation=hangup it hangs up the running call. The unique ID can be used to pull the recording or a call report.

https://voip.globalex.co.il/API/dialup.php?user=XXXX&pass=XXXX&org=XXXX&exten=XXXX
ParameterRequiredDescription
userYesUsername
passYesPassword
orgYesOrganization
extenYesInternal extension number
ResponseNoRequest a response (yes)
RFormatNoResponse format: text (default), html, xml, json
operationNohangup to end the running call

CDR and billing reports

POST https://panel.bluebe.net/api/cdr.php · Response: JSON. Get CDR and billing reports for your organization (or all organizations, for an admin), or the calls of a specific number between two dates.

ParameterRequiredDescription
org_tokenYesYour organization token
call_statusNoFilter by call status
did_numberNoIncoming calls to this DID
call_durationNoTotal duration, with > < = (e.g. >10)
call_sourceNoSource number (integers only)
call_destinationNoDestination number (integers only)
call_uniqueIdNoReturn only this call
call_priceNoCall price, with > < =
call_countryNoDestination country
call_typeNoLandline, mobile, international, etc.
orgNoOrganization name; empty returns all organizations (admin only)
start_date / end_dateNoReport period

Add numbers to the callback queue

https://panel.bluebe.net/api/PBXpostOut.php · Adds or updates numbers for automatic callback when an agent logs in to the queue. Activation is arranged with a representative, according to the business’s needs.

ParameterRequiredDescription
org_tokenYesYour organization token
actionYesAddCB
CBsourceNoSource number of the requested service
CBnumYesPhone number to call
CBQdestYesQueue to connect CBnum to when agents are available
maxCBdialNoMaximum dial attempts to CBnum