Qual é a sua dúvida?
Api Integração BmTelecom
API EndPoints Totvs
ClickToCall
Chamada a API para iniciar uma ligação na telefonia.
http://totvs.bemmelhor.com.br:3030/api/call/{RAMAL}/0 + {TELEFONE}
Exemplo
http://totvs.bemmelhor.com.br:3030/api/call/6001/032999999999
Json Retorno
{
"apiStatus": "CONECTION_OK",
"created": "2021-01-06T18:07:10.888+0000",
"data": {
"key": "9cb60bfe8dfb200f",
"status": "IN_PROGRESS",
"created": "2021-01-06T18:07:10.915+0000",
"from": "6001",
"to": "032999999999",
"error": null,
"callId": "9cb60bfe8dfb200f",
"serverMessage": null
}
}
Call Status
Apresenta o status de uma ligação já finalizada através do parâmetro CallId, recebido no endpoint ClickToCall
http://totvs.bemmelhor.com.br:3030/api/status/{CALLID}
Exemplo
http://totvs.bemmelhor.com.br:3030/api/status/6e1af400b3b7fef7
Json Retorno
{
"apiStatus": "SUCCESS",
"created": "2021-01-06T18:19:10.936+0000",
"data": null
}
Active Call
Apresenta informações da ligação ativa (ligação em curso para o ramal no momento da pesquisa)
http://totvs.bemmelhor.com.br:3030/api/active/{RAMAL}
Exemplo
http://totvs.bemmelhor.com.br:3030/api/active/6001
Json Retorno
{
"apiStatus": "SUCCESS",
"created": "2021-01-06T18:21:36.174+0000",
"data": {
"id": "1609957242.2",
"name": "SIP/6001-00000002",
"channel": null,
"callerId": {
"name": "6001",
"number": "6001"
},
"state": "UP",
"account": null,
"dateOfCreation": "2021-01-06T18:20:42.206+0000",
"linkedChannel": "SIP/totvs-00000003"
}
}