![]() ![]() $resp = curl_exec ( $ch ) if ( ! $resp ) // Close request to clear up some resourcesĬurl_close ( $ch ) ?> Step 3 - Setup your dial plan $agi -> request, "notify" => "1", "from" => "Ewing IT PBX", ) $body = http_build_query ( $body ) // Set bodyĬurl_setopt ( $ch, CURLOPT_POST, 1 ) curl_setopt ( $ch, CURLOPT_TIMEOUT, 3 ) curl_setopt ( $ch, CURLOPT_POSTFIELDS, $body ) // Send the request & save response to $resp This is to ensure that a timeout connecting to the HipChat API doesn’t prevent your calls from progressing. You may also notice a timeout of 3 seconds. You probably want to change the “From” field too, otherwise it’ll display “Ewing IT PBX”. You’ll need to replace YOURURL with the notification URL provided in step 1. On my system this has been set to =/var/lib/asterisk/agi-bin/hipchatnotify.php=. You’ll need to create an AGI script like the following. Step 2 - Setup your AGI scriptĪs mentioned in the pre-requisites you should have PHPAGI installed and configured. You’ll need to make note of the notification URL as you’ll need this in step 2Ĭlick save and that’s the end of step 1. The final step will show the API details. The name will appear as part of the notification so choose carefully. Once done you need to select the room where notifications will be sent and a name for your integration. This will provide you with an API endpoint and credentials that you’ll need in step 2.įrom the HipChat web interface you need to select Integrations on the top menu and then Build your own integration. A functioning HipChat installation with administrative accessįirst you need to configure an integration within HipChat.A functioning Asterisk PBX with access to install AGI scripts. ![]() So that agents are aware a call may be headed their way, we have a room within HipChat where call notifications are sent automatically. We also use HipChat as our internal instant messaging and group chat system. We run an Asterisk PBX with agents who take inbound phone calls from our various phone queues. This post is online for historical reasons only. HipChat has been discontinued as of February 2019. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |