public function create($to, $from, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'To' => $to,
            'From' => $from,
            'Url' => $options['url'],
            'ApplicationSid' => $options['applicationSid'],
            'Method' => $options['method'],
            'FallbackUrl' => $options['fallbackUrl'],
            'FallbackMethod' => $options['fallbackMethod'],
            'StatusCallback' => $options['statusCallback'],
            'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function($e) { return $e; }),
            'StatusCallbackMethod' => $options['statusCallbackMethod'],
            'SendDigits' => $options['sendDigits'],
            'Timeout' => $options['timeout'],
            'Record' => Serialize::booleanToString($options['record']),
            'RecordingChannels' => $options['recordingChannels'],
            'RecordingStatusCallback' => $options['recordingStatusCallback'],
            'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'],
            'SipAuthUsername' => $options['sipAuthUsername'],
            'SipAuthPassword' => $options['sipAuthPassword'],
            'MachineDetection' => $options['machineDetection'],
            'MachineDetectionTimeout' => $options['machineDetectionTimeout'],
            'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function($e) { return $e; }),
            'Trim' => $options['trim'],
            'CallerId' => $options['callerId'],
            'MachineDetectionSpeechThreshold' => $options['machineDetectionSpeechThreshold'],
            'MachineDetectionSpeechEndThreshold' => $options['machineDetectionSpeechEndThreshold'],
            'MachineDetectionSilenceTimeout' => $options['machineDetectionSilenceTimeout'],
        ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new CallInstance($this->version, $payload, $this->solution['accountSid']);
    }
public function create($to, $from, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'To' => $to,
            'From' => $from,
            'Url' => $options['url'],
            'ApplicationSid' => $options['applicationSid'],
            'Method' => $options['method'],
            'FallbackUrl' => $options['fallbackUrl'],
            'FallbackMethod' => $options['fallbackMethod'],
            'StatusCallback' => $options['statusCallback'],
            'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function($e) { return $e; }),
            'StatusCallbackMethod' => $options['statusCallbackMethod'],
            'SendDigits' => $options['sendDigits'],
            'Timeout' => $options['timeout'],
            'Record' => Serialize::booleanToString($options['record']),
            'RecordingChannels' => $options['recordingChannels'],
            'RecordingStatusCallback' => $options['recordingStatusCallback'],
            'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'],
            'SipAuthUsername' => $options['sipAuthUsername'],
            'SipAuthPassword' => $options['sipAuthPassword'],
            'MachineDetection' => $options['machineDetection'],
            'MachineDetectionTimeout' => $options['machineDetectionTimeout'],
            'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function($e) { return $e; }),
            'Trim' => $options['trim'],
            'CallerId' => $options['callerId'],
            'MachineDetectionSpeechThreshold' => $options['machineDetectionSpeechThreshold'],
            'MachineDetectionSpeechEndThreshold' => $options['machineDetectionSpeechEndThreshold'],
            'MachineDetectionSilenceTimeout' => $options['machineDetectionSilenceTimeout'],
        ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new CallInstance($this->version, $payload, $this->solution['accountSid']);
    }
public function create ( $ to , $ from , $ options = array ( ) ) { $ options = new Values ( $ options ) ; $ data = Values :: of ( array ( 'To' => $ to , 'From' => $ from , 'Url' => $ options [ 'url' ] , 'ApplicationSid' => $ options [ 'applicationSid' ] , 'Method' => $ options [ 'method' ] , 'FallbackUrl' => $ options [ 'fallbackUrl' ] , 'FallbackMethod' => $ options [ 'fallbackMethod' ] , 'StatusCallback' => $ options [ 'statusCallback' ] , 'StatusCallbackEvent' => Serialize :: map ( $ options [ 'statusCallbackEvent' ] , function ( $ e ) { return $ e ; } ) , 'StatusCallbackMethod' => $ options [ 'statusCallbackMethod' ] , 'SendDigits' => $ options [ 'sendDigits' ] , 'Timeout' => $ options [ 'timeout' ] , 'Record' => Serialize :: booleanToString ( $ options [ 'record' ] ) , 'RecordingChannels' => $ options [ 'recordingChannels' ] , 'RecordingStatusCallback' => $ options [ 'recordingStatusCallback' ] , 'RecordingStatusCallbackMethod' => $ options [ 'recordingStatusCallbackMethod' ] , 'SipAuthUsername' => $ options [ 'sipAuthUsername' ] , 'SipAuthPassword' => $ options [ 'sipAuthPassword' ] , 'MachineDetection' => $ options [ 'machineDetection' ] , 'MachineDetectionTimeout' => $ options [ 'machineDetectionTimeout' ] , 'RecordingStatusCallbackEvent' => Serialize :: map ( $ options [ 'recordingStatusCallbackEvent' ] , function ( $ e ) { return $ e ; } ) , 'Trim' => $ options [ 'trim' ] , 'CallerId' => $ options [ 'callerId' ] , 'MachineDetectionSpeechThreshold' => $ options [ 'machineDetectionSpeechThreshold' ] , 'MachineDetectionSpeechEndThreshold' => $ options [ 'machineDetectionSpeechEndThreshold' ] , 'MachineDetectionSilenceTimeout' => $ options [ 'machineDetectionSilenceTimeout' ] , ) ) ; $ payload = $ this -> version -> create ( 'POST' , $ this -> uri , array ( ) , $ data ) ; return new CallInstance ( $ this -> version , $ payload , $ this -> solution [ 'accountSid' ] ) ; }
Create a new CallInstance

@param string $to Phone number, SIP address, or client identifier to call
@param string $from Twilio number from which to originate the call
@param array|Options $options Optional Arguments
@return CallInstance Newly created CallInstance
@throws TwilioException When an HTTP error occurs.
Create a new CallInstance