mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 02:57:57 +00:00 
			
		
		
		
	 6bdd4f0670
			
		
	
	6bdd4f0670
	
	
	
		
			
			This PR delivers the first slice of the voice channel: inbound call handling. When a customer calls a configured voice number, Chatwoot now creates a new conversation and shows a dedicated call bubble in the UI. As the call progresses (ringing, answered, completed), its status updates in real time in both the conversation list and the call bubble, so agents can instantly see what’s happening. This focuses on the inbound flow and is part of breaking the larger voice feature into smaller, functional, and testable units; further enhancements will follow in subsequent PRs. references: #11602 , #11481 ## Testing - Configure a Voice inbox in Chatwoot with your Twilio number. - Place a call to that number. - Verify a new conversation appears in the Voice inbox for the call. - Open it and confirm a dedicated voice call message bubble is shown. - Watch status update live (ringing/answered); hang up and see it change to completed in both the bubble and conversation list. - to test missed call status, make sure to hangup the call before the please wait while we connect you to an agent message plays ## Screens <img width="400" alt="Screenshot 2025-09-03 at 3 11 25 PM" src="https://github.com/user-attachments/assets/d6a1d2ff-2ded-47b7-9144-a9d898beb380" /> <img width="700" alt="Screenshot 2025-09-03 at 3 11 33 PM" src="https://github.com/user-attachments/assets/c25e6a1e-a885-47f7-b3d7-c3e15eef18c7" /> <img width="700" alt="Screenshot 2025-09-03 at 3 11 57 PM" src="https://github.com/user-attachments/assets/29e7366d-b1d4-4add-a062-4646d2bff435" /> <img width="442" height="255" alt="Screenshot 2025-09-04 at 11 55 01 PM" src="https://github.com/user-attachments/assets/703126f6-a448-49d9-9c02-daf3092cc7f9" /> --------- Co-authored-by: Muhsin <muhsinkeramam@gmail.com>
		
			
				
	
	
		
			76 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			76 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| export const MESSAGE_TYPES = {
 | |
|   INCOMING: 0,
 | |
|   OUTGOING: 1,
 | |
|   ACTIVITY: 2,
 | |
|   TEMPLATE: 3,
 | |
| };
 | |
| 
 | |
| export const MESSAGE_VARIANTS = {
 | |
|   USER: 'user',
 | |
|   AGENT: 'agent',
 | |
|   ACTIVITY: 'activity',
 | |
|   PRIVATE: 'private',
 | |
|   BOT: 'bot',
 | |
|   ERROR: 'error',
 | |
|   TEMPLATE: 'template',
 | |
|   EMAIL: 'email',
 | |
|   UNSUPPORTED: 'unsupported',
 | |
| };
 | |
| 
 | |
| export const SENDER_TYPES = {
 | |
|   CONTACT: 'Contact',
 | |
|   USER: 'User',
 | |
|   AGENT_BOT: 'agent_bot',
 | |
|   CAPTAIN_ASSISTANT: 'captain_assistant',
 | |
| };
 | |
| 
 | |
| export const ORIENTATION = {
 | |
|   LEFT: 'left',
 | |
|   RIGHT: 'right',
 | |
|   CENTER: 'center',
 | |
| };
 | |
| 
 | |
| export const MESSAGE_STATUS = {
 | |
|   SENT: 'sent',
 | |
|   DELIVERED: 'delivered',
 | |
|   READ: 'read',
 | |
|   FAILED: 'failed',
 | |
|   PROGRESS: 'progress',
 | |
| };
 | |
| 
 | |
| export const ATTACHMENT_TYPES = {
 | |
|   IMAGE: 'image',
 | |
|   AUDIO: 'audio',
 | |
|   VIDEO: 'video',
 | |
|   FILE: 'file',
 | |
|   LOCATION: 'location',
 | |
|   FALLBACK: 'fallback',
 | |
|   SHARE: 'share',
 | |
|   STORY_MENTION: 'story_mention',
 | |
|   CONTACT: 'contact',
 | |
|   IG_REEL: 'ig_reel',
 | |
| };
 | |
| 
 | |
| export const CONTENT_TYPES = {
 | |
|   TEXT: 'text',
 | |
|   INPUT_TEXT: 'input_text',
 | |
|   INPUT_TEXTAREA: 'input_textarea',
 | |
|   INPUT_EMAIL: 'input_email',
 | |
|   INPUT_SELECT: 'input_select',
 | |
|   CARDS: 'cards',
 | |
|   FORM: 'form',
 | |
|   ARTICLE: 'article',
 | |
|   INCOMING_EMAIL: 'incoming_email',
 | |
|   INPUT_CSAT: 'input_csat',
 | |
|   INTEGRATIONS: 'integrations',
 | |
|   STICKER: 'sticker',
 | |
|   VOICE_CALL: 'voice_call',
 | |
| };
 | |
| 
 | |
| export const MEDIA_TYPES = [
 | |
|   ATTACHMENT_TYPES.IMAGE,
 | |
|   ATTACHMENT_TYPES.VIDEO,
 | |
|   ATTACHMENT_TYPES.AUDIO,
 | |
|   ATTACHMENT_TYPES.IG_REEL,
 | |
| ];
 |