Suporte

 Comercial

Api Integração

Capa para página sobre API de Integração da BemMelhor.

ClickToCall

Chamada a API para iniciar uma ligação na telefonia.

http://DOMAIN.bemmelhor.com.br:3030/api/call/{RAMAL}/0 + {TELEFONE OU RAMAL}

Exemplo

http://DOMAIN.bemmelhor.com.br:3030/api/call/6001/6005

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://DOMAIN.bemmelhor.com.br:3030/api/status/{CALLID}

Exemplo

http://DOMAIN.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://DOMAIN.bemmelhor.com.br:3030/api/active/{RAMAL}

Exemplo

http://DOMAIN.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/domain-00000003"
}
}

Webhook Response

Dialing Response


{ event: 'call.dialing',
clientId: 'e57575aa-8995-43b6-8942-31e6e9135a25',
data:
{ created: 1613584017387,
from: '6005',
to: '9999',
error: null,
callId: '6583e35aca21ad97',
serverMessage: 'Chamando o destino',
disposition: null
}
}

Hangup Response

{ event: 'call.hangup',
clientId: 'e57575aa-8995-43b6-8942-31e6e9135a25',
data:
{ created: 1613583875286,
from: '6005',
to: 'h',
error: null,
callId: 'faf38b96c58194c5',
serverMessage: 'Ligação cncerrada',
disposition: 'ANSWERED'
}
}