Skip to main content

Hacking Yap to Add a PR extension

· 2 min read
Danny G
BMLT Contributor

You can add a Public Relations or other miscellaneous extensions by doing the following, and leveraging the Menu Options and the Custom Extensions option.

  1. Update or set a digit map as follows adding a new option. As see below we added a new option for pressing 3.
static $digit_map_search_type = ['1' => SearchType::MEETINGS, '2' => SearchType::VOLUNTEERS, '3' => SearchType::CUSTOM_EXTENSIONS];
  1. You will have to add a voice green recording that states what all the options are because by default the custom extension is a hidden menu option in that the spoken voice feature will not indicate it is there. You set this by placing an MP3 or WAV file on a webserver and referencing it with this setting.

  2. You will create a new setting that indicates what each custom extension is and what phone number it goes to. For example if you wanted extension 1 to go to 555-555-1212 you would set this as below.

static $custom_extensions = [1 => '555-555-1212'];
  1. Once that is done you will create another voice recording indicating what each custom extension will route to. You can include as many as you want. The important thing to note is that your custom recording should inform the caller to press pound after they enter the extension number.
static $en_US_custom_extensions_greeting = "https://example.org/customext.mp3";

Merging Yap Servers

· 3 min read
Danny G
BMLT Contributor

Since Yap 3.0.0 (released in March 2019), it’s been possible to use a single Yap server with multiple Twilio accounts. What this means is that a service body can handle the overhead of server management while another service body retains the management of phone numbers and billing.

Excluding a custom format from a Yap query

· One min read
Patrick J
BMLT Contributor

It’s possible to exclude a result from Yap results by using a custom format. For example say you made a Temporary Closure format that had an ID of 2069. You could set in your config.php a custom query, which would exclude those in the response.