Difference between revisions of "MOR API callback init"
From Kolmisoft Wiki
Jump to navigationJump to search
Line 5: | Line 5: | ||
http://<YOUR_SERVER_IP>/billing/api/callback?u=<USERNAME>&p=<PASSWORD>&device=<DEVICE_ID>&src=<SOURCE>&dst=<DESTINATION> | http://<YOUR_SERVER_IP>/billing/api/callback?u=<USERNAME>&p=<PASSWORD>&device=<DEVICE_ID>&src=<SOURCE>&dst=<DESTINATION> | ||
* USERNAME/PASSWORD - login and password | * USERNAME/PASSWORD - login and password from the USER, not from the device! | ||
* DEVICE_ID - which device should be used to initiate callback and which | * DEVICE_ID - which device should be used to initiate callback and which Caller ID will be set on the call (Device ID = Device ACC, or accountcode). You can find ACC in /billing/devices/devices_all). | ||
* SOURCE - which number to dial first | * SOURCE - which number to dial first. | ||
* DESTINATION - will be dialed when SOURCE | * DESTINATION - will be dialed when SOURCE answers. | ||
You can omit <DESTINATION>. SOURCE will be asked to enter it | You can omit <DESTINATION>. If you do so, SOURCE will be asked to enter it. | ||
Line 17: | Line 17: | ||
<Status>Ok</Status> | <Status>Ok</Status> | ||
* Means callback is initiated | * Means callback is initiated. | ||
<br> | <br> | ||
Line 27: | Line 27: | ||
<Status>Not authenticated</Status> | <Status>Not authenticated</Status> | ||
* User is not present with provided username | * User is not present with provided username. | ||
* User's password is wrong | * User's password is wrong. | ||
==Bad device== | ==Bad device== | ||
Line 34: | Line 34: | ||
<Status>Bad device</Status> | <Status>Bad device</Status> | ||
* Device does not exist | * Device does not exist. | ||
* Device should belong to user if user does not have 'admin' rights. | * Device should belong to user if user does not have 'admin' rights. | ||
Line 41: | Line 41: | ||
<Status>No source</Status> | <Status>No source</Status> | ||
* No source in request | * No source in request. | ||
==Call is not received== | ==Call is not received== | ||
* Check your CDR for FAILED call and reason why it failed | * Check your CDR for FAILED call and reason why it failed. | ||
* Check Asterisk CLI for error | * Check Asterisk CLI for error. | ||
* Use [[Call Tracing]] to locate error and fix it | * Use [[Call Tracing]] to locate the error and fix it. |
Revision as of 12:31, 16 May 2010
Request
http://<YOUR_SERVER_IP>/billing/api/callback?u=<USERNAME>&p=<PASSWORD>&device=<DEVICE_ID>&src=<SOURCE>&dst=<DESTINATION>
- USERNAME/PASSWORD - login and password from the USER, not from the device!
- DEVICE_ID - which device should be used to initiate callback and which Caller ID will be set on the call (Device ID = Device ACC, or accountcode). You can find ACC in /billing/devices/devices_all).
- SOURCE - which number to dial first.
- DESTINATION - will be dialed when SOURCE answers.
You can omit <DESTINATION>. If you do so, SOURCE will be asked to enter it.
Response
<Status>Ok</Status>
- Means callback is initiated.
Errors
Not authenticated
<Status>Not authenticated</Status>
- User is not present with provided username.
- User's password is wrong.
Bad device
<Status>Bad device</Status>
- Device does not exist.
- Device should belong to user if user does not have 'admin' rights.
No source
<Status>No source</Status>
- No source in request.
Call is not received
- Check your CDR for FAILED call and reason why it failed.
- Check Asterisk CLI for error.
- Use Call Tracing to locate the error and fix it.