1

When create call using the rest api and call went on ringing but there is no sound on the headset of call ringing.Is there any extra setup for this?

Iam using this to create call-

function create_call($to_no,$from_no,$user_id,$title,$voice_url,$msg_id){
        try{

            $admin_id = get_current_user_id();
            // Initiate a new outbound call
            $call = $this->client->calls->create(
                    // to call.
                +155555555,
                    // that you've purchased or verified with Twilio.
                +1457888885,
                array("url" => "url",
                'IfMachine'=>'Continue')

            );

        return $call->sid;
        } catch(Exception $e){
            echo "Error: " . $e->getMessage();
        }
    }

I not able to hear the call-ringing sound when the call connect with users phone.

John Ambrose
  • 167
  • 1
  • 11

1 Answers1

0

Twilio developer evangelist here.

When using IfMachine with an outbound call, like you are doing, Twilio needs to listen to the first part of the call to try to tell if it is human or answering machine. So, in order to get the human or answering machine to respond the call has to appear to start, that is, it will not provide a ring tone.

It would also be an unexpected behaviour for someone to be called and answer the phone to find it ringing.

In the case of click to call, I would recommend you call the agent first, not the user who requested the callback. This way it will connect to the agent first. Then the agent can check whether a human answered the phone and continue the call or reschedule if it is a machine. This also means that when the user answers they will be instantly connected to the agent calling them.

Let me know if this helps at all.

philnash
  • 70,667
  • 10
  • 60
  • 88