0

How can I put a caller on hold using a javascript. And retrive back to caller from the hold.

I tried using below stackoverflow link , but it put me on hold not to the caller and cut the call of the caller.

CLICK HERE

Can anyone help me.

2 Answers 2

1

I ask same question to the twilio support center and they give below answer.

It is much easier to use conference..

The following example shows how you can put the first conference participant on hold, and then unhold them once the agent is ready to talk with them: https://www.twilio.com/docs/api/twiml/conference#examples-6

Sign up to request clarification or add additional context in comments.

Comments

1

In a two party call , as soon as one of the party goes off the call , the call ends. Hence your experience. If you want both the callers to be on the call and whilst they are on call ,have one go to hold and then bring him back - Use conference. .

The flow should be something like:

  • Caller calls a Twilio number
  • When call is answered use TwiML to place the caller in conference.
  • Initiate a REST API to do a outbound dial to other party

Here is an example of the Twiml that puts the caller into a conference:

<Response>
  <Dial>
    <Conference beep="false" waitUrl="" startConferenceOnEnter="true" endConferenceOnExit="true">NoMusicNoBeepRoom
    </Conference>
  </Dial>
</Response>

When you want to put caller on hold, post to /conference and you can put required participant on hold/unhold using details described here.

$POST /Conference/CFbbe46ff1274e283f7e3ac1df0097ab39/Participants/CA386025c9bf5d6052a1d1ea42b4d16662
    -d "Hold=True" \
    -d "HoldUrl=https://myapp.com/hold" \
    -u 'AC123:{AuthToken}'

2 Comments

I couldnt put in the TwiML here , so had to replace "<" and ">" with "[" and "]" . - FYI
I think you got me wrong , i am calling to the customer using a twilio throw my web application , and i want to put them on hold by clicking a 'Put on Hold' button , and talk to him again by click 'Retrieve back'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.