PHPackages                             hafael/totalvoice-notification-channel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. hafael/totalvoice-notification-channel

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

hafael/totalvoice-notification-channel
======================================

TotalVoice Notification Channels for Laravel 5.3+

v1.1.0(6y ago)03261MITPHPPHP &gt;=5.6.4CI failing

Since Feb 13Pushed 6y ago2 watchersCompare

[ Source](https://github.com/hafael/totalvoice-notification-channel)[ Packagist](https://packagist.org/packages/hafael/totalvoice-notification-channel)[ Docs](https://github.com/hafael/totalvoice-notification-channel)[ RSS](/packages/hafael-totalvoice-notification-channel/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (7)Versions (4)Used By (0)

TotalVoice notifications channel for Laravel 5.3+
=================================================

[](#totalvoice-notifications-channel-for-laravel-53)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c675b90822fefdec8e09152e1c5f4e8c0ae83aa873b67e205cb663654c506286/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68616661656c2f746f74616c766f6963652d6e6f74696669636174696f6e2d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hafael/totalvoice-notification-channel)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/fa0e678abe7ec4f64efc23e81fd663e27ffdc3bfa7fba77faca1e9a3751139d6/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f68616661656c2f746f74616c766f6963652d6e6f74696669636174696f6e2d6368616e6e656c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/hafael/totalvoice-notification-channel)[![StyleCI](https://camo.githubusercontent.com/d46ebf0876f42439bc9e46be73aaa1da22506158ab901fa31f8dd5b7dbbd523b/68747470733a2f2f7374796c6563692e696f2f7265706f732f3137303531393838372f736869656c64)](https://styleci.io/repos/170519887)[![SymfonyInsight](https://camo.githubusercontent.com/565b18ec4075610d83e13696b2a6b51be9ee125746a7d78c97ae6191e13a97b6/68747470733a2f2f696e73696768742e73796d666f6e792e636f6d2f70726f6a656374732f37653637353961332d313437362d343966352d393538352d3538636433663065663066322f6d696e692e737667)](https://insight.symfony.com/projects/7e6759a3-1476-49f5-9585-58cd3f0ef0f2)[![Quality Score](https://camo.githubusercontent.com/b176074981936500dc31cc972619f843f46f15cb3b924db39ace982e29968690/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f68616661656c2f746f74616c766f6963652d6e6f74696669636174696f6e2d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hafael/totalvoice-notification-channel)[![Code Coverage](https://camo.githubusercontent.com/c4ebe2ce6a3ffac3e5e6aef378a0bf201f59643150ad9a838a515700ddc9837b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f68616661656c2f746f74616c766f6963652d6e6f74696669636174696f6e2d6368616e6e656c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hafael/totalvoice-notification-channel/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/59e8d0a539f61a83a9f45776ed2bca3e6eced48b82c991f11be6445cbef751b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68616661656c2f746f74616c766f6963652d6e6f74696669636174696f6e2d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hafael/totalvoice-notification-channel)

This package makes it easy to send [TotalVoice Notifications](https://api.totalvoice.com.br/doc) with Laravel 5.3+.

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the TotalVoice service](#setting-up-the-TotalVoice-service)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require hafael/totalvoice-notification-channel
```

Add the service provider (only required on Laravel 5.4 or lower):

```
// config/app.php
'providers' => [
    ...
    NotificationChannels\TotalVoice\TotalVoiceServiceProvider::class,
],
```

### Setting up the TotalVoice service

[](#setting-up-the-totalvoice-service)

Add your TotalVoice Access Token to your `config/services.php`:

```
// config/services.php
...
'totalvoice' => [
    'access_token' => env('TOTALVOICE_ACCESS_TOKEN'),
],
...
```

Usage
-----

[](#usage)

Now you can use the channel in your `via()` method inside the notification:

```
use NotificationChannels\TotalVoice\TotalVoiceChannel;
use NotificationChannels\TotalVoice\TotalVoiceSmsMessage;
use Illuminate\Notifications\Notification;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return [TotalVoiceChannel::class];
    }

    public function toTotalVoice($notifiable)
    {
        return (new TotalVoiceSmsMessage())
            ->content("Your {$notifiable->service} account was approved!");
    }
}
```

You can also send an TTS (text-to-speech) audio call:

```
use NotificationChannels\TotalVoice\TotalVoiceChannel;
use NotificationChannels\TotalVoice\TotalVoiceTtsMessage;
use Illuminate\Notifications\Notification;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return [TotalVoiceChannel::class];
    }

    public function toTotalVoice($notifiable)
    {
        return (new TotalVoiceTtsMessage())
            ->content("Your {$notifiable->service} account was approved!");
    }
}
```

Or create a TotalVoice audio call from .mp3 file url:

```
use NotificationChannels\TotalVoice\TotalVoiceChannel;
use NotificationChannels\TotalVoice\TotalVoiceAudioMessage;
use Illuminate\Notifications\Notification;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return [TotalVoiceChannel::class];
    }

    public function toTotalVoice($notifiable)
    {
        return (new TotalVoiceAudioMessage())
            ->content("http://foooo.bar/audio.mp3");
    }
}
```

In order to let your Notification know which phone are you sending/calling to, the channel will look for the `phone_number` attribute of the Notifiable model. If you want to override this behaviour, add the `routeNotificationForTotalVoice` method to your Notifiable model.

```
public function routeNotificationForTotalVoice()
{
    return '+5521999999999';
}
```

### Available Message methods

[](#available-message-methods)

#### TotalVoiceSmsMessage (SMS)

[](#totalvoicesmsmessage-sms)

- `provideFeedback(false)`: Wait for recipient feedback.
- `multipart(false)`: Supports SMS with &gt; 160 &lt; 16,000 char. Sends multiple sms up to 160char to the same number.
- `scheledule(new \DateTime())`: date and time to schedule the sms delivery. null as default sends immediately.
- `content('')`: Accepts a string value for the notification body.

#### TotalVoiceTtsMessage (Text-to-speech audio call)

[](#totalvoicettsmessage-text-to-speech-audio-call)

- `provideFeedback(false)`: Wait for recipient feedback.
- `fakeNumber(null)`: Accepts a phone to use as the notification sender.
- `recordAudio(false)`: Save the call.
- `detectCallbox(false)`: Automatically disconnects within 3 seconds if it falls into the mailbox (vivo, claro, tim, oi).
- `speed(0)`: From -10 to 10. When -10=very slow, 0=normal and 10=very fast.
- `voiceType('br-Vitoria')`: language-Character acronym who will speak.
- `content('')`: Accepts a string value for the notification body.

#### TotalVoiceAudioMessage (.mp3 audio call)

[](#totalvoiceaudiomessage-mp3-audio-call)

- `provideFeedback(false)`: Wait for recipient feedback.
- `fakeNumber('+5521999999999')`: Accepts a phone to use as the notification sender.
- `recordAudio(false)`: Save the call.
- `detectCallbox(false)`: Automatically disconnects within 3 seconds if it falls into the mailbox (vivo, claro, tim, oi).
- `content('http://foooo.bar/audio.mp3')`: Accepts an .mp3 file url for the call.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Rafael](https://github.com/hafael)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~226 days

Total

2

Last Release

2418d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/39ad3b7c146b7ff339338b2a19ff424f1d677a9ade97faa89f8d8eb19f1439cb?d=identicon)[hafael](/maintainers/hafael)

---

Top Contributors

[![hafael](https://avatars.githubusercontent.com/u/571130?v=4)](https://github.com/hafael "hafael (32 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hafael-totalvoice-notification-channel/health.svg)

```
[![Health](https://phpackages.com/badges/hafael-totalvoice-notification-channel/health.svg)](https://phpackages.com/packages/hafael-totalvoice-notification-channel)
```

###  Alternatives

[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[laravel-notification-channels/apn

Apple APN Push Notification Channel

2021.9M4](/packages/laravel-notification-channels-apn)[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/pusher-push-notifications

Pusher native Push Notifications driver.

282733.2k1](/packages/laravel-notification-channels-pusher-push-notifications)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
