magnussolution / magnusbilling7

MagnusBilling is a fast, secure, efficient, high availability, VOIP Billing.
https://www.magnusbilling.org
GNU Lesser General Public License v3.0
181 stars 106 forks source link

API - Cannot get callonline field #643

Open Lampard11 opened 1 year ago

Lampard11 commented 1 year ago

Hello,

I am trying to retrieve the live calls from MagnusBilling API, but it does not work. $result = $magnusBilling->getFields('callonline'); print_r($result);

Shows the following error: Page Not Found Unable to resolve the request "callonline".

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

The module name is callonline, but cannot retrieve this module through API.

Thank you.

fabriciosprj commented 1 year ago

Ola,

Tenta : $result = $magnusBilling->getFields('CallOnLine'); print_r($result);

Lampard11 commented 1 year ago

Ola,

Tenta : $result = $magnusBilling->getFields('CallOnLine'); print_r($result);

Tried this but getting following error: Access denied in module:CallOnLine

fabriciosprj commented 1 year ago

conferi se usuário tem permissão para acesso ao modulo CallOnLine no : Settings => Group Users

Lampard11 commented 1 year ago

conferi se usuário tem permissão para acesso ao modulo CallOnLine no : Settings => Group Users

Checked this too, there's already full permissions, yet same issue.

fabriciosprj commented 1 year ago

da uma olhada https://github.com/magnussolution/magnusbilling7/blob/d98ca62652735cc5f62115f896a6ca91ebc2f126/protected/components/ApiAccess.php#L162

Lampard11 commented 1 year ago

da uma olhada

https://github.com/magnussolution/magnusbilling7/blob/d98ca62652735cc5f62115f896a6ca91ebc2f126/protected/components/ApiAccess.php#L162

How? Sorry I am confused with this.

fabriciosprj commented 1 year ago

esse módulo só pode :

$result = $magnusBilling->read('CallOnLine');

Lampard11 commented 1 year ago

esse módulo só pode :

$result = $magnusBilling->read('CallOnLine');

Thanks a lot. Is there any way to hang the calls using the API?

fabriciosprj commented 1 year ago

send me an example please?

Lampard11 commented 1 year ago

send me an example please?

When you are in "Calls Online" section, you can hang up the calls from there. If there's only read only permission when accessing Calls Online, I think it is not possible to use Hang Up the call from there using the API?

fabriciosprj commented 1 year ago

não é possível usar Desligar usando a API.

Solução e via ASTERISK acesso AMI via HTTP

Lampard11 commented 1 year ago

não é possível usar Desligar usando a API.

Solução e via ASTERISK acesso AMI via HTTP

Thanks, do you have any example how to do that through Asterisk?

fabriciosprj commented 1 year ago

CLI: channel request hangup SIP/99995-000015bb