This project will run a Laravel Server that can handle ICE Callbacks from the Sinch Platform @ POST /api/incoming-call
In order to bootstrap the project, you first have to git clone
it locally. Then cd laravel-handle-incoming-call-sinch
. We're now going to install the project's dependencies using a PHP container with Composer preinstalled, therefore run:
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/var/www/html \
-w /var/www/html \
laravelsail/php81-composer:latest \
composer install --ignore-platform-reqs
After installing the dependencies we can bootstrap the project using vendor/bin/sail up
. This command will take a while when running it the first time. See the Laravel Sail for documentation for more.
Using ngrok, ngrok http 8081
set the Sinch Callback URL to the generated ngrok URL http:{ngrok-path}/api/incoming-call
.
You can call your Sinch owned number that has been configured with your App. You will hear the message defined in routes/api.php
file.