mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage-server
synced 2026-04-11 18:08:16 +00:00
feat: Kookoo IVR endpoint — outbound calls now bridge to agent SIP
When customer answers outbound call, Kookoo hits /kookoo/ivr which returns <dial record="true">523590</dial> to bridge the call to the agent's SIP extension. Agent's browser rings, both connect. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -82,13 +82,9 @@ export class OzonetelAgentService {
|
||||
callback_url: params.callbackUrl ?? `${callbackBase}/webhooks/kookoo/callback`,
|
||||
});
|
||||
|
||||
// If IVR URL provided, Kookoo will hit it when call connects
|
||||
// Otherwise use extra_data for simple TTS + hangup
|
||||
if (params.ivrUrl) {
|
||||
queryParams.set('url', params.ivrUrl);
|
||||
} else {
|
||||
queryParams.set('extra_data', '<response><playtext>Connecting you now</playtext><hangup/></response>');
|
||||
}
|
||||
// When customer answers, Kookoo hits our IVR endpoint which dials the agent's SIP
|
||||
const ivrUrl = params.ivrUrl ?? `${callbackBase}/kookoo/ivr`;
|
||||
queryParams.set('url', ivrUrl);
|
||||
|
||||
const response = await axios.get(
|
||||
`https://in1-cpaas.ozonetel.com/outbound/outbound.php?${queryParams.toString()}`,
|
||||
|
||||
Reference in New Issue
Block a user