Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
resolved comments
  • Loading branch information
rootflo-hardik committed Feb 5, 2026
commit a4f020246b3ccd3a45d59bf3ea601ef814f9c3e5
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ const EditTelephonyConfigDialog: React.FC<EditTelephonyConfigDialogProps> = ({
if (provider === 'twilio') {
if (data.account_sid?.trim() || data.auth_token?.trim()) {
updateData.credentials = {
account_sid: (config.credentials as any).account_sid,
auth_token: (config.credentials as any).auth_token,
account_sid: (config.credentials as any).account_sid ?? '',
auth_token: (config.credentials as any).auth_token ?? '',
};
if (data.account_sid?.trim()) {
updateData.credentials.account_sid = data.account_sid.trim();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ async def initiate_call(
# status_callback_url = f'{self.call_processing_base_url}/webhooks/exotel/status'

# Construct Exotel v1 API endpoint (append .json for JSON response)
endpoint = f'https://{api_key}:{api_token}@{subdomain}/v1/Accounts/{account_sid}/Calls/connect.json'
endpoint = (
f'https://{subdomain}/v1/Accounts/{account_sid}/Calls/connect.json'
)
auth = aiohttp.BasicAuth(api_key, api_token)
timeout = aiohttp.ClientTimeout(total=15)

app_id = os.getenv('EXOTEL_APP_ID')
if not app_id:
Expand All @@ -68,12 +72,14 @@ async def initiate_call(
'CustomField': json.dumps({'voice_agent_id': voice_agent_id}),
}

masked_from = f'***{from_number[-4:]}'
masked_to = f'***{to_number[-4:]}'
logger.info(
f'Initiating Exotel call from {from_number} to {to_number} for agent {voice_agent_id}'
f'Initiating Exotel call from {masked_from} to {masked_to} for agent {voice_agent_id}'
)

# Make async API request
async with aiohttp.ClientSession() as session:
async with aiohttp.ClientSession(timeout=timeout, auth=auth) as session:
async with session.post(
endpoint,
data=payload,
Expand Down