Book Image

Twilio Cookbook: Second Edition

By : Roger Stringer
Book Image

Twilio Cookbook: Second Edition

By: Roger Stringer

Overview of this book

Table of Contents (20 chapters)
Twilio Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Setting a maximum queue size


If you deal with large call volumes, it's nice to be able to set a queue size. The default maximum queue size is 100, and the maximum queue size it can be set to default is 1000.

Getting started

The complete code for this recipe can be found in the Code/Recipe3/ folder.

How to do it…

We're going to set up this recipe to take a passed sid queue. From there, we will change the maximum queue size from the default value of 100 to 150 callers instead.

Download the Twilio Helper Library available at https://github.com/twilio/twilio-php/zipball/master and unzip it. Now perform the following steps.

  1. Upload the Services/ folder to your website.

  2. Upload config.php to your web server using the following code:

      <?php
        $accountsid = '';  //  YOUR TWILIO ACCOUNT SID
        $authtoken = '';  //  YOUR TWILIO AUTH TOKEN
      ?>
  3. Upload max-size.php to your web server using the following code:

    <?php
      include("config.php");
      # Include Twilio PHP helper library.
      require('Services...