Everything about Conference Call
Find out all the important info about Conference Call API: from service specifications, via price lists to code examples and relevant links to documentation or application examples.

Try the Conference Call API

You have to be logged in to use this Conference Call Service.



 
 
   

How it works

  1. require_once(dirname(__FILE__).'/../../src/conferencecall/client/ConferenceCallClient.php'); // Includes the Conference Call client
  2. require_once(dirname(__FILE__).'/../../src/conferencecall/data/ConferenceCallStatusConstants.php'); // Includes the Conference Call constants
  3.  
  4. $username = 'username'; // Telekom Developer Center user name
  5. $password = 'password'; // Telekom Developer Center password
  6. $client = new ConferenceCallClient('production', $username, $password); // Constructs the Telekom client using the user name and password.
  7.  
  8. // List of participants
  9. $participants = Array(
  10. 0 => Array('FirstName' => 'First', 'LastName' => 'Participant', 'Number' => '+49 30 1234 5678', 'Email' => 'first.participant@example.com', 'Initiator' => 'true'),
  11. 1 => Array('FirstName' => 'Second', 'LastName' => 'Participant', 'Number' => '+49 30 8765 4321', 'Email' => 'second.participant@example.com', 'Initiator' => 'false'),
  12. 2 => Array('FirstName' => 'Third', 'LastName' => 'Participant', 'Number' => '+49 30 9876 1234', 'Email' => 'third.participant@example.com', 'Initiator' => 'false')
  13. );
  14. $maximum_duration = '60'; // The maximum duration of the conference in seconds
  15. $join_confirm = 'false'; // Is pressing the #-key required for joining the conference?
  16.  
  17. $create_response = null; // Result of the creation of the Conference Call object
  18. try {
  19. // Creates the conference object within the Conference Call Server
  20. $create_response = $client->createConference('ownerID', 'name', 'description', null, null, $maximum_duration, $join_confirm, null, null);
  21. // Test, if the invocation of createConference() was successful.
  22. if(!($create_response->getStatus()->getStatusConstant() == ConferenceCallStatusConstants::SUCCESS)) {
  23. $errorMessage = 'The invocation of createConference() was not successful.\n';
  24. $errorMessage .= $create_response->getStatus()->getStatusCode() . ' ' . $create_response->getStatus()->getStatusMessage();
  25. throw new Exception($errorMessage);
  26. }
  27. } catch(Exception $e) {
  28. exit($e->getMessage());
  29. }
  30. print 'The conference ID: ' . $create_response->getConferenceId() . '\n'; // The conference ID. It is used for adding participants and committing the conference
  31. $new_participant_response = null; // Result of adding a participant
  32. foreach ($participants as $participant) {
  33. try {
  34. // Adds the first participant (the initiator) to the conference
  35. $new_participant_response = $client->newParticipant($create_response->getConferenceId(), $participant['FirstName'], $participant['LastName'], $participant['Number'], $participant['Email'], $participant['Initiator']);
  36. // Test, if the invocation of newParticipant() was successful.
  37. if(!($new_participant_response->getStatus()->getStatusConstant() == ConferenceCallStatusConstants::SUCCESS)) {
  38. $errorMessage = 'The invocation of newParticipant() was not successful.\n';
  39. $errorMessage .= $new_participant_response->getStatus()->getStatusCode() . ' ' . $new_participant_response->getStatus()->getStatusMessage();
  40. throw new Exception($errorMessage);
  41. }
  42. } catch(Exception $e) {
  43. exit($e->getMessage());
  44. }
  45. }
  46. $commit_response = null; // The result of the initiation of the conference
  47. try {
  48. // Commits the conference to the Conference Call Server and therefore initiates the conference
  49. $commit_response = $client->commitConference($create_response->getConferenceId());
  50. // Test, if the invocation of commitConference() was successful.
  51. if(!($commit_response->getStatus()->getStatusConstant() == ConferenceCallStatusConstants::SUCCESS)) {
  52. $errorMessage = 'The invocation of commitConference() was not successful.\n';
  53. $errorMessage .= $commit_response->getStatus()->getStatusCode() . ' ' . $commit_response->getStatus()->getStatusMessage();
  54. throw new Exception($errorMessage);
  55. }
  56. } catch(Exception $e) {
  57. exit($e->getMessage());
  58. }
  59. print 'Conference successfully commited.';