MOR API spy call
From Kolmisoft Wiki
Jump to navigationJump to search
Description
Starts Spy call
Usage
- From MOR X17 call: /api/spy_call
- Methods: POST, GET(if allowed, not recomended)
Parameters
Parameters which are included into hash:
- u - username for authentication. Required
- active_call_id- active calls id. Can be retrieved using active_calls_get API. Required
Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key
Parameters which are not included into hash:
Request
If you want to initiate a spy call to an active calls with ID 1, you send:
You send:
HTML POST: http://<SERVER_IP>/billing/api/spy_call?u=admin&active_call_id=1&hash=df2983700ffecb52e6649f0cb3981b66537083a4
Returns
Spy call initiated: Everything is ok. Spy call initiated.
</page>
<page>
<status>
<success>Spy call initiated</success>
<spy_device>IAX/1002</spy_device>
<channel>SIP/10.219.62.200-c40daf10</channel>
</status>
</page>
Errors:
- Chanspy is disabled
- Active call was not found
- No Spy Device assigned. Select it under User edit preferences.
- Cannot connect to Asterisk Server
- Spy Device is registered on different Server than this Call. Spying on this Call is not possible.
- Unable to spy virtual device
- You are not authorized to use this functionality
- Access denied
Example:
<page>
<status>
<error>
No Spy Device assigned. Select it under User edit preferences.
</error>
</status>
</page>