Calls, method: /api/registercall/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | channel | string | Call channel (call id) | Required field. | |
4 | status | string | Call status | Required field. | Call can be created with statuses: LOCAL, INCOMING, OUTGOING, TRANSFER. If you transfer the status of the end call (CANCEL, ANSWER, CONGESTION, CHANUNAVAIL, BUSY, INVALID, TRANSFER), the call will be closed. Details of each status: LOCAL - Local call (internal) INCOMING - Incoming Call OUTGOING - Outgoing Call TRANSFER - Call transferred CANCEL - caller hung up ANSWER - There is an answer to the call (there is a conversation) CONGESTION - line is overloaded CHANUNAVAIL - line is not available BUSY - Line is busy NOANSWER - callee did not answer the call INVALID - invalid number / translation |
5 | caller | integer | Who is calling (phone number) | Required field. | |
6 | callee | integer | Who is calling (phone number) | Optional field. | If you do not specify anything here, the system will substitute default numbers here for incoming calls |
7 | pickup | integer | who picked up the phone on the group call | Optional field. | |
8 | duration | integer | call duration | Optional field. | Pass the duration of the call here for permissive statuses (CANCEL, ANSWER, CONGESTION, CHANUNAVAIL, BUSY, INVALID, TRANSFER) |
8 | filename | string | Path and name of audio file on calls | Optional field. | Pass the name of the audio file of the call here for permissive statuses (CANCEL, ANSWER, CONGESTION, CHANUNAVAIL, BUSY, INVALID, TRANSFER) |
9 | comment | text | Call comment | Optional field. | Call comment will be recorded as event description |
10 | closed | bool | Close call and popup | Optional field. | Optional field.If the closed = 1 argument is passed, the window will be closed, if closed = 0, then no (this is all with the call statuses ANSWER or CANCEL or CONGESTION or CHANUNAVAIL or BUSY; or INVALID) . It is also recommended to send closed = 0 when the conversation starts |
Possible responses to the request
№ | Status | Message | Message Description |
1 | ok | Call registration was successful | |
2 | fail | Login is empty! | Login missing |
3 | fail | Password is empty! | Missing password |
4 | fail | Login or password not correct! | Invalid username or password |
5 | fail | Bad user level! | Low user level to perform this action (requires level 2 or higher) |
6 | fail | No channel | Call channel missing |
7 | fail | No status | There is no call status |
8 | fail | No caller | The caller is missing |