Skip to content

Instantly share code, notes, and snippets.

@joebordes
Last active August 28, 2019 18:40
Show Gist options
  • Save joebordes/a66a9f4d2d9fb41b8312ed569c20eb79 to your computer and use it in GitHub Desktop.
Save joebordes/a66a9f4d2d9fb41b8312ed569c20eb79 to your computer and use it in GitHub Desktop.
coreBOS: Create PBXManager call via Webservice

This gist shows an example of coreBOS webservice call to create a PBXManager or Asterisk Integration call record.

The code attached to this gist was created using coreBOS Webservice Development Tool

It uses the coreBOS Webservice PHP Library

It omits the login steps

For this to work correctly you must be using a coreBOS version after February 23 2017

<?php
//create using library
//name of the module for which the entry has to be created.
$moduleName = 'PBXManager';
//fill in the details of the call. userId is obtained from loginResult.
$pbxData = array('callfrom'=>'321',
'assigned_user_id'=>$cbUserID,
'timeofcall' => '21:00',
'status'=>'1',
'callto'=>'123456789');
$create = $cbconn->doCreate($moduleName, $pbxData);
//check for whether the requested operation was successful or not.
if($create) {
//operation was successful get the response.
var_dump($create);
} else {
echo "Create failed<br>";
$err = $cbconn->lastError();
echo $err['code'].': '.$err['message'];
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment