Skip to content

Example app showing how to add all callers to a phone number into a telephone conference, using PHP

License

Notifications You must be signed in to change notification settings

nexmo-community/php-conference-call

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Conference Call with Nexmo

📞 This is the sample code to create a very simple telephone conference on the Nexmo platform with PHP. When each user calls the number, they will be added into a telephone conference so they can chat with one another.

Installation

Clone the repository to your local machine and run composer install.

Run the local webserver by doing cd public/ and then php -S localhost:8080.

Make your code publicly available with ngrok: ngrok http 8080. Copy the https URL, we'll need this later!

Now set up the Nexmo side of things - if you don't already have an account you can sign up here.

  • Install the Nexmo CLI tool if you don't have it already.
  • Buy a Nexmo number (you can also do this via your account dashboard):
    • nexmo number:search [country] (the country code will be something like US or GB) to get a list of available numbers.
    • nexmo number:buy [number] to buy the number you chose from the list
  • Create an application (also possible using the account dashboard): nexmo app:create PHPConfCall [ngrok_url]/answer.php [ngrok_url]/event.php --keyfile private.key. This command will show you the UUID of the application you created, we need this in the next step.
  • Link the number and the application: nexmo link:app [number] [application ID

Usage

📱 Phone the number and ask your friends to do the same! Now chat!

You'll see the various call events arriving and in this simple example they are simply written to the error log.

About

Example app showing how to add all callers to a phone number into a telephone conference, using PHP

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages