Michael Nash
Michael Nash

Reputation: 1

I cannot get the twilio asyncAmdStatusCallback url to fire

I use twilio. I can't get the async answering machine detection status callback url to fire.

I'm making a call in twilio functions, then handling the statusCallbacks i can see all callbacks for the regular statusCallbacks, which includes the AnsweredBy attribute when machineDetection is enabled, but the asyncamdstatuscallback is not firing at all ever. No matter what settings and params I try.

heres my code:

const statusCallbackUrl = encodeURI(`${getCurrentUrl(context)}?action=handle_invite_call&conferenceUid=${event.conferenceUid}&voicemailTwimlBinSid=${event.voicemailTwimlBinSid}&initialCallSid=${event.initialCallSid}`)
const inviteCall = await client.calls.create({
   to: invitePhoneNumbers[i],
   from: event.to,            url: encodeURI(`${getTwmlBinUrl(event.conferenceInviteTwimlBinSid)}?${new URLSearchParams(event).toString()}`),
   statusCallback: statusCallbackUrl,
   statusCallbackEvent: ['answered', 'completed'],
   machineDetection: 'Enable',
   asyncAmd: 'true',
   asyncAmdStatusCallback: statusCallbackUrl,
   asyncAmdStatusCallbackMethod: 'POST',
});

I tried setting all the timeout parameters for silence etc to better detect the voicemail in case it wasn't detecting it properly. I tried setting the request type to POST manually.

Upvotes: 0

Views: 27

Answers (0)

Related Questions