src/whatsprot.class.php
public function rejectCall($to, $id, $callId)
    {
        $rejectNode = new ProtocolNode('reject',
            [
              'call-id' => $callId,
            ], null, null);

        $callNode = new ProtocolNode('call',
            [
              'id' => $id,
              'to' => $this->getJID($to),
            ], [$rejectNode], null);

        $this->sendNode($callNode);
    }
public function rejectCall($to, $id, $callId)
    {
        $rejectNode = new ProtocolNode('reject',
            [
              'call-id' => $callId,
            ], null, null);

        $callNode = new ProtocolNode('call',
            [
              'id' => $id,
              'to' => $this->getJID($to),
            ], [$rejectNode], null);

        $this->sendNode($callNode);
    }
public function rejectCall ( $ to , $ id , $ callId ) { $ rejectNode = new ProtocolNode ( 'reject' , [ 'call-id' => $ callId , ] , null , null ) ; $ callNode = new ProtocolNode ( 'call' , [ 'id' => $ id , 'to' => $ this -> getJID ( $ to ) , ] , [ $ rejectNode ] , null ) ; $ this -> sendNode ( $ callNode ) ; }
Rejects a call.

@param array  $to     Phone number.
@param string $id     The main node id
@param string $callId The call-id
Rejects a call .