Manage calls and messages
This section describes how to configure call center-specific features and how to manage messages within Conversations. All standard Conversations setup steps apply here as well.
Calls
To learn how to make and receive calls, refer to the WebRTC calls documentation.
Below is a high-level overview of the required setup and call center integration steps.
Prerequisites
Before working with calls, complete the following:
- Create an application using the Use Conversations configuration option.
- Register agents (opens in a new tab) using their Agent ID (opens in a new tab).
- Add the Infobip RTC JS SDK (opens in a new tab) to your application.
Make calls
To make an outbound call:
-
Generate
CallOptions(opens in a new tab), including the following parameters insidecustomData(opens in a new tab):conversationsID- obtained from the conversation created in the previous step.calleeClientType-WebRTCfor in-app calls orPSTNfor calls to phone numbers.
javascriptconst callOptions = CallOptions.builder() .setCustomData({ isOutbound: true, outboundTo: outgoingCallRequest.destination, outboundFrom: outgoingCallRequest.sender, outboundAgentId: this.context.user.agentId, conversationId: outgoingCallRequest.conversationId, calleeClientType: calleeClientType, }).build(); -
Use the
callConversations(opens in a new tab) method with theCallOptions. -
Manage the conversation as you would for any other channel.
Receive calls
To receive calls:
- Configure your Voice number to forward calls to Conversations, or use the Dial to Conversations (opens in a new tab) script in IVR.
- You can also initiate a call from your application to Conversations using the
callConversationsmethod (Web (opens in a new tab), Android (opens in a new tab), iOS (opens in a new tab)). - Set agent heartbeat (opens in a new tab).
- Register the incoming call event handler on the InfobipRTC (opens in a new tab) client and implement answering and rejecting logic.
Wrap-up time
After a call ends, agents may need time to write notes or summaries before closing the conversation.
During wrap-up:
- The agent is considered busy.
- The default wrap-up duration is 30 seconds, adjustable at:
- Agent-level settings override system settings.
- Supervisors can view, modify, or delete agent-level configuration (opens in a new tab).
- Agents can extend (opens in a new tab) or clear (opens in a new tab) wrap-up time based on their needs if the options are enabled.
Waiting strategy
A waiting strategy shapes the caller experience while they wait to connect with an agent.
You can configure:
- Strategy name
- Applicable numbers or applications
- Maximum waiting time
Optional components:
- Greeting message - played at the beginning of the call
- Hold music - audio played while waiting
- Announcement message - periodic updates for callers
- Maximum wait time message - played before the call
Learn more about the waiting strategy for calls.
With the available API methods, you can:
- Retrieve all waiting strategies (opens in a new tab)
- Create a waiting strategy (opens in a new tab)
- Retrieve a waiting strategy by its ID (opens in a new tab)
- Update a waiting strategy (opens in a new tab)
- Delete a waiting strategy by its ID (opens in a new tab)
Transfer calls
Currently, there are three methods available for transferring calls:
- Transfer call to another agent (opens in a new tab)
- Transfer call to another queue (opens in a new tab)
- Transfer call to external number (opens in a new tab)
Additionally, you can retrieve a list of all queues (opens in a new tab) and return them along with their current activity status.
Recording
You can create account recording configuration (opens in a new tab) to record agent-customer conversations to comply with regulatory requirements, ensure quality, or support other business needs.
System-level recording settings
You can choose to record:
- Inbound calls (answered by agents)
- Outbound calls (initiated by agents)
- Both inbound and outbound
Recording video calls
Calls in Conversations can include video. You can decide how these calls should be recorded:
- Media type: audio only, video only, or both.
- Default behavior:
Video calls are recorded and stored in Infobip cloud storage as high-quality streamable files that cannot be downloaded.
To generate files you can download, copy, or move to your own storage, enable Video Download Preparation.
Configuration management
- All recording settings can be viewed (opens in a new tab) or changed (opens in a new tab) at any time.
- You can override system-level settings with agent-level configuration.
- Agent-level setup can be created (opens in a new tab), viewed (opens in a new tab), and updated (opens in a new tab) when needed.
Recording file management
You can get (opens in a new tab), download (opens in a new tab), and delete (opens in a new tab) recording files.
Messages
You can use Messages API for engagement campaigns where a new conversation is created when sending the initial mobile-terminated (MT) message (opens in a new tab).
Create messages
Inbound messages are automatically threaded if channels and senders are configured for conversation threading.
To add outbound messages to a conversation, use the Create message (opens in a new tab) method to send a message through any supported channel.
Get messages
Use the Get messages (opens in a new tab) method to retrieve all messages exchanged within a conversation.
x-agent-id attribute
The x-agent-id HTTP header attribute identifies the agent sending the message.
It is used when integrations authenticate with an API key and need to associate outgoing messages with a specific agent.
- The value is the agentId, which is the primary key of the agent entity.
- You can find
agentIdin responses from the Agents API. - Adding
x-agent-idto every request is not mandatory since its use depends on whether your account uses agents.
Behavior matrix
| Conversation assignment status | No x-agent-id provided | x-agent-id = AGENT | x-agent-id = SUPERVISOR |
|---|---|---|---|
| Unassigned | OK (no-agents-used scenario) | Error | Error |
| Assigned to Agent | Error | OK | OK |
| Assigned to Supervisor | Error | Error | OK |
Usage rules
If you do not use agents:
- Keep conversations unassigned.
- Omit the
x-agent-idparameter entirely from theCreate Messagerequest header.
If you use agents:
- Your account must have at least one agent (license not required) created via the Create agent (opens in a new tab) API.
- The
x-agent-idheader must contain the correctagentId, depending on who is sending the message.
Role behavior
- Agent role can reply only to conversations assigned to them.
- Supervisor role can reply to any conversation.
- The
x-agent-idheader must always reflect the correctagentIdbased on who is performing the action.