MOR API callback init

From Kolmisoft Wiki
Revision as of 11:09, 7 December 2012 by Mindaugas (talk | contribs)
Jump to navigationJump to search

About

Callback Addon is needed in order to use API callback.

This API method is often used to implement Click2Call functionality from webpage. Also it can be used in CRM systems like SugarCRM, Salesforce and others.



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! (user should be the owner of 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). USER should be the owner of the device in MOR.
  • 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 a FAILED call and reason why it failed.
  • Check Asterisk CLI for error.
  • Use Call Tracing to locate the error and fix it.



See also