public function sendMessage($to, $from, $body, $variables = array())
    {
        $uri = 'endpoints/sendMessage';
        try {
            $this->client->getEndpoint()->put($uri, [
                'form_params' => [
                    'to' => $to,
                    'from' => $from,
                    'body' => $body,
                    'variables' => array_map('strval', $variables),
                ]
            ]);
        } catch (RequestException $e) {
            $this->processRequestException($e);
        }
    }
public function sendMessage($to, $from, $body, $variables = array())
    {
        $uri = 'endpoints/sendMessage';
        try {
            $this->client->getEndpoint()->put($uri, [
                'form_params' => [
                    'to' => $to,
                    'from' => $from,
                    'body' => $body,
                    'variables' => array_map('strval', $variables),
                ]
            ]);
        } catch (RequestException $e) {
            $this->processRequestException($e);
        }
    }
public function sendMessage ( $ to , $ from , $ body , $ variables = array ( ) ) { $ uri = 'endpoints/sendMessage' ; try { $ this -> client -> getEndpoint ( ) -> put ( $ uri , [ 'form_params' => [ 'to' => $ to , 'from' => $ from , 'body' => $ body , 'variables' => array_map ( 'strval' , $ variables ) , ] ] ) ; } catch ( RequestException $ e ) { $ this -> processRequestException ( $ e ) ; } }
Send a message to some technology URI or endpoint.

@param string $to (required) The endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp.
@param string $from (required) The endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp.
@param string $body The body of the message
@param array $variables
@throws NotFoundException
Send a message to some technology URI or endpoint .