简体   繁体   中英

Twilio webhook (NodeJS) - On inbound call, pass call's SID

I'm looking to have the webhook which I pass back TwiML whenever there's a call coming inbound pass me the call's SID so in the future I can modify that active in-bound call. For example, (480)-000-000 is calling my Twilio number which then sets off the webhook to retrieve the TwiML. My server will then also get the SID for that call coming in, and send back TwiML to play lobby music. From then my server will have the SID stored into an array for people in the lobby. And one by one connect them with agents as they become open.

Twilio developer evangelist here.

Good news, every webhook for an incoming voice call to your Twilio number includes the CallSid in the request parameters .

The parameters are sent to your URL as URL encoded form data so if you're using a web framework it should be fairly straightforward to read the CallSid from the request.

Let me know if that helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM