{"id":14842,"date":"2020-05-12T09:42:52","date_gmt":"2020-05-12T06:42:52","guid":{"rendered":"https:\/\/trueconf.com\/blog\/?p=14842"},"modified":"2025-03-10T12:13:13","modified_gmt":"2025-03-10T09:13:13","slug":"how-to-deploy-a-video-contact-center-with-trueconf-server-api","status":"publish","type":"post","link":"https:\/\/trueconf.com/blog\/knowledge-base\/how-to-deploy-a-video-contact-center-with-trueconf-server-api","title":{"rendered":"How to deploy a video contact center with TrueConf Server API"},"content":{"rendered":"<div class=\"marked_note\">You can get acquainted with the example of HTML website and the described algorithm on <a href=\"https:\/\/github.com\/TrueConf\/contact_center_api\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub<\/a>.<\/div>\n<p style=\"text-align: justify;\">TrueConf doesn\u2019t only <a href=\"https:\/\/trueconf.com\/blog\/knowledge-base\/get-video-conferencing-system-15-minutes.html\" target=\"_blank\" rel=\"noopener\">provide you with a comfortable and scalable video conferencing system<\/a>, but also enables you to expand its range with the help of <a href=\"https:\/\/developers.trueconf.com\/api\/server\/\" target=\"_blank\" rel=\"noopener\">TrueConf Server API<\/a>.<\/p>\n<p style=\"text-align: justify;\">This article covers the detailed algorithm of video contact center deployment based on TrueConf Server. The main idea is to connect a website <a href=\"https:\/\/trueconf.com\/blog\/wiki\/online-user-guest\" target=\"_blank\" rel=\"noopener\">guest<\/a> and an available operator in a private <a href=\"https:\/\/trueconf.com\/what-is-video-conferencing.html\" target=\"_blank\" rel=\"noopener\">video conference<\/a>. This method uses <a href=\"https:\/\/trueconf.com\/blog\/reviews-comparisons\/which-browsers-support-webrtc.html\" target=\"_blank\" rel=\"noopener\">WebRTC technology<\/a>.<\/p>\n<div class=\"marked_note marked_note--danger\" style=\"text-align: justify;\">\n<p class=\"marked_note__title marked_note__title--danger\">Warning!<\/p>\n<p>The given algorithm and code example is not intended for use in an operational environment. Being deliberately simple, this example is tailored to be used without installing additional software so you can get easily acquainted with TrueConf Server API.<\/p>\n<\/div>\n<p><!--more--><\/p>\n<p style=\"text-align: justify;\">Both users of <a href=\"https:\/\/trueconf.com\/products\/server\/video-conferencing-server.html\" target=\"_blank\" rel=\"noopener\">TrueConf Server<\/a> and <a href=\"https:\/\/trueconf.com\/products\/tcsf\/trueconf-server-free.html\" target=\"_blank\" rel=\"noopener\">TrueConf Server Free<\/a> can check the working capacity of the described scheme.<\/p>\n<div class=\"marked_note marked_note--warning\" style=\"text-align: justify;\">As TrueConf Server Free allows only one simultaneous video conference, we do not recommend using it as a full-fledged platform for the video contact center deployment.<\/div>\n<h2 style=\"text-align: justify;\">Pre-configuring TrueConf Server<\/h2>\n<ol style=\"text-align: justify;\">\n<li>Create a separate group named <b>Operators<\/b> in <a href=\"https:\/\/docs.trueconf.com\/server\/en\/admin\/web-config#groups-tab\" target=\"_blank\" rel=\"noopener\">TrueConf Server control panel<\/a> and add users who will accept calls.<\/li>\n<li>Configure the <a href=\"https:\/\/trueconf.com\/blog\/knowledge-base\/adjust-https-trueconf-server.html\" target=\"_blank\" rel=\"noopener\">HTTPS connection<\/a> for using WebRTC widget and performing TrueConf Server API requests.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">Requests to the TrueConf Server API are used to perform the actions described in the algorithm.<\/p>\n<h2 style=\"text-align: justify;\">Step 1. Obtaining the list of operators<\/h2>\n<p style=\"text-align: justify;\">Obtain the list of all users in the <b>Operators<\/b> group. It is better to do this at each iteration of the algorithm, so you will not miss the moment of adding a new operator to the group.<\/p>\n<h2 style=\"text-align: justify;\">Step 2. Selecting an available operator<\/h2>\n<ol style=\"text-align: justify;\">\n<li>Create the list of online operators (objects <a href=\"https:\/\/developers.trueconf.com\/api\/server\/#api-Objects-User\" target=\"_blank\" rel=\"noopener\">ObjectUser<\/a> in <a href=\"#Step_1_Obtaining_the_list_of_operators\">the list<\/a> will have <code>status = 1<\/code>).<\/li>\n<li>Randomly choose one operator from the list. <a href=\"https:\/\/trueconf.com\/blog\/wiki\/trueconf-id\" target=\"_blank\" rel=\"noopener\">TrueConf ID<\/a> of the selected user must differ from the one you specified in <a href=\"#Step_5_Checking_the_operators_status\">step 5<\/a> in the previous iteration.<\/li>\n<li>If there is no available operator, return to <a href=\"#Step_1_Obtaining_the_list_of_operators\">step 1<\/a> after a short period of time (for example, 10 seconds).<\/li>\n<li>Repeat attempts to find an available operator the required number of times (e.g. 3 times) or within a specified period of time (e.g. 30 seconds).<\/li>\n<\/ol>\n<h2 style=\"text-align: justify;\">Step 3. Creating a conference<\/h2>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/developers.trueconf.com\/api\/server\/#api-Conferences-CreateConference\" target=\"_blank\" rel=\"noopener\">Create a new conference<\/a> with the following parameters:<\/p>\n<ul style=\"text-align: justify;\">\n<li><a href=\"https:\/\/trueconf.com\/blog\/wiki\/owner\" target=\"_blank\" rel=\"noopener\">owner<\/a> and <a href=\"https:\/\/trueconf.com\/blog\/wiki\/conference-participant\" target=\"_blank\" rel=\"noopener\">participant<\/a> &#8211; set the <a href=\"#Step_2_Selecting_an_available_operator\">selected operator<\/a> in both entry fields.<\/li>\n<li>number of participants &#8211; 2.<\/li>\n<li>conference schedule &#8211; <a href=\"https:\/\/trueconf.com\/blog\/wiki\/virtual-room\" target=\"_blank\" rel=\"noopener\">virtual room<\/a> (without schedule).<\/li>\n<li>conference type &#8211; public, so the website guest can connect via WebRTC application.<\/li>\n<li><a href=\"https:\/\/trueconf.com\/blog\/knowledge-base\/the-ultimate-guide-to-conference-modes.html\" target=\"_blank\" rel=\"noopener\">conference mode<\/a> &#8211; symmetric.<\/li>\n<\/ul>\n<h2 style=\"text-align: justify;\">Step 4. Starting a conference<\/h2>\n<p style=\"text-align: justify;\">After you&#8217;ve created the conference, <a href=\"https:\/\/developers.trueconf.com\/api\/server\/#api-Conferences-RunConference\" target=\"_blank\" rel=\"noopener\">start it<\/a>. Operator will automatically receive an invitation as a participant.<\/p>\n<h2 style=\"text-align: justify;\">Step 5. Checking the operator\u2019s status<\/h2>\n<p style=\"text-align: justify;\">Some time after the <a href=\"#Step_4_Starting_a_conference\">conference starts<\/a> (e.g., 10 seconds), <a href=\"https:\/\/developers.trueconf.com\/api\/server\/#api-Conferences_Participants-GetParticipantList\" target=\"_blank\" rel=\"noopener\">check<\/a> whether the selected operator is connected to the conference. If the operator didn\u2019t accept the call, complete the following steps:<\/p>\n<ol style=\"text-align: justify;\">\n<li>Write the operator\u2019s TrueConf ID.<\/li>\n<li><a href=\"https:\/\/developers.trueconf.com\/api\/server\/#api-Conferences-StopConference\" target=\"_blank\" rel=\"noopener\">Stop the conference<\/a>.<\/li>\n<li><a href=\"https:\/\/developers.trueconf.com\/api\/server\/#api-Conferences-DeleteConference\" target=\"_blank\" rel=\"noopener\">Delete the conference<\/a>.<\/li>\n<li>Return to the <a href=\"#Step_1_Obtaining_the_list_of_operators\">step 1<\/a>.<\/li>\n<\/ol>\n<h2 style=\"text-align: justify;\">Step 6. Obtaining the guest link<\/h2>\n<p style=\"text-align: justify;\">Obtain the guest link for the <a href=\"#Step_3_Creating_a_conference\">created conference<\/a> from the <a href=\"https:\/\/developers.trueconf.com\/api\/server\/#api-Software_Clients-GetClientList\" target=\"_blank\" rel=\"noopener\">client applications list<\/a> to connect via WebRTC widget.<\/p>\n<h2 style=\"text-align: justify;\">Step 7. Embedding the widget on the website<\/h2>\n<p style=\"text-align: justify;\">Create a widget to embed it on the website in a form of HTML element <code>&lt;iframe&gt;<\/code> by setting the <a href=\"#Step_6_Obtaining_the_guest_link\">guest link<\/a> as a path for downloading content.<\/p>\n<h2 style=\"text-align: justify;\">Step 8. Ending the call<\/h2>\n<p style=\"text-align: justify;\">You can track the ending of a call with the help of <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Window\/postMessage\" target=\"_blank\" rel=\"noopener noreferrer\">postMessage<\/a> technology (widget will send the <code>connectionClosed<\/code> message). When the call ends, do the following steps:<\/p>\n<ol style=\"text-align: justify;\">\n<li>Delete the <a href=\"#Step_7_Embedding_the_widget_on_the_website\">embedded widget<\/a>.<\/li>\n<li><a href=\"https:\/\/developers.trueconf.com\/api\/server\/#api-Conferences-StopConference\" target=\"_blank\" rel=\"noopener\">Stop the video conference<\/a>.<\/li>\n<li><a href=\"https:\/\/developers.trueconf.com\/api\/server\/#api-Conferences-DeleteConference\" target=\"_blank\" rel=\"noopener\">Delete the video conference<\/a> from the server.<\/li>\n<\/ol>\n<h2 style=\"text-align: justify;\">Additional settings<\/h2>\n<p style=\"text-align: justify;\">If necessary, you can forbid the guests to use some <a href=\"https:\/\/trueconf.com\/blog\/knowledge-base\/embedding-trueconf-video-conferencing-into-your-website.html#How_to_customize_conference_webpage\" target=\"_blank\" rel=\"noopener\">features of WebRTC client<\/a> (e.g. content sharing).<\/p>\n<div class=\"marked_note marked_note--warning\" style=\"text-align: justify;\">To save the history of communication between operators and customers, you can <a href=\"https:\/\/trueconf.com\/blog\/knowledge-base\/how-to-record-video-conference.html#How_to_record_video_conferences_on_TrueConf_Server_side\" target=\"_blank\" rel=\"noopener\">set up automatic recording of video calls<\/a>.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>You can get acquainted with the example of HTML website and the described algorithm on GitHub. TrueConf doesn\u2019t only provide you with a comfortable and scalable video conferencing system, but also enables you to expand its range with the help of TrueConf Server API. This article covers the detailed algorithm of video contact center deployment [&hellip;]<\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[260],"tags":[246],"class_list":["post-14842","post","type-post","status-publish","format-standard","hentry","category-knowledge-base","tag-api-and-sdk","wpautop"],"_links":{"self":[{"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/posts\/14842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/comments?post=14842"}],"version-history":[{"count":7,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/posts\/14842\/revisions"}],"predecessor-version":[{"id":14911,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/posts\/14842\/revisions\/14911"}],"wp:attachment":[{"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/media?parent=14842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/categories?post=14842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/tags?post=14842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}