AgentLogin
POST | https://instance.ucontactcloud.com/Integra/resources/auth/AgentLogin |
---|---|
Content-Type | application/x-www-form-urlencoded |
Parameters | |
agent | Agent’s name |
password | Agent’s password |
Request example
curl --location --request POST 'https://instance.ucontactcloud.com/Integra/resources/auth/AgentLogin' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'agent=Jhon' \ --data-urlencode 'password=12345'
Answer
The field md5secret
will be necessary to send it in the following requests, since it serves as authentication.
In case the username and/or password are incorrect, the request will return 0
.
{ "id": 9997, "name": "9999", "host": "instance.ucontactcloud.com", "nat": "yes", "type": "friend", "accountcode": "Jhon", "callgroup": "", "callerid": "9999", "canreinvite": "", "context": "entrantes", "dtmfmode": "rfc2833", "insecure": "", "language": "en", "mailbox": "", "md5secret": "U2FudGlhZ286NWI3MWRlYmEtZTVlOC00NDBhLWExY2ItZjgxMGU0Zjg5Nzkz", "pickupgroup": "", "qualify": "yes", "secret": "123456", "disallow": "all", "allow": "alaw;ulaw", "port": "", "defaultuser": "9999", "subscribecontext": "default", "record": "agent", "email": "", "phonetype": "SoftPhone", "LogLevel": "SEVERE", "limite": 0.0, "transport": "wss", "encryption": "yes", "did": "", "outboundproxy": "", "fullname": "John Doe" }
AgentLogoff
POST | https://instance.ucontactcloud.com/Integra/resources/api/AgentLogoff |
---|---|
Content-Type | application/x-www-form-urlencoded |
Parámetros | |
agent | Nombre del agente |
interface | Callerid del agente. Esto se obtiene en el AgentLogin |
message | Mensaje opcional. El mensaje quedará guardado en la tabla |
Headers | |
Authorization | Basic md5secret |
Ejemplo de solicitud
curl --location --request POST 'https://instance.ucontactcloud.com/Integra/resources/api/AgentLogoff' \ --header 'Authorization: Basic U2FudGlhZ286NTA5NTY3MzItYjU5ZC00MDhjLThmZmUtM2I1MDc3ZDg3Y2Zi' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'agent=Jhon' \ --data-urlencode 'interface=SIP/9999' \ --data-urlencode 'message=Test'
HangupPhone
POST | https://instance.ucontactcloud.com/Integra/resources/Agents/HangupPhone |
---|---|
Content-Type | application/x-www-form-urlencoded |
Parámetros | |
phone | Callerid del agente. Esto se obtiene en el AgentLogin |
Headers | |
Authorization | Basic md5secret |
Ejemplo de solicitud
curl --location --request POST 'https://instance.ucontactcloud.com/Integra/resources/Agents/HangupPhone' \ --header 'Authorization: Basic U2FudGlhZ286NTA5NTY3MzItYjU5ZC00MDhjLThmZmUtM2I1MDc3ZDg3Y2Zi' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'phone=1234'
Break
POST | https://instance.ucontactcloud.com/Integra/resources/api/AgentBreak |
---|---|
Content-Type | application/x-www-form-urlencoded |
Parameters | |
agent | Agent’s name |
interface | Agent’s Callerid. This is obtained in the AgentLogin. |
motive | Name of the break (It has to be one set up in uContact) |
message | Optional message to be saved in the |
Headers | |
Authorization | Basic md5secret |
Request example:
curl --location --request POST 'https://instance.ucontactcloud.com/Integra/resources/api/AgentBreak' \ --header 'Authorization: Basic U2FudGlhZ286NTA5NTY3MzItYjU5ZC00MDhjLThmZmUtM2I1MDc3ZDg3Y2Zi' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'agent=Jhon' \ --data-urlencode 'interface=SIP/9999' \ --data-urlencode 'message=Test' \ --data-urlencode 'motive=Lunch'
UnBreak
POST | https://instance.ucontactcloud.com/Integra/resources/api/AgentUnBreak |
---|---|
Content-Type | application/x-www-form-urlencoded |
Parameters | |
agent | Agent’s name. |
interface | Agent’s Callerid. This is obtained in the AgentLogin. |
motive | Name of the break (It has to be one set up in uContact) |
message | Optional message to be saved in the |
Headers | |
Authorization | Basic md5secret |
Request example
curl --location --request POST 'https://instance.ucontactcloud.com/Integra/resources/api/AgentBreak' \ --header 'Authorization: Basic U2FudGlhZ286NTA5NTY3MzItYjU5ZC00MDhjLThmZmUtM2I1MDc3ZDg3Y2Zi' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'agent=Jhon' \ --data-urlencode 'interface=SIP/9999' \ --data-urlencode 'message=Test' \ --data-urlencode 'motive=Lunch'
AgentCall
POST | https://instance.ucontactcloud.com/Integra/resources/Agents/AgentCall |
---|---|
Content-Type | application/x-www-form-urlencoded |
Parámetros | |
callerid | Caller id para variable OUTDID saliente. |
agent | Nombre del agente |
phone | Callerid del agente. Esto se obtiene en el AgentLogin |
tech | Debería enviarse siempre |
context | Contexto del agente, debería ser |
outqueue | Nombre de la campaña saliente |
destination | Número de teléfono de destino |
Headers | |
Authorization | Basic md5secret |
Ejemplo de solicitud
curl --location --request POST 'https://instance.ucontactcloud.com/Integra/resources/Agents/AgentCall' \ --header 'Authorization: Basic U2FudGlhZ286NTA5NTY3MzItYjU5ZC00MDhjLThmZmUtM2I1MDc3ZDg3Y2Zi' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'callerid=1234' \ --data-urlencode 'agent=Jhon' \ --data-urlencode 'phone=9999' \ --data-urlencode 'tech=SIP' \ --data-urlencode 'context=agentes' \ --data-urlencode 'outqueue=saliente' \ --data-urlencode 'destination=97897667'
Respuesta
Si la llamada es exitosa la respuesta será el guid único para la misma. Por ejemplo
8c78e1e1-5875-4ae7-a7ae-e3af3baeecdf
Transfer
POST | https://instance.ucontactcloud.com/Integra/resources/Agents/Transfer |
---|---|
Content-Type | application/x-www-form-urlencoded |
Parámetros | |
channel | Canal de origen de la llamada |
context | Contexto a transferir |
exten | Extensión a transferir |
Headers | |
Authorization | Basic md5secret |
Ejemplo de solicitud
curl --location --request POST 'https://instance.ucontactcloud.com/Integra/resources/Agents/Transfer' \ --header 'Authorization: Basic U2FudGlhZ286NTA5NTY3MzItYjU5ZC00MDhjLThmZmUtM2I1MDc3ZDg3Y2Zi' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'channel=1234' \ --data-urlencode 'context=Agentes' \ --data-urlencode 'exten=9999'
Respuesta
La respuesta será siempre 1 aunque los parámetros no sean válidos. Solo será 0 si ocurre un error interno en el servidor.
SendDTMF
La función de enviar se puede utilizar para crear comportamientos nuevos junto con los flujos o usar comportamientos previamente definidos.
DTMF | Acción |
| Parkear llamada |
POST | https://instance.ucontactcloud.com/Integra/resources/Agents/SendDTMF |
---|---|
Content-Type | application/x-www-form-urlencoded |
Parámetros | |
channel | Canal de la llamada, al cual se quiere enviar el DTMF |
dtmf | Valor del DTMF, ejemplo: *1 |
Headers | |
Authorization | Basic md5secret |
Ejemplo de solicitud
curl --location --request POST 'https://instance.ucontactcloud.com/Integra/resources/Agents/SendDTMF' \ --header 'Authorization: Basic U2FudGlhZ286NTA5NTY3MzItYjU5ZC00MDhjLThmZmUtM2I1MDc3ZDg3Y2Zi' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'channel=1234' \ --data-urlencode 'dtmf=*1'
Respuesta
La respuesta será siempre 1 aunque los parámetros no sean válidos. Solo será 0 si ocurre un error interno en el servidor.