Skip to content

Commit bd98a34

Browse files
authored
Merge pull request #2 from i-rocky/v2
event service bypass
2 parents 149e63b + 5c7564d commit bd98a34

File tree

4 files changed

+34
-6
lines changed

4 files changed

+34
-6
lines changed

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ This should publish the following files
1212

1313
```tree
1414
project
15-
| config
16-
| | laravel-twilio.php
15+
└───config
16+
| laravel-twilio.php
1717
|
1818
└───resources
1919
└───assets
@@ -34,6 +34,10 @@ project
3434
> To use `TwilioService.js` run `yarn add axios twilio-client`
3535
3636
You can add/update/remove/move the files and use as your wish
37+
38+
39+
40+
3741
### Setup
3842

3943
Update `config/services.php`
@@ -74,25 +78,44 @@ Now you have to set the Webhook URL in Twilio console.
7478

7579
> Replace `laravel-twilio` in the Webhook URL with the base URL you've set for `LARAVEL_TWILIO_BASE_URL` in `.env`
7680
81+
82+
7783
#### Incoming Calls
7884
Go to your phone number configuration from [Active Numbers](https://www.twilio.com/console/phone-numbers/incoming) then click on the desired number.
7985

8086
1. Under `Voice & Fax` for `Accept Incoming` select `Voice Calls`
8187
2. Under `Configure With` select `Webhooks, TwiML Bins, Functions, Studio, or Proxy`
8288
3. Under `A Call Comes In` select `Webhook` and set the value to `https://your-domain.tld/api/laravel-twilio/voice/incoming`
8389

90+
91+
92+
#### Incoming Faxes
93+
Go to your phone number configuration from [Active Numbers](https://www.twilio.com/console/phone-numbers/incoming) then click on the desired number.
94+
95+
1. Under `Voice & Fax` for `Accept Incoming` select `Faxes`
96+
2. Under `Configure With` select `Webhooks, TwiML Bins, Functions, Studio, or Proxy`
97+
3. Under `A Fax Comes In` select `Webhook` and set the value to `https://your-domain.tld/api/laravel-twilio/fax/incoming`
98+
99+
100+
84101
#### Incoming Messages
85102
Go to your phone number configuration from [Active Numbers](https://www.twilio.com/console/phone-numbers/incoming) then click on the desired number.
86103

87104
1. Under `Configure With` select `Webhooks, TwiML Bins, Functions, Studio, or Proxy`
88105
2. Under `A Message Comes In` select `Webhook` and set the value to `https://your-domain.tld/api/laravel-twilio/message/incoming`
89106

107+
108+
109+
90110
#### Outgoing Calls
91111

92112
Go to [TwiML Apps](https://www.twilio.com/console/phone-numbers/runtime/twiml-apps) list and select desired app or create a new app
93113

94114
1. Under `Voice` set the `REQUEST URI` to `https://your-domain.tld/api/laravel-twilio/voice`
95115

116+
117+
118+
96119
### Usage
97120

98121
Implement `Notifiable`
@@ -171,6 +194,9 @@ class TwilioTestNotification extends Notification {
171194
172195
> If you don't have `username` property definition in your Auth provider model, you must implement `laravelTwilioIdentity()` method to give your agents an identity for calling.
173196
197+
198+
199+
174200
### Events
175201

176202
Namespace `Rocky\LaravelTwilio\Events`
@@ -204,4 +230,6 @@ $allParams = $call->all();
204230

205231
```
206232

233+
> ###_The incoming fax implementation is not tested._
234+
207235
Look into the source code for a clearer understanding.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "i-rocky/laravel-twilio",
3-
"description": "Twilio Fax, SMS, Call receiving and sending support along with dashboard for laravel",
4-
"version": "2.0.0",
3+
"description": "Twilio Fax, SMS, MMS, Voice Call recording, receiving, sending support for laravel",
4+
"version": "2.0.2",
55
"type": "library",
66
"license": "MIT",
77
"authors": [

src/Providers/LaravelTwilioServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function register()
4242

4343
$this->app->register(RouteServiceProvider::class);
4444

45-
if ($this->app->environment() === 'local') {
45+
if (config('laravel-twilio.env') === 'dev') {
4646
$this->app->register(EventServiceProvider::class);
4747
}
4848

src/routes/api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Route::post('voice/record', [TwimlAppController::class, 'voiceRecord'])->name('api.laravel-twilio.voice.record');
1313

1414
// fax
15-
Route::post('fax', [MessageController::class, 'faxPing'])->name('api.laravel-twilio.fax.ping');
15+
Route::post('fax/incoming', [MessageController::class, 'faxPing'])->name('api.laravel-twilio.fax.ping');
1616
Route::post('fax/receive', [MessageController::class, 'receiveFax'])->name('api.laravel-twilio.fax.receive');
1717
Route::post('report/fax/status', [MessageController::class, 'faxDeliveryReport'])->name('api.laravel-twilio.fax.report');
1818

0 commit comments

Comments
 (0)