CINXE.COM

Exotel Developer Portal

<style> .content{ margin-top:0px !important; } @media only screen and (max-width: 600px) { .table-responsive{ display: block !important; } .alert-info{ word-break: break-all !important; } .product-search { margin-top: 0vh !important; } } </style> <!DOCTYPE html> <html lang="en" style="margin-top: 0rem !important;"> <head> <meta charset="utf-8"> <meta name="viewport" content=" initial-scale=1.0"> <title>Exotel Developer Portal</title> <meta charset="UTF-8"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous"> <link href='https://fonts.googleapis.com/css?family=Nunito Sans' rel='stylesheet'> <meta name='robots' content='max-image-preview:large' /> <link rel='dns-prefetch' href='//fonts.googleapis.com' /> <link rel='dns-prefetch' href='//s.w.org' /> <link rel='dns-prefetch' href='//www.googletagmanager.com' /> <script type="text/javascript"> window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.1.0\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.1.0\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/developer.exotel.com\/wp-includes\/js\/wp-emoji-release.min.js?ver=5.8.10"}}; !function(e,a,t){var n,r,o,i=a.createElement("canvas"),p=i.getContext&&i.getContext("2d");function s(e,t){var a=String.fromCharCode;p.clearRect(0,0,i.width,i.height),p.fillText(a.apply(this,e),0,0);e=i.toDataURL();return p.clearRect(0,0,i.width,i.height),p.fillText(a.apply(this,t),0,0),e===i.toDataURL()}function c(e){var t=a.createElement("script");t.src=e,t.defer=t.type="text/javascript",a.getElementsByTagName("head")[0].appendChild(t)}for(o=Array("flag","emoji"),t.supports={everything:!0,everythingExceptFlag:!0},r=0;r<o.length;r++)t.supports[o[r]]=function(e){if(!p||!p.fillText)return!1;switch(p.textBaseline="top",p.font="600 32px Arial",e){case"flag":return s([127987,65039,8205,9895,65039],[127987,65039,8203,9895,65039])?!1:!s([55356,56826,55356,56819],[55356,56826,8203,55356,56819])&&!s([55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447],[55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447]);case"emoji":return!s([10084,65039,8205,55357,56613],[10084,65039,8203,55357,56613])}return!1}(o[r]),t.supports.everything=t.supports.everything&&t.supports[o[r]],"flag"!==o[r]&&(t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&t.supports[o[r]]);t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&!t.supports.flag,t.DOMReady=!1,t.readyCallback=function(){t.DOMReady=!0},t.supports.everything||(n=function(){t.readyCallback()},a.addEventListener?(a.addEventListener("DOMContentLoaded",n,!1),e.addEventListener("load",n,!1)):(e.attachEvent("onload",n),a.attachEvent("onreadystatechange",function(){"complete"===a.readyState&&t.readyCallback()})),(n=t.source||{}).concatemoji?c(n.concatemoji):n.wpemoji&&n.twemoji&&(c(n.twemoji),c(n.wpemoji)))}(window,document,window._wpemojiSettings); </script> <style type="text/css"> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 .07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link rel='stylesheet' id='wp-block-library-css' href='https://developer.exotel.com/wp-includes/css/dist/block-library/style.min.css?ver=5.8.10' type='text/css' media='all' /> <link rel='stylesheet' id='contact-form-7-css' href='https://developer.exotel.com/wp-content/plugins/contact-form-7/includes/css/styles.css?ver=5.5.3' type='text/css' media='all' /> <link rel='stylesheet' id='pld-font-awesome-css' href='https://developer.exotel.com/wp-content/plugins/posts-like-dislike/css/fontawesome/css/all.min.css?ver=1.0.6' type='text/css' media='all' /> <link rel='stylesheet' id='pld-frontend-css' href='https://developer.exotel.com/wp-content/plugins/posts-like-dislike/css/pld-frontend.css?ver=1.0.6' type='text/css' media='all' /> <link rel='stylesheet' id='wp-pagenavi-css' href='https://developer.exotel.com/wp-content/plugins/wp-pagenavi/pagenavi-css.css?ver=2.70' type='text/css' media='all' /> <link rel='stylesheet' id='search-filter-plugin-styles-css' href='https://developer.exotel.com/wp-content/plugins/search-filter-pro/public/assets/css/search-filter.min.css?ver=2.5.11' type='text/css' media='all' /> <link rel='stylesheet' id='main-styles-css' href='https://developer.exotel.com/wp-content/themes/exotel/style.css?ver=1669217987' type='text/css' media='' /> <link rel='stylesheet' id='font-css' href='https://fonts.googleapis.com/css?family=Muli%3A300%2C400%2C600%2C800&#038;ver=5.8.10' type='text/css' media='all' /> <link rel='stylesheet' id='style-css' href='https://developer.exotel.com/wp-content/themes/exotel/assets/css/styles.css?ver=5.8.10' type='text/css' media='all' /> <script type='text/javascript' src='https://developer.exotel.com/wp-includes/js/jquery/jquery.min.js?ver=3.6.0' id='jquery-core-js'></script> <script type='text/javascript' src='https://developer.exotel.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.3.2' id='jquery-migrate-js'></script> <script type='text/javascript' id='pld-frontend-js-extra'> /* <![CDATA[ */ var pld_js_object = {"admin_ajax_url":"https:\/\/developer.exotel.com\/wp-admin\/admin-ajax.php","admin_ajax_nonce":"a272734309"}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.exotel.com/wp-content/plugins/posts-like-dislike/js/pld-frontend.js?ver=1.0.6' id='pld-frontend-js'></script> <script type='text/javascript' id='search-filter-plugin-build-js-extra'> /* <![CDATA[ */ var SF_LDATA = {"ajax_url":"https:\/\/developer.exotel.com\/wp-admin\/admin-ajax.php","home_url":"https:\/\/developer.exotel.com\/","extensions":[]}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.exotel.com/wp-content/plugins/search-filter-pro/public/assets/js/search-filter-build.min.js?ver=2.5.11' id='search-filter-plugin-build-js'></script> <script type='text/javascript' src='https://developer.exotel.com/wp-content/plugins/search-filter-pro/public/assets/js/chosen.jquery.min.js?ver=2.5.11' id='search-filter-plugin-chosen-js'></script> <link rel="https://api.w.org/" href="https://developer.exotel.com/wp-json/" /><link rel="alternate" type="application/json" href="https://developer.exotel.com/wp-json/wp/v2/pages/3696" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://developer.exotel.com/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://developer.exotel.com/wp-includes/wlwmanifest.xml" /> <meta name="generator" content="WordPress 5.8.10" /> <link rel="canonical" href="https://developer.exotel.com/api/make-a-call-api" /> <link rel='shortlink' href='https://developer.exotel.com/?p=3696' /> <link rel="alternate" type="application/json+oembed" href="https://developer.exotel.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fdeveloper.exotel.com%2Fapi%2Fmake-a-call-api" /> <link rel="alternate" type="text/xml+oembed" href="https://developer.exotel.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fdeveloper.exotel.com%2Fapi%2Fmake-a-call-api&#038;format=xml" /> <meta name="generator" content="Site Kit by Google 1.68.0" /><style></style> <!-- Google Tag Manager snippet added by Site Kit --> <script type="text/javascript"> ( function( w, d, s, l, i ) { w[l] = w[l] || []; w[l].push( {'gtm.start': new Date().getTime(), event: 'gtm.js'} ); var f = d.getElementsByTagName( s )[0], j = d.createElement( s ), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore( j, f ); } )( window, document, 'script', 'dataLayer', 'GTM-TSLF3FD' ); </script> <!-- End Google Tag Manager snippet added by Site Kit --> <link rel="icon" href="https://developer.exotel.com/wp-content/uploads/2023/04/cropped-white-bg-X-01-1-32x32.png" sizes="32x32" /> <link rel="icon" href="https://developer.exotel.com/wp-content/uploads/2023/04/cropped-white-bg-X-01-1-192x192.png" sizes="192x192" /> <link rel="apple-touch-icon" href="https://developer.exotel.com/wp-content/uploads/2023/04/cropped-white-bg-X-01-1-180x180.png" /> <meta name="msapplication-TileImage" content="https://developer.exotel.com/wp-content/uploads/2023/04/cropped-white-bg-X-01-1-270x270.png" /> <!-- Link Swiper's CSS --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css"/> <style> html { margin-top: 0% !important; } .carousel-indicators .active{ width: 20px; } @media (min-width: 1441px){ .nav-container { width: 1170px !important; } nav ul.nav { margin-top: 0px !important; } } @media (min-width: 1200px){ .nav-container { width: 1170px !important; } nav ul.nav { margin-top: 0px !important; } } .rotateimg180 { -webkit-transform:rotate(180deg); -moz-transform: rotate(180deg); -ms-transform: rotate(180deg); -o-transform: rotate(180deg); transform: rotate(180deg); } .res-nav{ align-items: center; } @media only screen and (min-width: 1200px) { .res-nav{ display: flex !important; align-items: center; justify-content: center; } } .searchoverlay { height: 0%; width: 100%; position: fixed; top: 0; left: 0; background-color: white; overflow-y: hidden; transition: 0.5s; z-index: 99 !important; margin-top: 5em !important; border-bottom: 2px solid #0098FF; } .searchoverlay-content { position: relative; width: 100%; text-align: center; margin-top: 45px; } .searchoverlay .closebtn { position: absolute; top: 35px; right: 45px; font-size: 60px; opacity: 1; z-index: 999 !important; text-decoration: none !important; } .sf-field-search label input{ border-bottom: none !important; border: 1px solid #0098FF !important; } @media screen and (max-height: 450px) { .searchoverlay {overflow-y: auto;} .searchoverlay a {font-size: 20px} .searchoverlay .closebtn { font-size: 40px; top: 15px; right: 35px; opacity: 1; z-index: 999 !important; color: white !important; text-decoration: none !important; } } ::-webkit-scrollbar { width: 5px; } /* Track */ ::-webkit-scrollbar-track { box-shadow: inset 0 0 5px grey; border-radius: 5px; } /* Handle */ ::-webkit-scrollbar-thumb { background: lightgray; border-radius: 5px; } /* Handle on hover */ ::-webkit-scrollbar-thumb:hover { background: lightgray; } #myGlobalSearchNav{ z-index: 99 !important; } .gbl-spc{ margin-top:-2.35rem !important; } @media only screen and (max-width: 600px) { .gbl-spc{ margin-top:-1.35rem !important; } .searchoverlay-content { padding:3rem 1rem !important; } .searchoverlay .closebtn { top:0px !important; right: 10px !important; font-size: 50px !important; } } @media (min-width: 768px){ .navbar { border-radius: 0px !important; } } </style> </head> <body> <!-- Start: Over Nav --> <div id="myNav" class="overlay hidden-lg" style="overflow-y: scroll;overflow-x: hidden;z-index:9999;"> <a href="javascript:void(0)" class="closebtn " onclick="closeNav()">&times;</a> <div class="overlay-content slide-left hidden-lg" style="z-index:9999;" > <div style="background: #FFFF;position:absolute;width:100%;"> <div class="row" style="margin-left: 0px;margin-right: 0px;margin-top: 3px;background: #0000;"> <div class="col-md-12" style="height: 64px;padding-top: 12px;left:10px;"><img src="https://developer.exotel.com/wp-content/uploads/2019/10/ExotelDeveloper-Logo.svg" alt=""> <svg onclick="closeNav()" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" style="font-size: 40px;position: absolute;right: 30px;color: #0098FF;" > <a href="javascript:void(0)" class="closebtn" > <path d="M6.2253 4.81108C5.83477 4.42056 5.20161 4.42056 4.81108 4.81108C4.42056 5.20161 4.42056 5.83477 4.81108 6.2253L10.5858 12L4.81114 17.7747C4.42062 18.1652 4.42062 18.7984 4.81114 19.1889C5.20167 19.5794 5.83483 19.5794 6.22535 19.1889L12 13.4142L17.7747 19.1889C18.1652 19.5794 18.7984 19.5794 19.1889 19.1889C19.5794 18.7984 19.5794 18.1652 19.1889 17.7747L13.4142 12L19.189 6.2253C19.5795 5.83477 19.5795 5.20161 19.189 4.81108C18.7985 4.42056 18.1653 4.42056 17.7748 4.81108L12 10.5858L6.2253 4.81108Z" fill="currentColor"> </path> </a> </svg> <div style="margin-top: 29px;margin-bottom:20%"> <div class="col-md-12" style="padding-right: 0px;padding-left: 0px;"> <div><a class="btn btn-default" role="button" href="https://developer.exotel.com/" style="width: 98%;text-align: left;background: rgba(255,255,255,0);font-size: 20px;border-style: none;box-shadow: none;background: transparent;padding-left: 12px;margin-top: 10px;margin-bottom: 10px;"><span>Home</span> </a> </div> <div > <div onclick="funcollapse('collapse-1')"> <a class="btn btn-default coll" data-toggle="collapse" aria-expanded="false" aria-controls="collapse-1" href="#collapse-1" role="button" style="width: 98%;text-align: left;background: rgba(255,255,255,0);font-size: 20px;border-style: none;box-shadow: none;background: transparent;;padding-left: 12px;margin-top: 10px;margin-bottom: 10px;">API Docs <svg xmlns="http://www.w3.org/2000/svg" id="collapse-1icond" class="icond" width="1em" height="1em" viewBox="0 0 24 24" fill="none" style="font-size: 26px;position: absolute;right: 30px;transform-origin: 50% 50% rotate(90);"> <path d="M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z" fill="currentColor"></path> </svg> <svg xmlns="http://www.w3.org/2000/svg" id="collapse-1iconu" class="rotateimg180 iconu" width="1em" height="1em" viewBox="0 0 24 24" fill="none" style="display:none;font-size: 26px;position: absolute;right: 30px;transform-origin: 50% 50% rotate(90);"> <path d="M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z" fill="currentColor"></path> </svg> </a> </div> <div class="collapse coll-in" id="collapse-1"> <div class="container" style="padding-right: 0px;padding-left: 0px;"> <div> <div class="col-md-12" style="display: flex;flex-direction: column;flex-wrap: wrap;height: 308.156px;background: rgba(0,152,255,0.19);border-radius: 18px;border: 1px solid rgba(51,51,51,0.15);margin-right:10px;"> <h1 onclick="locachange('https://developer.exotel.com/api/make-a-call-api')" href="https://developer.exotel.com/api/make-a-call-api" style="width: 80px;font-size: 20px;text-align: left;">Voice</h1> <h1 onclick="locachange('https://developer.exotel.com/api/sms')" href="https://developer.exotel.com/api/sms" style="width: 80px;font-size: 20px;text-align: left;">SMS</h1> <h1 onclick="locachange('https://developer.exotel.com/api/exophones')" href="https://developer.exotel.com/api/exophones" style="width: 80px;font-size: 20px;text-align: left;">Exophones</h1> <h1 onclick="locachange('https://developer.exotel.com/api/heart-beat')" href="https://developer.exotel.com/api/heart-beat" style="width: 80px;font-size: 20px;text-align: left;">Heartbeat</h1> <h1 onclick="locachange('https://developer.exotel.com/api/campaigns')" href="https://developer.exotel.com/api/campaigns" style="width: 80px;font-size: 20px;text-align: left;">Call Campaigns</h1> <h1 onclick="locachange('https://developer.exotel.com/api/sms-campaigns')" href="https://developer.exotel.com/api/sms-campaigns" style="width: 80px;font-size: 20px;text-align: left;">SMS Campaigns</h1> <h1 onclick="locachange('https://developer.exotel.com/api/leadassist-greenvn')" href="https://developer.exotel.com/api/leadassist-greenvn" style="width: 80px;font-size: 20px;text-align: left;">Lead Assist</h1> <h1 onclick="locachange('https://developer.exotel.com/api/users')" href="https://developer.exotel.com/api/users" style="width: 80px;font-size: 20px;text-align: left;">Users</h1> <h1 onclick="locachange('https://developer.exotel.com/api/product-exoverify-apis')" href="https://developer.exotel.com/api/product-exoverify-apis" style="width: 80px;font-size: 20px;text-align: left;">ExoVerify</h1> <h1 onclick="locachange('https://developer.exotel.com/api/whatsapp')" href="https://developer.exotel.com/api/whatsapp" style="width: 80px;font-size: 20px;text-align: left;">Whatsapp </h1> <h1 onclick="locachange('https://developer.exotel.com/api/url-shortening')" href="https://developer.exotel.com/api/url-shortening" style="width: 80px;font-size: 20px;text-align: left;">URL shortening</h1> <h1 onclick="locachange('https://developer.exotel.com/api')" href="https://developer.exotel.com/api" style="width: 80px;font-size: 20px;text-align: left;">More...</h1> </div> </div> </div> </div> </div> <div > <div onclick="funcollapse('collapse-2')"> <a class="btn btn-default coll" data-toggle="collapse" aria-expanded="false" aria-controls="collapse-2" href="#collapse-2" role="button" style="width: 98%;text-align: left;background: rgba(255,255,255,0);font-size: 20px;border-style: none;box-shadow: none;background: transparent;;padding-left: 12px;margin-top: 10px;margin-bottom: 10px;">API Console <svg xmlns="http://www.w3.org/2000/svg" id="collapse-2icond" class="icond" width="1em" height="1em" viewBox="0 0 24 24" fill="none" style="font-size: 26px;position: absolute;right: 30px;transform-origin: 50% 50% rotate(90);"> <path d="M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z" fill="currentColor"></path> </svg> <svg xmlns="http://www.w3.org/2000/svg" id="collapse-2iconu" class="rotateimg180 iconu" width="1em" height="1em" viewBox="0 0 24 24" fill="none" style="display:none;font-size: 26px;position: absolute;right: 30px;transform-origin: 50% 50% rotate(90);"> <path d="M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z" fill="currentColor"></path> </svg> </a> </div> <div class="collapse coll-in" id="collapse-2"> <div class="container" style="padding-right: 0px;padding-left: 0px;"> <div> <div class="col-md-12" style="display: flex;flex-direction: column;flex-wrap: wrap;height: 308.156px;background: rgba(0,152,255,0.19);border-radius: 18px;border: 1px solid rgba(51,51,51,0.15);margin-right:10px;"> <h1 onclick="locachange('https://developer.exotel.com/api-console/make-a-call-api')" href="https://developer.exotel.com/api-console/make-a-call-api" style="width: 80px;font-size: 20px;text-align: left;">Voice</h1> <h1 onclick="locachange('https://developer.exotel.com/api-console/product-sms')" href="https://developer.exotel.com/api-console/product-sms" style="width: 80px;font-size: 20px;text-align: left;">SMS</h1> <h1 onclick="locachange('https://developer.exotel.com/api-console/exophone')" href="https://developer.exotel.com/api-console/exophone" style="width: 80px;font-size: 20px;text-align: left;">Exophones</h1> <h1 onclick="locachange('https://developer.exotel.com/api-console/heart-beat')" href="https://developer.exotel.com/api-console/heart-beat" style="width: 80px;font-size: 20px;text-align: left;">Heartbeat</h1> <h1 onclick="locachange('https://developer.exotel.com/api-console/campaigns')" href="https://developer.exotel.com/api-console/campaigns" style="width: 80px;font-size: 20px;text-align: left;">Call Campaigns</h1> <h1 onclick="locachange('https://developer.exotel.com/api-console/sms-campaigns')" href="https://developer.exotel.com/api-console/sms-campaigns" style="width: 80px;font-size: 20px;text-align: left;">SMS Campaigns</h1> <h1 onclick="locachange('https://developer.exotel.com/api-console/lead-assist-greenvn')" href="https://developer.exotel.com/api-console/lead-assist-greenvn" style="width: 80px;font-size: 20px;text-align: left;">LeadAssist</h1> <h1 onclick="locachange('https://developer.exotel.com/api-console')" href="https://developer.exotel.com/api-console" style="width: 80px;font-size: 20px;text-align: left;">More...</h1> </div> </div> </div> </div> </div> <div > <div onclick="funcollapse('collapse-3')"> <a class="btn btn-default coll" data-toggle="collapse" aria-expanded="false" aria-controls="collapse-3" href="#collapse-3" role="button" style="width: 98%;text-align: left;background: rgba(255,255,255,0);font-size: 20px;border-style: none;box-shadow: none;background: transparent;;padding-left: 12px;margin-top: 10px;margin-bottom: 10px;">Applets Docs <svg xmlns="http://www.w3.org/2000/svg" id="collapse-3icond" class="icond" width="1em" height="1em" viewBox="0 0 24 24" fill="none" style="font-size: 26px;position: absolute;right: 30px;transform-origin: 50% 50% rotate(90);"> <path d="M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z" fill="currentColor"></path> </svg> <svg xmlns="http://www.w3.org/2000/svg" id="collapse-3iconu" class="rotateimg180 iconu" width="1em" height="1em" viewBox="0 0 24 24" fill="none" style="display:none;font-size: 26px;position: absolute;right: 30px;transform-origin: 50% 50% rotate(90);"> <path d="M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z" fill="currentColor"></path> </svg> </a> </div> <div class="collapse coll-in" id="collapse-3"> <div class="container" style="padding-right: 0px;padding-left: 0px;"> <div> <div class="col-md-12" style="display: flex;flex-direction: column;flex-wrap: wrap;height: 308.156px;background: rgba(0,152,255,0.19);border-radius: 18px;border: 1px solid rgba(51,51,51,0.15);margin-right:10px;"> <h1 onclick="locachange('https://developer.exotel.com/applet#greeting')" href="https://developer.exotel.com/applet#greeting" style="width: 80px;font-size: 20px;text-align: left;">Greeting</h1> <h1 onclick="locachange('https://developer.exotel.com/applet#connect')" href="https://developer.exotel.com/applet#connect" style="width: 80px;font-size: 20px;text-align: left;">Connect</h1> <h1 onclick="locachange('https://developer.exotel.com/applet#passthru')" href="https://developer.exotel.com/applet#passthru" style="width: 80px;font-size: 20px;text-align: left;">Passthru</h1> <h1 onclick="locachange('hhttps://developer.exotel.com/applet#transfer')" href="hhttps://developer.exotel.com/applet#transfer" style="width: 80px;font-size: 20px;text-align: left;">Transfer</h1> <h1 onclick="locachange('https://developer.exotel.com/applet#sms')" href="https://developer.exotel.com/applet#sms" style="width: 80px;font-size: 20px;text-align: left;">SMS</h1> <h1 onclick="locachange('https://developer.exotel.com/applet#email')" href="https://developer.exotel.com/applet#email" style="width: 80px;font-size: 20px;text-align: left;">Email</h1> <h1 onclick="locachange('https://developer.exotel.com/applet')" href="https://developer.exotel.com/applet" style="width: 80px;font-size: 20px;text-align: left;">More</h1> </div> </div> </div> </div> </div> <div onclick="locachange('https://developer.exotel.com/usecases'); "> <a class="btn btn-default" role="button" style="width: 98%;text-align: left;background: rgba(255,255,255,0);font-size: 20px;border-style: none;box-shadow: none;background: transparent;padding-left: 12px;margin-top: 10px;margin-bottom: 10px;"> <span>Use Cases</span> </a> </div> <div onclick="locachange('https://developer.exotel.com/faqs'); "> <a class="btn btn-default" role="button" style="width: 98%;text-align: left;background: rgba(255,255,255,0);font-size: 20px;border-style: none;box-shadow: none;background: transparent;padding-left: 12px;margin-top: 10px;margin-bottom: 10px;"> <span>FAQs</span> </a> </div> </div> </div> </div> </div> <div class="row btp" style="text-align: center;position: fixed; bottom: 10px;width: 100%;"> <div class="col-md-3 col-xs-3 col-sm-3"> <a class="btn btn-default" role="button" target="_blank" href="https://my.exotel.com/auth/register" style="width: 200px;height: 56px;border-radius: 10px;font-size: 14px;padding: 17px 22px;padding-left: 32px;padding-right: 32px;color:rgb(255,255,255);background:#0098FF;"> Create Account</a> </div> </div> </div> </div> </div> <!-- Start: over Nav --> <!-- Start: Navigation --> <nav class="navbar navbar-default navigation-clean-button npanel" style="background: rgb(0,152,255);position:fixed;z-index:102;width:100%; border:none;padding-top: 3px;"> <div class="nav-container container"> <div class="navbar-header navicon"> <a class="navbar-brand ico" href="/" style="padding: 15px;margin-bottom: 0px;position:absolute;left:70px;top:4px"><img src="https://developer.exotel.com/wp-content/uploads/2023/04/exotel-developers-01-1.png" alt="" height="36" /></a> <button class="navbar-toggle visible-md visible-sm visible-xs collapsed text-right" onclick="openNav()" data-target="#navcol-5" style="border-style: none;text-align: right;position:absolute;right:0px;top: 2px;"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar" style="height:4px;width: 24px;background-color: #FFF;"></span> <span class="icon-bar" style="height:4px;width: 16px;background-color: #FFF;margin-left:8px;"></span> <span class="text-right icon-bar" style="height:4px;width: 10px;background-color: #FFF;margin-left:14px;"></span> </button> <button id="search_icon" onclick="openGlobalNav()" class="navbar-toggle visible-md visible-sm visible-xs collapsed text-right " data-target="#navcol-5" style="border-style: none;text-align: right; position:absolute;right:40px;top:-0px;background: transparent;"> <svg xmlns="http://www.w3.org/2000/svg" width="32.243" height="25" viewBox="0 0 32.243 32.243"> <path id="Icon_material-search" data-name="Icon material-search" d="M27.544,24.779H26.088l-.516-.5a12,12,0,1,0-1.29,1.29l.5.516v1.456L34,36.743,36.743,34Zm-11.061,0a8.3,8.3,0,1,1,8.3-8.3A8.285,8.285,0,0,1,16.483,24.779Z" transform="translate(-4.5 -4.5)" fill="#fff"/> </svg> </button> </div> <div class="collapse navbar-collapse" id="navcol-5" style="background:#0098ff;" > <ul class="nav navbar-nav hidden-md hidden-sm " style="background:#0098ff;position:relative;margin-right: 20%;margin-left:20%;padding-top:0px;margin-bottom:0px"> <!-- <li id="home" class="active" onclick="locachange('/');" style="background:#0098ff;" ><a style="background:rgb(255, 255, 255,0);"><span style="color: rgb(255, 255, 255);padding-bottom:8px">Home</span></a></li> --> <li class="dropdown navl" style="background:#0098ff;" onclick="locachange('https://developer.exotel.com/api'); "><a class="dropdown-toggle" aria-expanded="false" data-toggle="dropdown" href="https://developer.exotel.com/api" ><span style="color: rgb(255, 255, 255);;font-size: 16px;">API Docs</span></a> <ul class="dropdown-menu"> <li onclick="locachange('https://developer.exotel.com/api/make-a-call-api')"><a href="https://developer.exotel.com/api/make-a-call-api">Voice</a></li> <li onclick="locachange('https://developer.exotel.com/api/sms')"><a href="https://developer.exotel.com/api/sms">SMS</a></li> <li onclick="locachange('https://developer.exotel.com/api/exophones')"><a href="https://developer.exotel.com/api/exophones">Exophones</a></li> <li onclick="locachange('https://developer.exotel.com/api/heart-beat')"><a href="https://developer.exotel.com/api/heart-beat">Heartbeat</a></li> <li onclick="locachange('https://developer.exotel.com/api/campaigns')"><a href="https://developer.exotel.com/api/campaigns">Call Campaigns</a></li> <li onclick="locachange('https://developer.exotel.com/api/sms-campaigns')"><a href="https://developer.exotel.com/api/sms-campaigns">SMS Campaigns</a></li> <li onclick="locachange('https://developer.exotel.com/api/leadassist-greenvn')"><a href="https://developer.exotel.com/api/leadassist-greenvn">Lead Assist</a></li> <li onclick="locachange('https://developer.exotel.com/api/users')"><a href="https://developer.exotel.com/api/users">Users</a></li> <li onclick="locachange('https://developer.exotel.com/api/product-exoverify-apis')"><a href="https://developer.exotel.com/api/product-exoverify-apis">ExoVerify</a></li> <li onclick="locachange('https://developer.exotel.com/api/whatsapp')"><a href="https://developer.exotel.com/api/whatsapp">Whatsapp </a></li> <li onclick="locachange('https://developer.exotel.com/api/url-shortening')"><a href="https://developer.exotel.com/api/url-shortening">URL shortening</a></li> <li onclick="locachange('https://developer.exotel.com/api')"><a href="https://developer.exotel.com/api">More...</a></li> </ul> </li> <li class="dropdown navl" style="background:#0098ff;" onclick="locachange('https://developer.exotel.com/api-console'); "><a class="dropdown-toggle" aria-expanded="false" data-toggle="dropdown" href="https://developer.exotel.com/api-console" ><span style="color: rgb(255, 255, 255);;font-size: 16px;">API Console</span></a> <ul class="dropdown-menu"> <li onclick="locachange('https://developer.exotel.com/api-console/make-a-call-api')"><a href="https://developer.exotel.com/api-console/make-a-call-api">Voice</a></li> <li onclick="locachange('https://developer.exotel.com/api-console/product-sms')"><a href="https://developer.exotel.com/api-console/product-sms">SMS</a></li> <li onclick="locachange('https://developer.exotel.com/api-console/exophone')"><a href="https://developer.exotel.com/api-console/exophone">Exophones</a></li> <li onclick="locachange('https://developer.exotel.com/api-console/heart-beat')"><a href="https://developer.exotel.com/api-console/heart-beat">Heartbeat</a></li> <li onclick="locachange('https://developer.exotel.com/api-console/campaigns')"><a href="https://developer.exotel.com/api-console/campaigns">Call Campaigns</a></li> <li onclick="locachange('https://developer.exotel.com/api-console/sms-campaigns')"><a href="https://developer.exotel.com/api-console/sms-campaigns">SMS Campaigns</a></li> <li onclick="locachange('https://developer.exotel.com/api-console/lead-assist-greenvn')"><a href="https://developer.exotel.com/api-console/lead-assist-greenvn">LeadAssist</a></li> <li onclick="locachange('https://developer.exotel.com/api-console')"><a href="https://developer.exotel.com/api-console">More...</a></li> </ul> </li> <li class="dropdown navl" style="background:#0098ff;" onclick="locachange('https://developer.exotel.com/applet'); "><a class="dropdown-toggle" aria-expanded="false" data-toggle="dropdown" href="https://developer.exotel.com/applet" ><span style="color: rgb(255, 255, 255);;font-size: 16px;">Applets Docs</span></a> <ul class="dropdown-menu"> <li onclick="locachange('https://developer.exotel.com/applet#greeting')"><a href="https://developer.exotel.com/applet#greeting">Greeting</a></li> <li onclick="locachange('https://developer.exotel.com/applet#connect')"><a href="https://developer.exotel.com/applet#connect">Connect</a></li> <li onclick="locachange('https://developer.exotel.com/applet#passthru')"><a href="https://developer.exotel.com/applet#passthru">Passthru</a></li> <li onclick="locachange('hhttps://developer.exotel.com/applet#transfer')"><a href="hhttps://developer.exotel.com/applet#transfer">Transfer</a></li> <li onclick="locachange('https://developer.exotel.com/applet#sms')"><a href="https://developer.exotel.com/applet#sms">SMS</a></li> <li onclick="locachange('https://developer.exotel.com/applet#email')"><a href="https://developer.exotel.com/applet#email">Email</a></li> <li onclick="locachange('https://developer.exotel.com/applet')"><a href="https://developer.exotel.com/applet">More</a></li> </ul> </li> <li class="dropdown navl" style="background:#0098ff;" onclick="locachange('https://developer.exotel.com/usecases'); "><a class="dropdown-toggle" aria-expanded="false" data-toggle="dropdown" href="https://developer.exotel.com/usecases" ><span style="color: rgb(255, 255, 255);;font-size: 16px;">Use Cases</span></a> </li> <li class="dropdown navl" style="background:#0098ff;" onclick="locachange('https://developer.exotel.com/faqs'); "><a class="dropdown-toggle" aria-expanded="false" data-toggle="dropdown" href="https://developer.exotel.com/faqs" ><span style="color: rgb(255, 255, 255);;font-size: 16px;">FAQs</span></a> </li> </ul><!-- Start: Actions --> <button id="search_icon2" onclick="openGlobalNav()" class="visible-lg collapsed text-right " data-target="#navcol-5" style="border-style: none;text-align: right; position:absolute;right: 310px;top: 25px; background-color: transparent !important;opacity:1; "> <svg xmlns="http://www.w3.org/2000/svg" width="32.243" height="25" viewBox="0 0 32.243 32.243"> <path id="Icon_material-search" data-name="Icon material-search" d="M27.544,24.779H26.088l-.516-.5a12,12,0,1,0-1.29,1.29l.5.516v1.456L34,36.743,36.743,34Zm-11.061,0a8.3,8.3,0,1,1,8.3-8.3A8.285,8.285,0,0,1,16.483,24.779Z" transform="translate(-4.5 -4.5)" fill="#fff"/> </svg> </button> <p class="navbar-text navbar-right hidden-md hidden-sm actions" style="position: absolute;right: 100px;top:10px;"> <a class="btn btn-default action-button" target="_blank" role="button" href="https://my.exotel.com/auth/register" style="width: 200px;border-radius: 8px;font-size: 16px;padding: 10px 22px;color: #0098FF;background: rgb(255,255,255);font-weight:600;">Create Account</a> </p> <!-- End: Actions --> </div> </div> </nav><!-- End: Navigation --> <div id="myGlobalSearchNav" class="searchoverlay"> <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a> <div class="searchoverlay-content"> <form data-sf-form-id='6277' data-is-rtl='0' data-maintain-state='' data-ajax-url='https://developer.exotel.com/?sfid=6277&amp;sf_action=get_data&amp;sf_data=all' data-ajax-form-url='https://developer.exotel.com/?sfid=6277&amp;sf_action=get_data&amp;sf_data=form' data-display-result-method='shortcode' data-use-history-api='1' data-template-loaded='0' data-lang-code='en' data-ajax='1' data-ajax-data-type='json' data-ajax-links-selector='.pagination a' data-ajax-target='#search-filter-results-6277' data-ajax-pagination-type='normal' data-scroll-to-pos='0' data-init-paged='1' data-auto-update='1' data-auto-count='1' data-auto-count-refresh-mode='1' action='' method='post' class='searchandfilter' id='search-filter-form-6277' autocomplete='off' data-instance-count='1'><ul><li class="sf-field-search" data-sf-field-name="search" data-sf-field-type="search" data-sf-field-input-type=""> <label><span class="screen-reader-text">global-search</span><input placeholder="Seach Exotel documentation... try &quot;Send SMS&quot;" name="_sf_search[]" class="sf-input-text" type="text" value="" title="global-search"></label> </li></ul></form> <div id="search-result-global"> <div id="search-recent-global" class="search-container container dropdown-s gbl-spc" style="border-top: 2px solid #d3d3d382;display:none;padding-bottom:18px;padding: 0rem 1rem 0rem 1rem; border-color:1px solid #C1CDDC; border-top: none;box-shadow: 0px 3px 16px #0098FF29;"> <div style="background-color:#fff;margin-top:10px;text-align: left;padding: 0rem 1rem 0rem 1rem;"> <p>Recent search</p> </div> <div class="search-selection" style="background-color:#fff;text-align: left;width:100%;margin-bottom: 12px;padding: 1rem;" onclick="memo('3696','https://developer.exotel.com/api/make-a-call-api')"> <div style="display: flex;justify-content: space-between;"> <p class="shr-title">Product-Voice v1</p> </div> <p class="shr-descr" style="height:15px;"> </p> </div> <div style="background-color:#fff;display: flex;justify-content: center;"> <p> <a id="viewMore" style="text-align:center;font-size:18px; color: #0098FF; font-weight: bold;margin-bottom:5px;">Advanced Search</a> </p> </div> </div> <div id="search-found-result" style="display:none;"> <div class="search-filter-results" id="search-filter-results-6277"><style> .box-result { background: #D6E4F078; width: 100%; margin: auto; padding: 2rem; } .sf-field-search label input { display: block; max-width: 640px !important; margin: auto; height: 4rem; border-radius: 2px 2px 0px 0px !important; text-align:left !important; padding-left: 2rem; border-bottom: none; } .dropdown-s{ background-color:#fff; display:block; z-index:100; overflow-y: scroll; max-height: 42rem; margin-top: -14px; margin-left: 15px; width: 640px; position: absolute; left: 0; right: 0; margin: 0 auto; } .src-spc{ margin-top: -24px !important; } .search-selection:hover{ background-color: #b9d5ff29 !important; } @media (max-width:769px) { .dropdown-s{ width: 100%; margin: auto; position: relative; } } @media only screen and (max-width: 600px) { .src-spc{ margin-top: -24px !important; } } input[type=text]:focus { outline: 1px solid #0098FF !important; border: 1px solid #0098FF; border-top: none; border-bottom: none; box-shadow: 0px 3px 16px #0098FF29; } input[type=text]{ box-shadow: 0px 3px 16px #0098FF29; border: 1px solid #0098FF; } </style> <div> <div id="dy_search" class="search-container container dropdown-s src-spc" style="border-top: 2px solid #d3d3d382;padding-bottom:18px;border-top:none;border: 1px solid #0098FF !important; box-shadow: 0px 3px 16px #0098FF29;"> <div style="background-color:#fff;margin-top:10px;padding: 0rem 0.5rem;text-align: left;"> <p> 233 results found</p> </div> <div class="context firstFAQ search-selection" onclick="memo('7949','https://developer.exotel.com/api/rcs-send-rcs-template-message');" style="background-color:#fff;text-align: left;cursor:pointer;padding: 5px;"> <div style="display: flex;justify-content: space-between;margin:0px; "> <p class="shr-title"> Send RCS Template Message </p> <p style="background:#96A5B8;color:#FFFFFF;padding: 2px 4px;border-radius:5px;margin-right: 10px;height: 2.6rem;"> API </p> </div> <p class="shr-descr" style="height:15px;"> </p> </div> <div class="context firstFAQ search-selection" onclick="memo('7900','https://developer.exotel.com/api/receive-outbound-call-notifications');" style="background-color:#fff;text-align: left;cursor:pointer;padding: 5px;"> <div style="display: flex;justify-content: space-between;margin:0px; "> <p class="shr-title"> Receive Outbound Call Notifications </p> <p style="background:#96A5B8;color:#FFFFFF;padding: 2px 4px;border-radius:5px;margin-right: 10px;height: 2.6rem;"> API </p> </div> <p class="shr-descr" style="height:15px;"> </p> </div> <div class="context firstFAQ search-selection" onclick="memo('7871','https://developer.exotel.com/api/error-code');" style="background-color:#fff;text-align: left;cursor:pointer;padding: 5px;"> <div style="display: flex;justify-content: space-between;margin:0px; "> <p class="shr-title"> WhatsApp Error Code </p> <p style="background:#96A5B8;color:#FFFFFF;padding: 2px 4px;border-radius:5px;margin-right: 10px;height: 2.6rem;"> API </p> </div> <p class="shr-descr" style="height:15px;"> </p> </div> <div class="context firstFAQ search-selection" onclick="memo('6935','https://developer.exotel.com/api/send-sms-2');" style="background-color:#fff;text-align: left;cursor:pointer;padding: 5px;"> <div style="display: flex;justify-content: space-between;margin:0px; "> <p class="shr-title"> Send SMS </p> <p style="background:#96A5B8;color:#FFFFFF;padding: 2px 4px;border-radius:5px;margin-right: 10px;height: 2.6rem;"> API </p> </div> <p class="shr-descr" style="height:15px;"> </p> </div> <div class="context firstFAQ search-selection" onclick="memo('7735','https://developer.exotel.com/api/exomind-tasker-api');" style="background-color:#fff;text-align: left;cursor:pointer;padding: 5px;"> <div style="display: flex;justify-content: space-between;margin:0px; "> <p class="shr-title"> ExoMind Tasker API </p> <p style="background:#96A5B8;color:#FFFFFF;padding: 2px 4px;border-radius:5px;margin-right: 10px;height: 2.6rem;"> API </p> </div> <p class="shr-descr" style="height:15px;"> </p> </div> <div class="context firstFAQ" onclick="" style="background-color:#fff;display: flex;justify-content: center;"> <p> <a id="viewMore1" style="text-align:center;font-size:16px;color: #0098FF;font-weight: bold;margin-bottom:5px;">Advanced Search</a> </p> </div> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script> var markInstance = new Mark(document.querySelector(".search-filter-results")); // Cache DOM elements var data=[]; var keywordInput = document.querySelector("input[name='_sf_search[]']"); if(window.localStorage.getItem("hist")!==null){ data=JSON.parse(window.localStorage.getItem("hist")); } function memo(a,redirectUrl){ if(data.includes(a)){ let x=data.indexOf(a); data.splice(x, 1); } data=[a,...data] console.log(data); if(data.length>5){data.pop()} window.localStorage.setItem("hist",JSON.stringify(data)); data=JSON.parse(JSON.stringify(data)); console.log(data); var d = new Date(); d.setTime(d.getTime() + (1*24*60*60*1000)); var expires = "expires="+ d.toUTCString(); document.cookie = 'cook' + "=" + cook+ ";" + expires + ";path=/"; console.log('exop' + redirectUrl); window.location=redirectUrl; } var cook = localStorage.getItem("hist"); console.log(cook); var d = new Date(); d.setTime(d.getTime() + (1*24*60*60*1000)); var expires = "expires="+ d.toUTCString(); document.cookie = 'cook' + "=" + cook+ ";" + expires + ";path=/"; function performMark() { // Read the keyword var keyword = keywordInput.value; // Remove previous marked elements and mark // the new keyword inside the context if(keyword.length>1) { markInstance.unmark({ done: function() { markInstance.mark(keyword); } }); } }; (function ( $ ) { "use strict"; $(document).on("sf:ajaxstart", ".searchandfilter", function(){ console.log("ajax start"); $("#search-recent-global").css("display", "none"); }); $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax complete"); var keyword = keywordInput.value; if(keyword.length>0) { $("#search-found-result").css("display", ""); } else{ $("#search-recent-global").css("display", ""); $("#search-found-result").css("display", "none"); } //so load your lightbox or JS scripts here again }); }(jQuery)); function ser_recent(){ var keyword = keywordInput.value; if(keyword.length===0) { $('#search-recent-global').fadeIn("slow"); $("#search-recent-global").css("display", "block"); } if(keyword.length>=1) { $('#search-found-result').fadeIn("slow"); $("#search-found-result").css("display", "block"); } } // document.querySelector('#search-filter-form-6277').addEventListener("focusin", // function(){ // console.log('sdsd'); // ser_recent() // } // ); // document.querySelector('#search-filter-form-6277').addEventListener('focusout', function(event) { // console.log(event) // // $("#search-found-result").css("display", "none"); // // // console.log('sdsd') // // if(event.relatedTarget==null){ // // $("#search-recent-global").css("display", "none"); // // } // }); window.addEventListener('click', function(e){ if (document.getElementById('search-filter-form-6277').contains(e.target)){ ser_recent(); } }); keywordInput.addEventListener("input", performMark); a = document.getElementById('viewMore'); a.setAttribute("href", "https://developer.exotel.com/advance-search?_sf_s="+keywordInput.value); a = document.getElementById('viewMore1'); a.setAttribute("href", "https://developer.exotel.com/advance-search?_sf_s="+keywordInput.value); setTimeout(function() { performMark(); }, 1000); </script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> </div> </div> </div> </div> </div> </div> <script> function locachange(a){ window.location.href=a; } let pageurl= window.location.href; if(document.querySelectorAll([".navbar-nav a[href='" + pageurl + "'"])[0]){ document.querySelectorAll([".navbar-nav a[href='" + pageurl + "'"])[0].classList.add('currentMenu') } function openNavser() { //document.getElementById("myNavSer").style.display = "block"; let pageurl= window.location.href; window.location.href=pageurl+'advance-search'; } function closeNavser() { document.getElementById("myNavSer").style.display = "none"; } function openNav() { document.getElementById("myNav").style.display = "block"; } function openGlobalNav() { document.getElementById("myGlobalSearchNav").style.height = "75%"; document.getElementById("search_icon2").style.display = "none"; $('#search_icon2').css("opacity","0"); setTimeout(function() { $('#search-recent-global').fadeIn("slow"); $("#search-recent-global").css("display", ""); $("input[name='_sf_search[]']").focus() }, 500); } function closeNav() { document.getElementById("myGlobalSearchNav").style.height = "0%"; document.getElementById("myNav").style.display = "none"; $("#search-recent-global").css("display", "none"); $('#search_icon2').css("opacity","1"); } </script> <meta name='robots' content='max-image-preview:large' /> <link rel='dns-prefetch' href='//fonts.googleapis.com' /> <link rel='dns-prefetch' href='//s.w.org' /> <link rel='dns-prefetch' href='//www.googletagmanager.com' /> <script type='text/javascript' src='https://developer.exotel.com/wp-includes/js/wp-embed.min.js?ver=5.8.10' id='wp-embed-js'></script> <link rel="https://api.w.org/" href="https://developer.exotel.com/wp-json/" /><link rel="alternate" type="application/json" href="https://developer.exotel.com/wp-json/wp/v2/pages/3696" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://developer.exotel.com/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://developer.exotel.com/wp-includes/wlwmanifest.xml" /> <meta name="generator" content="WordPress 5.8.10" /> <link rel="canonical" href="https://developer.exotel.com/api/make-a-call-api" /> <link rel='shortlink' href='https://developer.exotel.com/?p=3696' /> <link rel="alternate" type="application/json+oembed" href="https://developer.exotel.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fdeveloper.exotel.com%2Fapi%2Fmake-a-call-api" /> <link rel="alternate" type="text/xml+oembed" href="https://developer.exotel.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fdeveloper.exotel.com%2Fapi%2Fmake-a-call-api&#038;format=xml" /> <meta name="generator" content="Site Kit by Google 1.68.0" /><style></style> <!-- Google Tag Manager snippet added by Site Kit --> <script type="text/javascript"> ( function( w, d, s, l, i ) { w[l] = w[l] || []; w[l].push( {'gtm.start': new Date().getTime(), event: 'gtm.js'} ); var f = d.getElementsByTagName( s )[0], j = d.createElement( s ), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore( j, f ); } )( window, document, 'script', 'dataLayer', 'GTM-TSLF3FD' ); </script> <!-- End Google Tag Manager snippet added by Site Kit --> <link rel="icon" href="https://developer.exotel.com/wp-content/uploads/2023/04/cropped-white-bg-X-01-1-32x32.png" sizes="32x32" /> <link rel="icon" href="https://developer.exotel.com/wp-content/uploads/2023/04/cropped-white-bg-X-01-1-192x192.png" sizes="192x192" /> <link rel="apple-touch-icon" href="https://developer.exotel.com/wp-content/uploads/2023/04/cropped-white-bg-X-01-1-180x180.png" /> <meta name="msapplication-TileImage" content="https://developer.exotel.com/wp-content/uploads/2023/04/cropped-white-bg-X-01-1-270x270.png" /> <div class="container row"> <div class="col-md-4 col-sm-3 sidebar add-ps-scrollbar"> <div class="search product-search"> <div class="col-lg-12"> <label>Please choose your relevant Products </label> <select id="docSelect" class="form-control product-select" name="item"> <option class="doc-list-heading noSelect" data-url="/api" value="/api"> Overview </option> <option class="doc-list-heading noSelect" data-url="/api/product-voice-version-3" value="/api/product-voice-version-3"> Voice v3 </option> <option class="doc-list-heading noSelect" data-url="/api/ccm-calls" value="/api/ccm-calls"> Voice v2 </option> <option class="doc-list-heading noSelect" data-url="/api/make-a-call-api" value="/api/make-a-call-api"> Voice v1 </option> <option class="doc-list-heading noSelect" data-url="/api/gen-ai" value="/api/gen-ai"> Gen AI </option> <option class="doc-list-heading noSelect" data-url="/api/sms" value="/api/sms"> SMS </option> <option class="doc-list-heading noSelect" data-url="/api/exophones" value="/api/exophones"> ExoPhones </option> <option class="doc-list-heading noSelect" data-url="/api/heart-beat" value="/api/heart-beat"> Heartbeat </option> <option class="doc-list-heading noSelect" data-url="/api/campaigns" value="/api/campaigns"> Campaigns </option> <option class="doc-list-heading noSelect" data-url="/api/sms-campaigns" value="/api/sms-campaigns"> SMS Campaigns </option> <option class="doc-list-heading noSelect" data-url="/api/campaigns-contacts" value="/api/campaigns-contacts"> Campaigns Contacts </option> <option class="doc-list-heading noSelect" data-url="/api/campaigns-lists" value="/api/campaigns-lists"> Campaigns - Lists </option> <option class="doc-list-heading noSelect" data-url="/api/leadassist-greenvn" value="/api/leadassist-greenvn"> ExoBridge (Lead Assist) - GreenVN </option> <option class="doc-list-heading noSelect" data-url="/api/leadassist-greenpin" value="/api/leadassist-greenpin"> ExoBridge (Lead Assist) - GreenPin </option> <option class="doc-list-heading noSelect" data-url="/api/lead-assist-settings" value="/api/lead-assist-settings"> ExoBridge (Lead Assist) - Settings </option> <option class="doc-list-heading noSelect" data-url="/api/users" value="/api/users"> Users </option> <option class="doc-list-heading noSelect" data-url="/api/product-exoverify-apis" value="/api/product-exoverify-apis"> ExoVerify </option> <option class="doc-list-heading noSelect" data-url="/api/url-shortening" value="/api/url-shortening"> URL Shortening </option> <option class="doc-list-heading noSelect" data-url="/api/whatsapp " value="/api/whatsapp "> WhatsApp- Messaging API </option> <option class="doc-list-heading noSelect" data-url="/api/whatsapp-template-management-apis" value="/api/whatsapp-template-management-apis"> WhatsApp - Template Management APIs </option> <option class="doc-list-heading noSelect" data-url="/api/ip-pstn-intermix-webrtc-sdk-integration" value="/api/ip-pstn-intermix-webrtc-sdk-integration"> IP-PSTN intermix: WebRTC SDK integration </option> <option class="doc-list-heading noSelect" data-url="/api/whatsapp-onboarding-apis" value="/api/whatsapp-onboarding-apis"> WhatsApp - Onboarding APIs </option> </select> </div> <div class="collpase in"> <div class="sidemenu"> <li id="item1"> <div class="collpase in list-heading"> <ul class="list-item"> <li class="noSelect" id="menu-options"> <a href="#call-agent" class="applet-sidebar-menu-section" > Outgoing call to connect two numbers </a> </li> <li class="noSelect" id="menu-options"> <a href="#call-customer" class="applet-sidebar-menu-section" > Outgoing call to connect number to a call flow </a> </li> <li class="noSelect" id="menu-options"> <a href="#incoming-call" class="applet-sidebar-menu-section" > Incoming call </a> </li> <li class="noSelect" id="menu-options"> <a href="#bulk-call-details" class="applet-sidebar-menu-section" > Bulk Call details </a> <sup class="beta-sup">Beta</sup> </li> <li class="noSelect" id="menu-options"> <a href="#metadata-phone" class="applet-sidebar-menu-section" > Number metadata </a> </li> <li class="noSelect" id="menu-options"> <a href="#call-details" class="applet-sidebar-menu-section" > Call details </a> </li> <li class="noSelect" id="menu-options"> <a href="#statuscallback" class="applet-sidebar-menu-section" > StatusCallback </a> </li> </ul> </div> </li> </div> </div> </div> </div> </div> <div class="row"> <div class="content col-md-7 col-md-offset-4 col-sm-9 col-sm-offset-3"> <section class="sectionAPIClass" id="call-agent"> <h1 >Outgoing call to connect two numbers </h1> <div class="alert alert-info" role="alert"> <p>Voice v1 APIs work without any user (call centre agent) context, i.e. they don&#8217;t need a user to be added to the Exotel dashboard  and therefore don&#8217;t check a user number for busy status before calling that number.</p> </div> <div class="wrapper-list"> <p>This API will connect two numbers. It connects <b>From</b> Number first. Once the person at the <b>From</b> end picks up the phone, it will connect to the number provided as <b>To</b>. You can choose which number should be connected first by adding that number in the <b>From</b> field. An HTTP POST request is made to</p> </div> <div class="well api-well"> <div class="col-sm"> <span class="post">POST</span> </div> <div class="col-sm" style="margin: auto 10px;"> <p class="copy-text"> <span>https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/connect</span> </p> </div> <div class="col-sm"> <li> <a type="button" id="apidocTrynowbtn" onclick="openConsolePage(event,'https://developer.exotel.com/api-console/make-a-call-api#call-agent')" href="https://developer.exotel.com/api-console/make-a-call-api#call-agent" class="api-try btn-block show" >Try it</a> </li> <!-- <input class="api-try btn-block <?php// echo esc_html($tryvalue); ?>" onclick="openConsolePage(event,'<?php// echo $tryProductUrl?>')" type="button" value="Try it"> --> </div> </div> <div class="alert alert-info" role="alert"> <p>If you&#8217;d prefer response in JSON format, just append .json at the end of the HTTP POST request.</p> </div> <div class="wrapper-list"> <p>Replace <code>&lt;your_api_key&gt;</code> and <code>&lt;your_api_token&gt;</code> with the API key and token created by you.</p> <ul> <li>Replace <code>&lt;your_sid&gt;</code> with your “Account sid”</li> <li>Replace <code>&lt;subdomain&gt;</code> with the region of your account<br /> <ol class="ol1"> <li class="li1">&lt;subdomain&gt; of Singapore cluster is @api.exotel.com</li> <li class="li1">&lt;subdomain&gt; of Mumbai cluster is @api.in.exotel.com</li> </ol> </li> </ul> <p class="p1"><code>&lt;your_api_key&gt;</code> , <code>&lt;your_api_token&gt;</code> and <code>&lt;your_sid&gt;</code> are available in the API settings page of your <a href="https://my.exotel.com/apisettings/site#api-credentials"><span class="s2">Exotel Dashboard</span></a></p> <p class="p1">The following are the POST parameters sent as form-data in the Body of the Request:</p> </div> <div class="wrapper-list"> <table class="table table-hover table-responsive table-bordered" style="width: 101.799%; height: 2487px;"> <tbody> <tr style="height: 48px;"> <td style="width: 37.8213%; height: 48px;">Parameter Name</td> <td style="width: 12.4591%; height: 48px;">Mandatory / Optional</td> <td style="width: 50.5065%; height: 48px;">Value</td> </tr> <tr style="height: 96px;"> <td style="width: 37.8213%; height: 96px;">From</td> <td style="width: 12.4591%; height: 96px;">Mandatory</td> <td style="width: 50.5065%; height: 96px;">String; The phone number that will be called first. Preferably in <a href="https://en.wikipedia.org/wiki/E.164">E.164 format</a>. If not set, our system will try to match it with a country and make a call. If landline number, prefix it with STD code; Ex: 080XXXX2400</td> </tr> <tr style="height: 48px;"> <td style="width: 37.8213%; height: 48px;">To</td> <td style="width: 12.4591%; height: 48px;">Mandatory</td> <td style="width: 50.5065%; height: 48px;">String; Your customer's phone number. If landline number, prefix it with STD code; Ex: 080XXXX2400</td> </tr> <tr style="height: 48px;"> <td style="width: 37.8213%; height: 48px;">CallerId</td> <td style="width: 12.4591%; height: 48px;">Mandatory</td> <td style="width: 50.5065%; height: 48px;">String; This is your ExoPhone/Exotel <a href="https://exotel.com/virtual-phone-number/">Virtual Number</a> (pick one from <a href="https://my.exotel.com/numbers">here</a>)</td> </tr> <tr style="height: 24px;"> <td style="width: 37.8213%; height: 24px;">CallType</td> <td style="width: 12.4591%; height: 24px;">Optional</td> <td style="width: 50.5065%; height: 24px;">String; trans - for Transactional Calls</td> </tr> <tr style="height: 72px;"> <td style="width: 37.8213%; height: 72px;">TimeLimit</td> <td style="width: 12.4591%; height: 72px;">Optional</td> <td style="width: 50.5065%; height: 72px;">Integer; The time limit (in seconds) that you want this call to last. The call will be cut after this time (max. 14400 i.e. 4 hours)</td> </tr> <tr style="height: 48px;"> <td style="width: 37.8213%; height: 48px;">TimeOut</td> <td style="width: 12.4591%; height: 48px;">Optional</td> <td style="width: 50.5065%; height: 48px;">Integer; The time (in seconds) to ring the called parties (both first and second call leg)</td> </tr> <tr style="height: 624px;"> <td style="width: 37.8213%; height: 626px;">WaitUrl</td> <td style="width: 12.4591%; height: 626px;">Optional</td> <td style="width: 50.5065%; height: 626px;"> <p>String; Play this audio to the caller. When the first leg (From) has to wait for the other leg (To) to pick up the call, the audio file specified in this parameter will be played.</p> <p>Please refer this <a href="https://support.exotel.com/support/solutions/articles/48285-greeting-using-dynamic-text-or-audio-from-url">article</a> to understand the format specifications of the audio file to be played (wav is only supported).</p> <p>Guidelines on usage:</p> <ul> <li>The audio file size is recommended to be less than 2MB. Please note, Exotel will cache the wav file. During the first few call attempts of setting this parameter, user might hear normal ringing tone for first 5 seconds (for a ~2MB file). This is only temporary for initial few calls and once the audio file is cached, audio will be played out smoothly.</li> <li>In case you decide to change the audio file later, the WaitUrl should be different (as Exotel will cache audio file based on URL). You can do so by hosting the audio file with a different name.</li> <li>When using this parameter, it is recommended to set the TimeOut parameter as well.</li> </ul> <p>Example: "http://{your_hosted_endpoint}/{audio file name}.wav"</p> </td> </tr> <tr style="height: 168px;"> <td style="width: 37.8213%; height: 168px;">Record</td> <td style="width: 12.4591%; height: 168px;">Optional</td> <td style="width: 50.5065%; height: 168px;"> <p>Boolean; Record the conversation of your call. The RecordingUrl will be sent to the StatusCallback URL if this is set to 'true' and the call conversation happens. Can be:</p> <ul> <li>true - Call conversation will be recorded.</li> <li>false (default) - Call conversation will not be recorded.</li> </ul> <p>Note:- If this optional parameter is not passed then by default, calls will NOT be recorded. </p> </td> </tr> <tr style="height: 216px;"> <td style="width: 37.8213%; height: 216px;">RecordingChannels</td> <td style="width: 12.4591%; height: 216px;">Optional</td> <td style="width: 50.5065%; height: 216px;"> <p>String; Number of audio channels to be present in the final recording. This parameter works if <code>Record</code> is set to 'true'. Can be:</p> <ul> <li>single (default) - Record both legs of the call in a single channel of the recording file.</li> <li>dual - Record the caller and the callee into separate channels of the recording file.</li> </ul> </td> </tr> <tr style="height: 144px;"> <td style="width: 37.8213%; height: 144px;">RecordingFormat</td> <td style="width: 12.4591%; height: 144px;">Optional</td> <td style="width: 50.5065%; height: 144px;"> <p>String; Quality of the audio recording. This parameter works if <code>Record</code> is set to 'true'. Can be:</p> <ul> <li>mp3 (default) - Standard bitrate recording</li> <li>mp3-hq - Higher bitrate (32 kbps/channel )recording.</li> </ul> <p>Note:- mp3-hq option is an on-demand feature. Please reach out to <a class="css-tgpl01" title="mailto:hello@exotel.com" href="mailto:hello@exotel.com" data-renderer-mark="true"><u data-renderer-mark="true">hello@exotel.com</u></a> or your account manager to get it enabled for your account before using this option.</p> </td> </tr> <tr style="height: 101px;"> <td style="width: 37.8213%; height: 101px;">CustomField</td> <td style="width: 12.4591%; height: 101px;">Optional</td> <td style="width: 50.5065%; height: 101px;"> <p>Any application specific value like order id that will be passed back as a parameter in <a href="https://developer.exotel.com/api/#call-statuscallback">StatusCallback</a> (only via 'terminal' StatusCallbackEvent)</p> </td> </tr> <tr style="height: 216px;"> <td style="width: 37.8213%; height: 216px;"><span style="font-weight: 400;">StartPlaybackTo<sup>New</sup></span></td> <td style="width: 12.4591%; height: 216px;">Optional</td> <td style="width: 50.5065%; height: 216px;"> <p>String; <span style="font-weight: 400;">The party that should listen the playback at the start of the call. Audio to be listened by agent or both customer and agent just before the call gets connected.</span> Can be:</p> <ul> <li>Callee (default) - Playback audio will be played to callee only.</li> <li>Both - Playback audio will be played to both caller and callee.</li> </ul> </td> </tr> <tr style="height: 80px;"> <td style="width: 37.8213%; height: 80px;"><span style="font-weight: 400;">StartPlaybackValue<sup>New</sup></span></td> <td style="width: 12.4591%; height: 80px;">Optional</td> <td style="width: 50.5065%; height: 80px;"> <p>String; URL for the audio to be played just before the call gets connected.</p> <div data-identifyelement="507">Configuration for audio file supported in this playback are:</div> <p data-identifyelement="520">Sample Rate = 8 kHz<br /> Bit depth = 16 bit<br /> Bit rate = 128 kbps<br /> Channel = mono<br /> File Format = wav</p> </td> </tr> <tr style="height: 96px;"> <td style="width: 37.8213%; height: 96px;">StatusCallback</td> <td style="width: 12.4591%; height: 96px;">Optional</td> <td style="width: 50.5065%; height: 96px;">String; An HTTP POST request will be made to this URL depending on what events are subscribed using ‘StatusCallbackEvents’. Refer <a href="https://developer.exotel.com/api/make-a-call-api#statuscallback">here</a> for complete list of parameters which will be sent to your endpoint.</td> </tr> <tr style="height: 232px;"> <td style="width: 37.8213%; height: 232px;">StatusCallbackEvents<sup> New</sup></td> <td style="width: 12.4591%; height: 232px;">Optional</td> <td style="width: 50.5065%; height: 232px;"> <p>Array; Call events for which we will send details to the URL as set in ‘StatusCallback’ parameter. Can be:</p> <ul> <li>terminal - This event will be triggered once the call is terminated (with or without being answered). </li> <li>answered - This event will be triggered when each leg of the call is answered. One for the caller and one for the callee.</li> </ul> <p>If no event is specified, we will send the default parameters as specified <a href="https://developer.exotel.com/api/make-a-call-api#statuscallback">here</a>. Currently, only ‘terminal’ and ‘answered’ event is supported but more events could be added in future.</p> </td> </tr> <tr style="height: 168px;"> <td style="width: 37.8213%; height: 168px;">StatusCallbackContentType<sup> New</sup></td> <td style="width: 12.4591%; height: 168px;">Optional</td> <td style="width: 50.5065%; height: 168px;"> <p>String; The HTTP header ‘Content-Type’ using which the StatusCallback webhook will be triggered to your URL. Can be:</p> <ul> <li>multipart/form-data (default)</li> <li>application/json</li> </ul> </td> </tr> </tbody> </table> </div> <div class="alert alert-info" role="alert"> <p>If you would like to use streaming via this API, please contact hello@exotel.in</p> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Request</li> <li role="presentation" class="active"><a href="#callagent-1-8-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">cURL</a></li> <li role="presentation" class=""><a href="#callagent-1-8-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">NodeJS</a></li> <li role="presentation" class=""><a href="#callagent-1-8-3" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">PHP</a></li> <li role="presentation" class=""><a href="#callagent-1-8-4" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">Python</a></li> <li role="presentation" class=""><a href="#callagent-1-8-5" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">Ruby</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-1-8-1"> <pre class="prettyprint lang-bsh" class="prettyprint lang-bsh prettyprinted">curl --location --request POST 'https://api.exotel.com/v1/Accounts/&lt;account_sid&gt;/Calls/connect' \ --header 'Authorization: Basic &lt;Base64_Encoded_APIKey:APIToken&gt;' \ --form 'From="+91XXXXXXXXXX"' \ --form 'To="+91XXXXXXXXXX"' \ --form 'CallerId="XXXXXXXXXX"' \ --form 'StatusCallback="https://yourstatuscallbackurl.com"' \ --form 'StatusCallbackContentType="application/json"' \ --form 'StatusCallbackEvents[0]="terminal"' \ --form 'Record="true"' \ --form 'StatusCallbackEvents[1]="answered"' </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-1-8-2"> <pre class="prettyprint" class="prettyprint prettyprinted"><span class="kwd">var</span><span class="pln"> request </span><span class="pun">=</span> <span class="kwd">require</span><span class="pun">(</span><span class="str">'request'</span><span class="pun">); </span> <span class="kwd">var</span><span class="pln"> dataString </span><span class="pun">=</span> <span class="str">'From=XXXXX30240&amp;To=XXXXX40682&amp;CallerId=0XXXXXX4890'</span><span class="pun">;</span> <span class="kwd"> var</span><span class="pln"> options </span><span class="pun">=</span> <span class="pun">{</span><span class="pln"> url</span><span class="pun">:</span> <span class="str">'https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/connect'</span><span class="pun">,</span><span class="pln"> method</span><span class="pun">:</span> <span class="str">'POST'</span><span class="pun">,</span><span class="pln"> body</span><span class="pun">:</span><span class="pln"> dataString </span><span class="pun">};</span> <span class="kwd">function</span><span class="pln"> callback</span><span class="pun">(</span><span class="pln">error</span><span class="pun">,</span><span class="pln"> response</span><span class="pun">,</span><span class="pln"> body</span><span class="pun">)</span> <span class="pun">{</span> <span class="kwd">if</span> <span class="pun">(!</span><span class="pln">error </span><span class="pun">&amp;&amp;</span><span class="pln"> response</span><span class="pun">.</span><span class="pln">statusCode </span><span class="pun">==</span> <span class="lit">200</span><span class="pun">)</span> <span class="pun">{</span><span class="pln"> console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">body</span><span class="pun">);</span> <span class="pun">}</span> <span class="pun">}</span><span class="pln"> request</span><span class="pun">(</span><span class="pln">options</span><span class="pun">,</span><span class="pln"> callback</span><span class="pun">);</span> </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-1-8-3"> <pre class="prettyprint" class="prettyprint prettyprinted"><span class="pun">&lt;?</span><span class="pln">php include</span><span class="pun">(</span><span class="str">'vendor/rmccue/requests/library/Requests.php'</span><span class="pun">);</span> <span class="typ">Requests</span><span class="pun">::</span><span class="pln">register_autoloader</span><span class="pun">();</span><span class="pln"> $headers </span><span class="pun">=</span><span class="pln"> array</span><span class="pun">();</span><span class="pln"> $data </span><span class="pun">=</span><span class="pln"> array</span><span class="pun">(</span> <span class="str">'From'</span> <span class="pun">=&gt;</span> <span class="str">'XXXXX30240'</span><span class="pun">,</span> <span class="str">'To'</span> <span class="pun">=&gt;</span> <span class="str">'XXXXX40682'</span><span class="pun">,</span> <span class="str">'CallerId'</span> <span class="pun">=&gt;</span> <span class="str">'0XXXXXX4890'</span> <span class="pun">);</span><span class="pln"> $response </span><span class="pun">=</span> <span class="typ">Requests</span><span class="pun">::</span><span class="pln">post</span><span class="pun">(</span><span class="str">'https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/connect'</span><span class="pun">,</span><span class="pln"> $headers</span><span class="pun">,</span><span class="pln"> $data</span><span class="pun">);</span> </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-1-8-4"> <pre class="prettyprint" class="prettyprint prettyprinted"><span class="kwd">import</span><span class="pln"> requests data </span><span class="pun">=</span> <span class="pun">{</span> <span class="str">'From'</span><span class="pun">:</span> <span class="str">'XXXXX30240'</span><span class="pun">,</span> <span class="str">'To'</span><span class="pun">:</span> <span class="str">'XXXXX40682'</span><span class="pun">,</span> <span class="str">'CallerId'</span><span class="pun">:</span> <span class="str">'0XXXXXX4890'</span> <span class="pun">}</span><span class="pln"> requests</span><span class="pun">.</span><span class="pln">post</span><span class="pun">(</span><span class="str">'https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/connect'</span><span class="pun">,</span><span class="pln"> data</span><span class="pun">=</span><span class="pln">data</span><span class="pun">)</span> </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-1-8-5"> <pre class="prettyprint" class="prettyprint prettyprinted"><span class="kwd">require</span> <span class="str">'net/http'</span> <span class="kwd">require</span> <span class="str">'uri'</span><span class="pln"> uri </span><span class="pun">=</span><span class="pln"> URI</span><span class="pun">.</span><span class="pln">parse</span><span class="pun">(</span><span class="str">"https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/connect"</span><span class="pun">)</span><span class="pln"> request </span><span class="pun">=</span> <span class="typ">Net</span><span class="pun">::</span><span class="pln">HTTP</span><span class="pun">::</span><span class="typ">Post</span><span class="pun">.</span><span class="kwd">new</span><span class="pun">(</span><span class="pln">uri</span><span class="pun">)</span><span class="pln"> request</span><span class="pun">.</span><span class="pln">set_form_data</span><span class="pun">(</span> <span class="str">"From"</span> <span class="pun">=&gt;</span> <span class="str">"XXXXX30240"</span><span class="pun">,</span> <span class="str">"To"</span> <span class="pun">=&gt;</span> <span class="str">"XXXXX40682"</span><span class="pun">,</span> <span class="str">"CallerId"</span> <span class="pun">=&gt;</span> <span class="str">"0XXXXXX4890"</span><span class="pun">,</span> <span class="pun">)</span><span class="pln"> req_options </span><span class="pun">=</span> <span class="pun">{</span><span class="pln"> use_ssl</span><span class="pun">:</span><span class="pln"> uri</span><span class="pun">.</span><span class="pln">scheme </span><span class="pun">==</span> <span class="str">"https"</span><span class="pun">,</span> <span class="pun">}</span><span class="pln"> response </span><span class="pun">=</span> <span class="typ">Net</span><span class="pun">::</span><span class="pln">HTTP</span><span class="pun">.</span><span class="pln">start</span><span class="pun">(</span><span class="pln">uri</span><span class="pun">.</span><span class="pln">hostname</span><span class="pun">,</span><span class="pln"> uri</span><span class="pun">.</span><span class="pln">port</span><span class="pun">,</span><span class="pln"> req_options</span><span class="pun">)</span> <span class="kwd">do</span> <span class="pun">|</span><span class="pln">http</span><span class="pun">|</span><span class="pln"> http</span><span class="pun">.</span><span class="pln">request</span><span class="pun">(</span><span class="pln">request</span><span class="pun">)</span> <span class="kwd">end</span> <span class="com"># response.code</span> <span class="com"># response.body</span> </pre> </div> </div> </div> <div class="wrapper-list"> <p class="p1">HTTP Response:</p> <ul class="ul1"> <li class="li1">On success, the HTTP response status code will be 200. Please note that a 200 OK isn’t a confirmation of a call being successfully placed/answered. Refer to the StatusCallBack or the GET Call Details API to understand the status of the call. </li> <li class="li1">The <b>Sid</b> is the unique identifier of the call, and it will be useful to log this for future debugging</li> <li class="li1">the HTTP body will contain an XML/JSON similar to the one below</li> </ul> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Response</li> <li role="presentation" class="active"><a href="#callagent-1-10-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">JSON</a></li> <li role="presentation" class=""><a href="#callagent-1-10-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">XML</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-1-10-1"> <pre class="prettyprint">{ "Call": {    "Sid": "c5797dcbaaeed7678c4062a4a3ed2f8a",    "ParentCallSid": null,    "DateCreated": "2017-03-03 10:48:33",    "DateUpdated": "2017-03-03 10:48:33",    "AccountSid": "Exotel",    "To": "0XXXXX38847",    "From": "0XXXXX30240",    "PhoneNumberSid": "0XXXXXX4890",    "Status": "in-progress",    "StartTime": "2017-03-03 10:48:33",    "EndTime": null,    "Duration": null,    "Price": null,    "Direction": "outbound-api",    "AnsweredBy": null,    "ForwardedFrom": null,    "CallerName": null,    "Uri": "/v1/Accounts/Exotel/Calls.json/c5797dcbaaeed7678c4062a4a3ed2f8a",    "RecordingUrl": null } } </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-1-10-2"> <pre class="prettyprint" class="p1">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;TwilioResponse&gt; <span class="Apple-converted-space">    </span>&lt;Call&gt; <span class="Apple-converted-space">        </span>&lt;Sid&gt;06caf2045009d50fbb1da5b5926d2e2f&lt;/Sid&gt; <span class="Apple-converted-space">        </span>&lt;ParentCallSid/&gt; <span class="Apple-converted-space">        </span>&lt;DateCreated&gt;2017-03-03 11:00:19&lt;/DateCreated&gt; <span class="Apple-converted-space">        </span>&lt;DateUpdated&gt;2017-03-03 11:00:19&lt;/DateUpdated&gt; <span class="Apple-converted-space">        </span>&lt;AccountSid&gt;Exotel&lt;/AccountSid&gt; <span class="Apple-converted-space">        </span>&lt;To&gt;0XXXXX40682&lt;/To&gt; <span class="Apple-converted-space">        </span>&lt;From&gt;0XXXXX30240&lt;/From&gt; <span class="Apple-converted-space">        </span>&lt;PhoneNumberSid&gt;0XXXXXX4890&lt;/PhoneNumberSid&gt; <span class="Apple-converted-space">        </span>&lt;Status&gt;in-progress&lt;/Status&gt; <span class="Apple-converted-space">        </span>&lt;StartTime&gt;2017-03-03 11:00:19&lt;/StartTime&gt; <span class="Apple-converted-space">        </span>&lt;EndTime/&gt; <span class="Apple-converted-space">        </span>&lt;Duration/&gt; <span class="Apple-converted-space">        </span>&lt;Price/&gt; <span class="Apple-converted-space">        </span>&lt;Direction&gt;outbound-api&lt;/Direction&gt; <span class="Apple-converted-space">        </span>&lt;AnsweredBy/&gt; <span class="Apple-converted-space">        </span>&lt;ForwardedFrom/&gt; <span class="Apple-converted-space">        </span>&lt;CallerName/&gt; <span class="Apple-converted-space">        </span>&lt;Uri&gt;/v1/Accounts/Exotel/Calls/06caf2045009d50fbb1da5b5926d2e2f&lt;/Uri&gt; <span class="Apple-converted-space">        </span>&lt;RecordingUrl/&gt; <span class="Apple-converted-space">    </span>&lt;/Call&gt; &lt;/TwilioResponse&gt;</pre> </div> </div> </div> <div class="wrapper-list"> <p>Description of parameters mentioned in the above response:</p> <table class="table table-hover table-responsive table-bordered" style="width: 100%;"> <tbody> <tr> <td style="width: 24.7086%;">Parameter Name</td> <td style="width: 74.359%;">Type &amp; Value</td> </tr> <tr> <td style="width: 24.7086%;">Sid</td> <td style="width: 74.359%;">string; an alpha-numeric unique identifier of the call</td> </tr> <tr> <td style="width: 24.7086%;">DateCreated</td> <td style="width: 74.359%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time at which the user initiated the API</td> </tr> <tr> <td style="width: 24.7086%;">DateUpdated</td> <td style="width: 74.359%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time at which the status of the call was last updated in our system</td> </tr> <tr> <td style="width: 24.7086%;">AccountSid</td> <td style="width: 74.359%;">Exotel account SID</td> </tr> <tr> <td style="width: 24.7086%;">To</td> <td style="width: 74.359%;">Your customer's phone number</td> </tr> <tr> <td style="width: 24.7086%;">From</td> <td style="width: 74.359%;">The phone number that will be called first</td> </tr> <tr> <td style="width: 24.7086%;">PhoneNumberSid</td> <td style="width: 74.359%;">This is your ExoPhone/Exotel Virtual Number</td> </tr> <tr> <td style="width: 24.7086%;">Status</td> <td style="width: 74.359%;"> <p>Overall call status, which could be one of:</p> <ul> <li><strong>queued</strong> - The call is ready and waiting in line before going out</li> <li><strong>in-progress</strong> - The call was answered and is currently in progress</li> <li><strong>completed</strong> - The call was answered and has ended normally</li> <li><strong>failed</strong> - The call could not be completed as dialled, most likely because the phone number was non-existent</li> <li><strong>busy</strong> - The caller received a busy signal</li> <li><strong>no-answer</strong> - The call ended without being answered</li> </ul> </td> </tr> <tr> <td style="width: 24.7086%;">StartTime</td> <td style="width: 74.359%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time when the call request was initiated to the operator</td> </tr> <tr> <td style="width: 24.7086%;">EndTime</td> <td style="width: 74.359%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time when the call was completed</td> </tr> <tr> <td style="width: 24.7086%;">Duration</td> <td style="width: 74.359%;">Call duration in seconds</td> </tr> <tr> <td style="width: 24.7086%;">Price</td> <td style="width: 74.359%;">Double; If present, this will be the amount (in INR or USD) you have been charged for the call</td> </tr> <tr> <td style="width: 24.7086%;">Direction</td> <td style="width: 74.359%;"> <ul> <li><strong>inbound</strong> - Incoming call</li> <li><strong>outbound-dial</strong> - Outbound calls from Exotel dashboard</li> <li><strong>outbound-api</strong> - All other Outbound calls (API, campaign etc.)</li> </ul> </td> </tr> <tr> <td style="width: 24.7086%;">AnsweredBy</td> <td style="width: 74.359%;">human</td> </tr> <tr> <td style="width: 24.7086%;">Uri</td> <td style="width: 74.359%;">Uri is the path of the CallSid</td> </tr> <tr> <td style="width: 24.7086%;">RecordingUrl</td> <td style="width: 74.359%;">Link to the call recording</td> </tr> </tbody> </table> </div> <div class="wrapper-list"> <h3 id="call-statuscallback">StatusCallback</h3> <p>Exotel will perform an asynchronous HTTP request to the StatusCallback URL you have specified in your request (if any) once the call completes. List of parameters which will be sent as part of StatusCallback:</p> </div> <div class="wrapper-list"> <table class="table table-hover table-responsive table-bordered" style="width: 100%;"> <tbody> <tr> <td style="width: 23.6597%;">Parameter Name</td> <td style="width: 75.4079%;">Type &amp; Value</td> </tr> <tr> <td style="width: 23.6597%;">CallSid</td> <td style="width: 75.4079%;">string; an alpha-numeric unique identifier of the call</td> </tr> <tr> <td style="width: 23.6597%;">DateUpdated</td> <td style="width: 75.4079%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time at which the status of the call was last updated in our system</td> </tr> <tr> <td style="width: 23.6597%;">Status</td> <td style="width: 75.4079%;">Overall call status, which could be one of: 'completed', 'failed', 'busy' or 'no-answer'</td> </tr> <tr> <td style="width: 23.6597%;">RecordingUrl</td> <td style="width: 75.4079%;">Link to the call recording if present.</td> </tr> </tbody> </table> <p>List of additional fields which will be sent if 'terminal' and/or ‘answered’ event is subscribed using 'StatusCallbackEvents' in the request:</p> <table class="table table-hover table-responsive table-bordered" style="width: 100%;"> <tbody> <tr> <td style="width: 23.8928%;">Parameter Name</td> <td style="width: 75.1748%;">Type &amp; Value</td> </tr> <tr> <td style="width: 23.8928%;">EventType</td> <td style="width: 75.1748%;"> <p>String; This will be the type of event for which 'StatusCallback' is triggered for and subscribed using 'StatusCallbackEvents'.</p> <p>Currently, only ‘terminal’ and ‘answered’ as an event are supported. However, more events can be added in the future.</p> </td> </tr> <tr> <td style="width: 23.8928%;">DateCreated</td> <td style="width: 75.1748%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time at which the user initiated the API</td> </tr> <tr> <td style="width: 23.8928%;">To</td> <td style="width: 75.1748%;">Your customer's phone number as set in the API request. This number will be connected after `From`.</td> </tr> <tr> <td style="width: 23.8928%;">From</td> <td style="width: 75.1748%;">The phone number that was attempted to be called first.</td> </tr> <tr> <td style="width: 23.8928%;">PhoneNumberSid</td> <td style="width: 75.1748%;">This is your ExoPhone's unique identifier.</td> </tr> <tr> <td style="width: 23.8928%;">StartTime</td> <td style="width: 75.1748%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time when the call request was initiated to the operator</td> </tr> <tr> <td style="width: 23.8928%;">EndTime</td> <td style="width: 75.1748%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time when the call was completed</td> </tr> <tr> <td style="width: 23.8928%;">ConversationDuration</td> <td style="width: 75.1748%;">The duration for the time `From` and `To` phone numbers were on call in seconds.</td> </tr> <tr> <td style="width: 23.8928%;">Direction</td> <td style="width: 75.1748%;"> <p>Can be:</p> <ul> <li>inbound - Incoming call</li> <li>outbound-dial - Outbound calls from Exotel dashboard</li> <li>outbound-api - All other Outbound calls (API, campaign etc.)</li> </ul> </td> </tr> <tr> <td style="width: 23.8928%;">CustomField</td> <td style="width: 75.1748%;">The value that was passed in the CustomField parameter of the API (if set during the request) will be populated here.</td> </tr> <tr> <td style="width: 23.8928%;">Legs</td> <td style="width: 75.1748%;"> <p>An array which will denote detailed information about each leg attempt involved in the call.</p> <ul> <li>Legs[i]: `i` denotes the index of the number in order it is attempted. If there are multiple numbers attempted, array’s length will be equal to total attempts. In case of outgoing call connecting two numbers, `i` will be have possible values of 0 and 1. 0th index will represent 'From' leg and 1st index will be represent 'To' leg.</li> <li>OnCallDuration: Indicates the duration that this leg was on a call. This value could be 0 if the call was not picked up by the respective leg.</li> <li>Status: This denotes the terminal status of the particular leg of the call. Can be: <ul> <li>completed - The call was answered by the leg.</li> <li>busy - A busy signal was returned by the leg.</li> <li>failed - The call could not be completed as dialled, most likely because the phone number was non-existent.</li> <li>no-answer - The call ended without being answered.</li> <li>canceled - The call was canceled while queued or ringing.</li> <li>null (empty) - The call to that leg was not even attempted.</li> </ul> </li> </ul> <p>For understanding more about leg-wise call status, refer <a href="https://support.exotel.com/support/solutions/articles/27323-call-status">here</a>.</p> <p>Sample:<br /> Legs[0][Status]= “completed”<br /> Legs[0][OnCallDuration]= 29</p> </td> </tr> </tbody> </table> </div> <div class="alert alert-info" role="alert"> <p>Additional StatusCallback fields are currently only supported if both &#8216;From&#8217; and &#8216;To&#8217; are set. StatusCallbackEvents parameter is not applicable for <a class="sidebar-active" href="https://developer.exotel.com/api/make-a-call-api#call-customer">this</a> case i.e. if &#8216;VoiceUrl&#8217; is used. However, <a href="https://developer.exotel.com/applet/#passthru" target="_BLANK">passthru applet</a> can be utilised if &#8216;VoiceUrl&#8217; is used.</p> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Request (using StatusCallback):</li> <li role="presentation" class="active"><a href="#callagent-1-15-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">cURL</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-1-15-1"> <pre class="prettyprint lang-bsh" class="prettyprint lang-bsh prettyprinted"><span class="pln">curl </span><span class="pun">-</span><span class="pln">XPOST https</span><span class="pun">://&lt;</span><span class="pln">your_api_key</span><span class="pun">&gt;:&lt;</span><span class="pln">your_api_token</span><span class="pun">&gt;&lt;</span><span class="pln">subdomain</span><span class="pun">&gt;/</span><span class="pln">v1</span><span class="pun">/</span><span class="typ">Accounts</span><span class="pun">/&lt;</span><span class="pln">your_sid</span><span class="pun">&gt;/</span><span class="typ">Calls</span><span class="pun">/</span><span class="pln">connect \ </span><span class="pun">-</span><span class="pln">d </span><span class="str">"From=+91941374XXXX"</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">d </span><span class="str">"To=+91886799XXXX"</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">d </span><span class="str">"CallerId=0113083XXXX"</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">d </span><span class="str">"StatusCallback=http://your-application.com/exotel-callback"</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">d </span><span class="str">"StatusCallbackEvents[0]=terminal"</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">d </span><span class="str">"StatusCallbackContentType=application/json"</span> </pre> </div> </div> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Sample StatusCallback payload for 'terminal' event:</li> <li role="presentation" class="active"><a href="#callagent-1-16-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">application/json</a></li> <li role="presentation" class=""><a href="#callagent-1-16-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">multipart/form-data</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-1-16-1"> <pre class="prettyprint">{ "CallSid": "492205107c5fb48f4ac25d1f77759339", "EventType": "terminal", "DateCreated": "2019-04-08 03:17:59", "DateUpdated": "2019-04-08 03:18:35", "Status": "no-answer", "To": "+91886799XXXX", "From": "+91941374XXXX", "PhoneNumberSid": "0113083XXXX", "StartTime": "2019-04-08 03:17:59", "EndTime": "2019-04-08 03:18:36", "Direction": "outbound-api", "RecordingUrl": "https://s3-ap-southeast-1.amazonaws.com/exotelrecordings/&lt;your_sid&gt;/492205107c5fb48f4ac25d1f77759339.mp3", "ConversationDuration": 32, "Legs": [ { "OnCallDuration": 41, "Status": "completed" }, { "OnCallDuration": 32, "Status": "completed" } ] }</pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-1-16-2"> <pre class="prettyprint">CallSid: 492205107c5fb48f4ac25d1f77759339 EventType: terminal From: +91941374XXXX To: +91886799XXXX PhoneNumberSid: 0113083XXXX Status: no-answer Direction: outbound-api DateCreated: 2019-04-08 03:10:55 DateUpdated: 2019-04-08 03:11:28 StartTime: 2019-04-08 03:10:55 EndTime: 2019-04-08 03:11:30 RecordingUrl: ConversationDuration: 0 Legs[0][Status]: no-answer Legs[0][OnCallDuration]: 0 Legs[1][Status]: Legs[1][OnCallDuration]: 0</pre> </div> </div> </div> <hr> </section> <section class="sectionAPIClass" id="call-customer"> <h1 >Outgoing call to connect number to a call flow </h1> <div class="wrapper-list"> <p class="p1">This API will first call the <b>From</b> number, and once they pick up the phone, it will connect them to a call flow (aka applet) that you have created in the system - like your landing app, or any other app that can play a greeting, have IVR, etc. For more details on setting up your flow, please refer <a href="https://developer.exotel.com/applet"><span class="s1">Appplet documentation</span></a>. An HTTP POST request is made to</p> </div> <div class="well api-well"> <div class="col-sm"> <span class="post">POST</span> </div> <div class="col-sm" style="margin: auto 10px;"> <p class="copy-text"> <span>https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/connect</span> </p> </div> <div class="col-sm"> <li> <a type="button" id="apidocTrynowbtn" onclick="openConsolePage(event,'https://developer.exotel.com/api-console/make-a-call-api#call-customer')" href="https://developer.exotel.com/api-console/make-a-call-api#call-customer" class="api-try btn-block show" >Try it</a> </li> <!-- <input class="api-try btn-block <?php// echo esc_html($tryvalue); ?>" onclick="openConsolePage(event,'<?php// echo $tryProductUrl?>')" type="button" value="Try it"> --> </div> </div> <div class="alert alert-info" role="alert"> <p>If you&#8217;d prefer response in JSON format, just append .json at the end of the HTTP POST request.</p> </div> <div class="wrapper-list"> <ul> <li>Replace <code>&lt;your_api_key&gt;</code> and <code>&lt;your_api_token&gt;</code> with the API key and token created by you.</li> <li>Replace <code>&lt;your_sid&gt;</code> with your “Account sid”</li> <li>Replace <code>&lt;subdomain&gt;</code> with the region of your account <ol> <li>&lt;subdomain&gt; of Singapore cluster is @api.exotel.com</li> <li>&lt;subdomain&gt; of Mumbai cluster is @api.in.exotel.com</li> </ol> </li> </ul> <p><code>&lt;your_api_key&gt;</code> , <code>&lt;your_api_token&gt;</code> and <code>&lt;your_sid&gt;</code> are available in the API settings page of your <a href="https://my.exotel.com/apisettings/site#api-credentials">Exotel Dashboard</a></p> </div> <div class="wrapper-list"> <p class="p1">The following are the POST parameters:</p> <table class="table table-hover table-responsive table-bordered" class="t1" style="width: 100%;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="td1" style="width: 18.2984%;" valign="top"> <p class="p1">Parameter Name</p> </td> <td class="td1" style="width: 20.979%;" valign="top"> <p class="p1">Mandatory/Optional</p> </td> <td class="td1" style="width: 60.4895%;" valign="top"> <p class="p1">Value</p> </td> </tr> <tr> <td class="td1" style="width: 18.2984%;" valign="top"> <p class="p1">From</p> </td> <td class="td1" style="width: 20.979%;" valign="top"> <p class="p1">Mandatory</p> </td> <td class="td1" style="width: 60.4895%;" valign="top"> <p class="p1">The phone number that will be called first. Preferably in <a href="https://en.wikipedia.org/wiki/E.164"><span class="s1">E.164 format</span></a>. If not set, our system will try to match it with a country and make a call. If landline number, prefix it with STD code; Ex: 0XXXXXX2400</p> </td> </tr> <tr> <td class="td1" style="width: 18.2984%;" valign="top"> <p class="p1">CallerId</p> </td> <td class="td1" style="width: 20.979%;" valign="top"> <p class="p1">Mandatory</p> </td> <td class="td1" style="width: 60.4895%;" valign="top"> <p class="p1">This is your ExoPhone (pick one from <a href="https://my.exotel.com/numbers"><span class="s1">here</span></a>)</p> </td> </tr> <tr> <td class="td1" style="width: 18.2984%;" valign="top"> <p class="p1">Url</p> </td> <td class="td1" style="width: 20.979%;" valign="top"> <p class="p1">Mandatory</p> </td> <td class="td1" style="width: 60.4895%;" valign="top"> <p class="p1"><strong><span style="color: #ff6600;">http://my.exotel.com/{your_sid}/exoml/start_voice/{app_id}</span></strong> where app_id is the identifier of the flow (or applet) that you want to connect to once the From number picks up the call. You can get the app_id from your <a href="https://my.exotel.com/apps#installed-apps"><span class="s1">Exotel Dashboard</span></a></p> </td> </tr> <tr> <td class="td1" style="width: 18.2984%;" valign="top"> <p class="p1">CallType</p> </td> <td class="td1" style="width: 20.979%;" valign="top"> <p class="p1">Optional</p> </td> <td class="td1" style="width: 60.4895%;" valign="top"> <p class="p1">trans - for Transactional Calls</p> </td> </tr> <tr> <td class="td1" style="width: 18.2984%;" valign="top"> <p class="p1">TimeLimit</p> </td> <td class="td1" style="width: 20.979%;" valign="top"> <p class="p1">Optional</p> </td> <td class="td1" style="width: 60.4895%;" valign="top"> <p class="p1">The time limit (in seconds) that you want this call to last. The call will be cut after this time (max. 14400 i.e. 4 hours)</p> </td> </tr> <tr> <td class="td1" style="width: 18.2984%;" valign="top"> <p class="p1">TimeOut</p> </td> <td class="td1" style="width: 20.979%;" valign="top"> <p class="p1">Optional</p> </td> <td class="td1" style="width: 60.4895%;" valign="top"> <p class="p1">The time (in seconds) to ring the called parties (both first and second call leg)</p> </td> </tr> <tr> <td class="td1" style="width: 18.2984%;" valign="top"> <p class="p1">StatusCallback</p> </td> <td class="td1" style="width: 20.979%;" valign="top"> <p class="p1">Optional</p> </td> <td class="td1" style="width: 60.4895%;" valign="top"> <p class="p1">When the call completes, an HTTP POST will be made to the provided URL with the following four parameters:</p> <ul> <li>CallSid - an alpha-numeric unique identifier</li> <li>Status - one of: completed, failed, busy, no-answer</li> <li>RecordingUrl - link to the call recording (if it exists)</li> <li>DateUpdated - time when the call state was updated last</li> </ul> </td> </tr> <tr> <td class="td1" style="width: 18.2984%;" valign="top"> <p class="p1">CustomField</p> </td> <td class="td1" style="width: 20.979%;" valign="top"> <p class="p1">Optional</p> </td> <td class="td1" style="width: 60.4895%;" valign="top"> <p class="p1">Any application specific value that will be passed back as a parameter while doing a GET request to the URL mentioned in your <a href="https://developer.exotel.com/applet/#passthru"><span class="s1">Passthru Applet</span></a> or <a href="https://developer.exotel.com/applet/#greeting"><span class="s1">Greetings Applet</span></a>.</p> </td> </tr> </tbody> </table> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Request</li> <li role="presentation" class="active"><a href="#callagent-2-6-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">cURL</a></li> <li role="presentation" class=""><a href="#callagent-2-6-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">NodeJS</a></li> <li role="presentation" class=""><a href="#callagent-2-6-3" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">PHP</a></li> <li role="presentation" class=""><a href="#callagent-2-6-4" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">Python</a></li> <li role="presentation" class=""><a href="#callagent-2-6-5" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">Ruby</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-2-6-1"> <pre class="prettyprint lang-bsh"> curl -X POST https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/connect \ -d "From=XXXXX30240" \ -d "CallerId=0XXXXXX4890" \ -d "Url=http://my.exotel.com/Exotel/exoml/start_voice/926" </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-2-6-2"> <pre class="prettyprint" class="prettyprint prettyprinted"><span class="kwd">var</span><span class="pln"> request </span><span class="pun">=</span> <span class="kwd">require</span><span class="pun">(</span><span class="str">'request'</span><span class="pun">);</span> <span class="kwd">var</span><span class="pln"> dataString </span><span class="pun">=</span> <span class="str">'From=XXXXX30240&amp;CallerId=0XXXXXX4890&amp;Url=http://my.exotel.com/Exotel/exoml/start_voice/926'</span><span class="pun">;</span> <span class="kwd">var</span><span class="pln"> options </span><span class="pun">=</span> <span class="pun">{</span><span class="pln"> url</span><span class="pun">:</span> <span class="str">'https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/connect'</span><span class="pun">,</span><span class="pln"> method</span><span class="pun">:</span> <span class="str">'POST'</span><span class="pun">,</span><span class="pln"> body</span><span class="pun">:</span><span class="pln"> dataString </span><span class="pun">};</span> <span class="kwd">function</span><span class="pln"> callback</span><span class="pun">(</span><span class="pln">error</span><span class="pun">,</span><span class="pln"> response</span><span class="pun">,</span><span class="pln"> body</span><span class="pun">)</span> <span class="pun">{</span> <span class="kwd">if</span> <span class="pun">(!</span><span class="pln">error </span><span class="pun">&amp;&amp;</span><span class="pln"> response</span><span class="pun">.</span><span class="pln">statusCode </span><span class="pun">==</span> <span class="lit">200</span><span class="pun">)</span> <span class="pun">{</span><span class="pln"> console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln">body</span><span class="pun">);</span> <span class="pun">}</span> <span class="pun">}</span><span class="pln"> request</span><span class="pun">(</span><span class="pln">options</span><span class="pun">,</span><span class="pln"> callback</span><span class="pun">);</span> </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-2-6-3"> <pre class="prettyprint">&lt;?php include('vendor/rmccue/requests/library/Requests.php'); Requests::register_autoloader(); $headers = array(); $data = array( 'From' =&gt; 'XXXXX30240', 'CallerId' =&gt; '0XXXXXX4890', 'Url' =&gt; 'http://my.exotel.com/Exotel/exoml/start_voice/926' ); $response = Requests::post('https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/connect', $headers, $data); </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-2-6-4"> <pre class="prettyprint">import requests data = { 'From': 'XXXXX30240', 'CallerId': '0XXXXXX4890', 'Url': 'http://my.exotel.com/Exotel/exoml/start_voice/926' } requests.post('https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/connect', data=data) </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-2-6-5"> <pre class="prettyprint">require 'net/http' require 'uri' uri = URI.parse("https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/connect") request = Net::HTTP::Post.new(uri) request.set_form_data( "From" =&gt; "XXXXX30240", "CallerId" =&gt; "0XXXXXX4890", "Url" =&gt; "http://my.exotel.com/Exotel/exoml/start_voice/926", ) req_options = { use_ssl: uri.scheme == "https", } response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http| http.request(request) end # response.code # response.body </pre> </div> </div> </div> <div class="wrapper-list"> <p class="p1">HTTP Response:</p> <ul class="ul1"> <li class="li1">On success, the HTTP response status code will be 200. Please note that a 200 OK isn’t a confirmation of a call being successfully placed/answered. Refer to the StatusCallBack or the GET Call Details API to understand the status of the call.</li> <li class="li1">The <b>Sid</b> is the unique identifier of the call, and it will be useful to log this for future debugging</li> <li class="li1">the HTTP body will contain an XML similar to the one below</li> </ul> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Response</li> <li role="presentation" class="active"><a href="#callagent-2-8-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">JSON</a></li> <li role="presentation" class=""><a href="#callagent-2-8-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">XML</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-2-8-1"> <pre class="prettyprint">{ "Call": { "Sid": "80bfbec2d78bbbf10fb851f4fa165211", "ParentCallSid": null, "DateCreated": "2017-03-03 12:30:24", "DateUpdated": "2017-03-03 12:30:27", "AccountSid": "Exotel", "To": "0XXXXX40682", "From": "0XXXXX30240", "PhoneNumberSid": "0XXXXXX4890", "Status": "in-progress", "StartTime": "2017-03-03 12:30:27", "EndTime": null, "Duration": null, "Price": null, "Direction": "outbound-api", "AnsweredBy": null, "ForwardedFrom": null, "CallerName": null, "Uri": "/v1/Accounts/Exotel/Calls.json/80bfbec2d78bbbf10fb851f4fa165211", "RecordingUrl": null } } </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-2-8-2"> <pre class="prettyprint">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;TwilioResponse&gt; &lt;Call&gt; &lt;Sid&gt;db05188d0f6cf980cdcef8992c2b8cd4&lt;/Sid&gt; &lt;ParentCallSid/&gt; &lt;DateCreated&gt;2017-02-22 04:35:19&lt;/DateCreated&gt; &lt;DateUpdated&gt;2017-02-22 04:35:19&lt;/DateUpdated&gt; &lt;AccountSid&gt;Exotel&lt;/AccountSid&gt; &lt;To&gt;0XXXXX40682&lt;/To&gt; &lt;From&gt;0XXXXX30240&lt;/From&gt; &lt;PhoneNumberSid&gt;0XXXXXX4890&lt;/PhoneNumberSid&gt; &lt;Status&gt;in-progress&lt;/Status&gt; &lt;StartTime&gt;2017-02-22 04:35:19&lt;/StartTime&gt; &lt;EndTime/&gt; &lt;Duration/&gt; &lt;Price/&gt; &lt;Direction&gt;outbound-api&lt;/Direction&gt; &lt;AnsweredBy/&gt; &lt;ForwardedFrom/&gt; &lt;CallerName/&gt; &lt;Uri&gt;/v1/Accounts/Exotel/Calls/db05188d0f6cf980cdcef8992c2b8cd4&lt;/Uri&gt; &lt;RecordingUrl/&gt; &lt;/Call&gt; &lt;/TwilioResponse&gt;</pre> </div> </div> </div> <div class="wrapper-list"> <p class="p1">Description of parameters mentioned in the above response:</p> <table class="table table-hover table-responsive table-bordered" style="width: 100%;"> <tbody> <tr> <td style="width: 22.1446%;">Parameter Name</td> <td style="width: 76.923%;">Type &amp; Value</td> </tr> <tr> <td style="width: 22.1446%;">Sid</td> <td style="width: 76.923%;">string; an alpha-numeric unique identifier of the call</td> </tr> <tr> <td style="width: 22.1446%;">DateCreated</td> <td style="width: 76.923%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time at which the user initiated the API</td> </tr> <tr> <td style="width: 22.1446%;">DateUpdated</td> <td style="width: 76.923%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time at which the status of the call was last updated in our system</td> </tr> <tr> <td style="width: 22.1446%;">AccountSid</td> <td style="width: 76.923%;">Exotel account SID</td> </tr> <tr> <td style="width: 22.1446%;">To</td> <td style="width: 76.923%;">Your customer's phone number</td> </tr> <tr> <td style="width: 22.1446%;">From</td> <td style="width: 76.923%;">The phone number that will be called first</td> </tr> <tr> <td style="width: 22.1446%;">PhoneNumberSid</td> <td style="width: 76.923%;">This is your ExoPhone/Exotel Virtual Number</td> </tr> <tr> <td style="width: 22.1446%;">Status</td> <td style="width: 76.923%;"> <p>Overall call status, which could be one of:</p> <ul> <li><strong><b>queued</b></strong> - The call is ready and waiting in line before going out</li> <li><strong><b>in-progress</b></strong> - The call was answered and is currently in progress</li> <li><strong><b>completed</b></strong> - The call was answered and has ended normally</li> <li><strong><b>failed</b></strong> - The call could not be completed as dialed, most likely because the phone number was non-existent</li> <li><strong><b>busy</b></strong> - The caller received a busy signal</li> <li><strong><b>no-answer</b></strong> - The call ended without being answered</li> </ul> </td> </tr> <tr> <td style="width: 22.1446%;">StartTime</td> <td style="width: 76.923%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time when the call request was initiated to the operator</td> </tr> <tr> <td style="width: 22.1446%;">EndTime</td> <td style="width: 76.923%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time when the call was completed</td> </tr> <tr> <td style="width: 22.1446%;">Duration</td> <td style="width: 76.923%;">Call duration in seconds</td> </tr> <tr> <td style="width: 22.1446%;">Price</td> <td style="width: 76.923%;">Double; If present, this will be the amount (in INR or USD) you have been charged for the call</td> </tr> <tr> <td style="width: 22.1446%;">Direction</td> <td style="width: 76.923%;"> <ul> <li>inbound</li> <li>outbound-dial - Outbound calls from Exotel dashboard</li> <li>outbound-api - All other Outbound calls (API, Campaign etc.)</li> </ul> </td> </tr> <tr> <td style="width: 22.1446%;">AnsweredBy</td> <td style="width: 76.923%;">human</td> </tr> <tr> <td style="width: 22.1446%;">Uri</td> <td style="width: 76.923%;">Uri is the path of the CallSid</td> </tr> <tr> <td style="width: 22.1446%;">RecordingUrl</td> <td style="width: 76.923%;">Link to the call recording</td> </tr> </tbody> </table> </div> <div class="alert alert-info" role="alert"> <p>Some of the parameters of a call (like Duration, Price, EndTime etc.) are updated asynchronously after the call ends. So it might take some time after the call ends (~ 2 mins on an average) for these parameters to be populated correctly.</p> </div> <hr> </section> <section class="sectionAPIClass" id="incoming-call"> <h1 >Incoming call </h1> <div class="wrapper-list"> When an incoming call lands on your ExoPhone, a call flow is initiated. To configure a call flow for your ExoPhone, please refer <a href="https://developer.exotel.com/applet">Applet documentation</a>. </div> <hr> </section> <section class="sectionAPIClass" id="bulk-call-details"> <h1 >Bulk Call Details <sup class="beta-tag">Beta</sup> </h1> <div class="wrapper-list"> <p class="p1">To get details of calls in bulk (including Status, Price, etc.), you will need to make a HTTP GET request to</p> </div> <div class="alert alert-info" role="alert"> <p>Note that Bulk Call Details will not provide ongoing calls&#8217; details</p> </div> <div class="well api-well"> <div class="col-sm"> <span class="get">GET</span> </div> <div class="col-sm" style="margin: auto 10px;"> <p class="copy-text"> <span>https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls</span> </p> </div> <div class="col-sm"> <li> <a type="button" id="apidocTrynowbtn" onclick="openConsolePage(event,'https://developer.exotel.com/api-console/make-a-call-api#BulkCallDetails')" href="https://developer.exotel.com/api-console/make-a-call-api#BulkCallDetails" class="api-try btn-block show" >Try it</a> </li> <!-- <input class="api-try btn-block <?php// echo esc_html($tryvalue); ?>" onclick="openConsolePage(event,'<?php// echo $tryProductUrl?>')" type="button" value="Try it"> --> </div> </div> <div class="alert alert-info" role="alert"> <p>If you&#8217;d prefer response in JSON format, just append .json at the end like &#8230;/Calls.json</p> </div> <div class="wrapper-list"> <ul class="ul1"> <li class="li1">Replace <code>&lt;your_api_key&gt;</code> and <code>&lt;your_api_token&gt;</code> with the API key and token created by you.</li> <li class="li1">Replace <code>&lt;your_sid&gt;</code> with your “Account sid”</li> <li class="li1">Replace <code>&lt;subdomain&gt;</code> with the region of your account<br /> <ol class="ul1"> <li class="li1">&lt;subdomain&gt; of Singapore cluster is @api.exotel.com</li> <li class="li1">&lt;subdomain&gt; of Mumbai cluster is @api.in.exotel.com</li> </ol> </li> </ul> <p class="p1"><code>&lt;your_api_key&gt;</code> , <code>&lt;your_api_token&gt;</code> and <code>&lt;your_sid&gt;</code> are available in the API settings page of your <a href="https://my.exotel.com/apisettings/site#api-credentials"><span class="s2">Exotel Dashboard</span></a></p> </div> <div class="alert alert-info" role="alert"> <p>Please make sure to URL encode query parameters in the HTTP GET request.</p> </div> <div class="wrapper-list"> <p>Description of request query parameters (filters):</p> <table class="table table-hover table-responsive table-bordered" style="width: 100%; height: 728px;"> <tbody> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">Parameter Name</td> <td style="width: 73.4265%; height: 24px;">Description</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">Sid</td> <td style="width: 73.4265%; height: 24px;"> <p>string; an alpha-numeric unique identifier of the call<br /> <br /> One or multiple Call SIDs which are comma separated. Recommended limit of SIDs which should be passed together is 20 and maximum allowed limit is 100. If DateCreated is not set, it will only check for last 31 days by default. While querying Sid(s) older than 31 days, DateCreated filter needs to be provided.</p> <p>&nbsp;</p> <p>Example:<br /> /Calls?Sid=48d690c837bb0c755a1228dcb6911416,d7d9cefd9773dd746d8f1e029cdb1417<br /> /Calls?Sid=48d690c837bb0c755a1228dcb6911416&amp;DateCreated=gte:2019-01-01 00:00:00;lte:2019-01-31 23:59:59</p> </td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">DateCreated</td> <td style="width: 73.4265%; height: 24px;">Date and time at which the Call resource was created in the Exotel system. Supported operators (gte and lte), for more info refer to filter operators section below. You can query call records only up to 6 months old and provide maximum date range of 1 month.<br /> <br /> Default if not set: Last 31 days<br /> <br /> Example:<br /> /Calls?DateCreated=gte:2019-01-01 00:00:00;lte:2019-01-31 23:59:59</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">To</td> <td style="width: 73.4265%; height: 24px;">Your customer's phone number. One or multiple To numbers can be provided (in E.164 format) which are comma separated. (max limit: 5)<br /> <br /> Example:<br /> /Calls?To=&lt;number-1&gt;<br /> /Calls?To=&lt;number-1&gt;,&lt;number-2&gt;"</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">From</td> <td style="width: 73.4265%; height: 24px;">The phone number that will be called first. One or multiple From numbers can be provided (in E.164 format) which are comma separated. (max limit: 5)<br /> <br /> Example:<br /> /Calls?From=&lt;number-1&gt;<br /> /Calls?From=&lt;number-1&gt;,&lt;number-2&gt;,...</td> </tr> <tr style="height: 240px;"> <td style="width: 25.6411%; height: 240px;">Status</td> <td style="width: 73.4265%; height: 240px;"> <p>Overall call status, which could be one of:</p> <ul> <li>completed - The call was answered and has ended normally</li> <li>failed - The call could not be completed as dialled, most likely because the phone number was non-existent</li> <li>busy - The caller received a busy signal</li> <li>no-answer - The call ended without being answered</li> </ul> <p>Example:<br /> /Calls?Status=completed<br /> /Calls?Status=failed,no-answer,busy,canceled</p> </td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">Duration</td> <td style="width: 73.4265%; height: 24px;">Call duration in seconds. Supported operators (gte, eq and lte), for more info refer to filter operators section below.<br /> <br /> Example:<br /> /Calls?Duration=gte:10s;lte:45s<br /> /Calls?Duration=eq:30s</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">Price</td> <td style="width: 73.4265%; height: 24px;">If present, this will be the amount (as per your billing currency) you have been charged for the call. Supported operators (gte, eq and lte), for more info refer to filter operators section below.<br /> <br /> Example:<br /> /Calls?Price=gte:0.10;lte:1.0<br /> /Calls?Price=eq:0.300030</td> </tr> <tr style="height: 104px;"> <td style="width: 25.6411%; height: 104px;">Direction</td> <td style="width: 73.4265%; height: 104px;"> <ul> <li>inbound</li> <li>outbound-dial - Outbound calls from Exotel dashboard</li> <li>outbound-api - All other Outbound calls (API, campaign etc.)</li> </ul> <p>Example:<br /> /Calls?Direction=inbound<br /> /Calls?Direction=outbound-dial,inbound</p> </td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">PhoneNumber</td> <td style="width: 73.4265%; height: 24px;">This represents the Virtual Number (ExoPhone) used for the call. One or multiple PhoneNumber(s) can be provided (in E.164 format) which are comma separated. (max limit: 5)<br /> <br /> Example:<br /> /Calls?PhoneNumber=&lt;vn-1&gt;<br /> /Calls?PhoneNumber=&lt;vn-1&gt;,&lt;vn-2&gt;,...</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">PageSize</td> <td style="width: 73.4265%; height: 24px;">This represents number of records visible in one page of the API response. Default: 50, Max: 100</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">SortBy</td> <td style="width: 73.4265%; height: 24px;">This indicates in what order the Call records are sorted in the API response. By default records are sorted by DateCreated in descending order. However, you can override the same in following way for ascending order:<br /> <br /> Example:<br /> <span style="font-weight: 400;">/Calls?SortBy=DateCreated:asc</span></td> </tr> <tr style="height: 72px;"> <td style="width: 25.6411%; height: 72px;">Before</td> <td style="width: 73.4265%; height: 72px;">Auto generated unique string returned in the PrevPageUri (under Metadata) to be used as query param when at least one record is returned in that page. The value of this field is a cursor which identifies a call record uniquely.</td> </tr> <tr style="height: 72px;"> <td style="width: 25.6411%; height: 72px;">After</td> <td style="width: 73.4265%; height: 72px;">Auto generated unique string returned in the NextPageUri (under Metadata) to be used as query param when at least one record is present in that page. The value of this field is a cursor which identifies a call record uniquely.</td> </tr> </tbody> </table> <p>Filter Operators (Please note these operators are only applicable to certain query parameters as mentioned above)</p> <table class="table table-hover table-responsive table-bordered"> <tbody> <tr> <td> <p><span style="font-weight: 400;">Operator</span></p> </td> <td> <p><span style="font-weight: 400;">Description</span></p> </td> <td> <p><span style="font-weight: 400;">Examples</span></p> </td> </tr> <tr> <td> <p><span style="font-weight: 400;">eq:</span></p> </td> <td> <p><span style="font-weight: 400;">Equals</span></p> </td> <td> <p><span style="font-weight: 400;">Return results where duration is exactly ten seconds:</span></p> <p><i><span style="font-weight: 400;">Duration=eq:10s</span></i></p> <p><span style="font-weight: 400;">Same can also be written as </span><i><span style="font-weight: 400;">Duration=10s</span></i></p> </td> </tr> <tr> <td> <p><span style="font-weight: 400;">gte:</span></p> </td> <td> <p><span style="font-weight: 400;">Greater than or equal to</span></p> </td> <td> <p><span style="font-weight: 400;">Return results where Duration is ten seconds or more:</span></p> <p><i><span style="font-weight: 400;">Duration=gte:10s</span></i></p> </td> </tr> <tr> <td> <p><span style="font-weight: 400;">lte:</span></p> </td> <td> <p><span style="font-weight: 400;">Less than or equal to</span></p> </td> <td> <p><span style="font-weight: 400;">Return results where Duration is ten seconds or less:</span></p> <p><i><span style="font-weight: 400;">Duration=lte:10s</span></i></p> </td> </tr> <tr> <td> <p><span style="font-weight: 400;">,</span></p> </td> <td> <p><span style="font-weight: 400;">OR operator</span></p> </td> <td> <p><span style="font-weight: 400;">OR operator (,) is used to select multiple values if any one of them matches</span></p> </td> </tr> <tr> <td> <p><span style="font-weight: 400;">;</span></p> </td> <td> <p><span style="font-weight: 400;">AND operator</span></p> </td> <td> <p><span style="font-weight: 400;">AND operator (;) is used to select multiple values if all of them matches. Url encode ; to %3B while making the API request.</span></p> </td> </tr> </tbody> </table> <p>&nbsp;</p> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Request</li> <li role="presentation" class="active"><a href="#callagent-4-8-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">cURL</a></li> <li role="presentation" class=""><a href="#callagent-4-8-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">NodeJS</a></li> <li role="presentation" class=""><a href="#callagent-4-8-3" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">PHP</a></li> <li role="presentation" class=""><a href="#callagent-4-8-4" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">Python</a></li> <li role="presentation" class=""><a href="#callagent-4-8-5" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">Ruby</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-4-8-1"> <pre class="prettyprint lang-bsh" class="prettyprint lang-bsh prettyprinted"><span class="pln">curl https</span><span class="pun">://&lt;</span><span class="pln">your_api_key</span><span class="pun">&gt;:&lt;</span><span class="pln">your_api_token</span><span class="pun">&gt;&lt;</span><span class="pln">subdomain</span><span class="pun">&gt;/</span><span class="pln">v1</span><span class="pun">/</span><span class="typ">Accounts</span><span class="pun">/&lt;</span><span class="pln">your_sid</span><span class="pun">&gt;/</span><span class="typ">Calls</span> </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-4-8-2"> <pre class="prettyprint">var request = require('request'); var options = { url: 'https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls' }; function callback(error, response, body) { if (!error &amp;&amp; response.statusCode == 200) { console.log(body); } } request(options, callback); </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-4-8-3"> <pre class="prettyprint">&lt;?php include('vendor/rmccue/requests/library/Requests.php'); Requests::register_autoloader(); $headers = array(); $response = Requests::get('https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls', $headers); </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-4-8-4"> <pre class="prettyprint">import requests requests.get('https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls') </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-4-8-5"> <pre class="prettyprint">require 'net/http' require 'uri' uri = URI.parse("https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls") response = Net::HTTP.get_response(uri) # response.code # response.body </pre> </div> </div> </div> <div class="wrapper-list"> <p class="p1">HTTP Response:</p> <ul class="ul1"> <li class="li1">On success, the HTTP response status code will be 200</li> <li class="li1">the HTTP response body will contain an JSON/XML similar to the one below</li> </ul> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Response</li> <li role="presentation" class="active"><a href="#callagent-4-10-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">JSON</a></li> <li role="presentation" class=""><a href="#callagent-4-10-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">XML</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-4-10-1"> <pre class="prettyprint">{ "Metadata": { "Total": 1027, "PageSize": 1, "FirstPageUri": "/v1/Accounts/&lt;your_sid&gt;/Calls.json?PageSize=2&amp;DateCreated=gte%3A2020-01-01+00%3A00%3A00%3Blte%3A2020-01-03+00%3A00%3A00&amp;SortBy=DateCreated:desc", "PrevPageUri": "/v1/Accounts/&lt;your_sid&gt;/Calls.json?PageSize=2&amp;DateCreated=gte%3A2020-01-01+00%3A00%3A00%3Blte%3A2020-01-03+00%3A00%3A00&amp;SortBy=DateCreated:desc&amp;Before=MTU3Nzk4NjAwNixhZmQ4MGJhNzI1MzA5YmU2MjM0MTA2YjY5ZGVmMTQxMg==", "NextPageUri": "/v1/Accounts/&lt;your_sid&gt;/Calls.json?PageSize=2&amp;DateCreated=gte%3A2020-01-01+00%3A00%3A00%3Blte%3A2020-01-03+00%3A00%3A00&amp;SortBy=DateCreated:desc&amp;After=MTU3Nzk4NDQwNywwNmQ4ZmI0MDdlZWY5N2YxZmI0OTllNjZjOTI5MTQxMg==" }, "Calls": [ { "Sid": "b6cfaf5f5cef3ca0fc937749ef960e25", "ParentCallSid": "", "DateCreated": "2016-11-29 15:58:45", "DateUpdated": "2016-11-29 16:00:09", "AccountSid": "Exotel", "To": "0XXXXX20000", "From": "0XXXXX30240", "PhoneNumberSid": "0XXXXXX4890", "Status": "completed", "StartTime": "2016-11-29 15:59:10", "EndTime": "2016-11-29 15:59:27", "Duration": "17", "Price": "1.500", "Direction": "outbound-api", "AnsweredBy": "human", "ForwardedFrom": "", "CallerName": "", "Uri": "/v1/Accounts/&lt;your_sid&gt;/Calls/b6cfaf5f5cef3ca0fc937749ef960e25", "RecordingUrl": "https://s3-ap-southeast-1.amazonaws.com/exotelrecordings/&lt;your_sid&gt;/b6cfaf5f5cef3ca0fc937749ef960e25.mp3" } ] }</pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-4-10-2"> <pre class="prettyprint">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;TwilioResponse&gt; <span style="font-weight: 400;">    &lt;</span><span style="font-weight: 400;">Metadata</span><span style="font-weight: 400;">&gt;</span> <span style="font-weight: 400;">        &lt;</span><span style="font-weight: 400;">Total</span><span style="font-weight: 400;">&gt;1027&lt;/</span><span style="font-weight: 400;">Total</span><span style="font-weight: 400;">&gt;</span> <span style="font-weight: 400;">        &lt;</span><span style="font-weight: 400;">PageSize</span><span style="font-weight: 400;">&gt;1&lt;/</span><span style="font-weight: 400;">PageSize</span><span style="font-weight: 400;">&gt;</span> <span style="font-weight: 400;">        &lt;</span><span style="font-weight: 400;">FirstPageUri</span><span style="font-weight: 400;">&gt;/v1/Accounts/Exotel/Calls?PageSize=2&amp;amp;DateCreated=gte%3A2020-01-01+00%3A00%3A00%3Blte%3A2020-01-03+00%3A00%3A00&amp;amp;SortBy=DateCreated:desc&lt;/</span><span style="font-weight: 400;">FirstPageUri</span><span style="font-weight: 400;">&gt;</span> <span style="font-weight: 400;">        &lt;</span><span style="font-weight: 400;">PrevPageUri</span><span style="font-weight: 400;">&gt;/v1/Accounts/Exotel/Calls?PageSize=2&amp;amp;DateCreated=gte%3A2020-01-01+00%3A00%3A00%3Blte%3A2020-01-03+00%3A00%3A00&amp;amp;SortBy=DateCreated:desc&amp;amp;Before=MTU3Nzk4NjAwNixhZmQ4MGJhNzI1MzA5YmU2MjM0MTA2YjY5ZGVmMTQxMg==&lt;/</span><span style="font-weight: 400;">PrevPageUri</span><span style="font-weight: 400;">&gt;</span> <span style="font-weight: 400;">        &lt;</span><span style="font-weight: 400;">NextPageUri</span><span style="font-weight: 400;">&gt;/v1/Accounts/Exotel/Calls?PageSize=2&amp;amp;DateCreated=gte%3A2020-01-01+00%3A00%3A00%3Blte%3A2020-01-03+00%3A00%3A00&amp;amp;SortBy=DateCreated:desc&amp;amp;After=MTU3Nzk4NDQwNywwNmQ4ZmI0MDdlZWY5N2YxZmI0OTllNjZjOTI5MTQxMg==&lt;/</span><span style="font-weight: 400;">NextPageUri</span><span style="font-weight: 400;">&gt;</span> <span style="font-weight: 400;">    &lt;/</span><span style="font-weight: 400;">Metadata</span><span style="font-weight: 400;">&gt;</span> &lt;Call&gt; &lt;Sid&gt;b6cfaf5f5cef3ca0fc937749ef960e25&lt;/Sid&gt; &lt;ParentCallSid&gt;&lt;/ParentCallSid&gt; &lt;DateCreated&gt;2017-02-17 14:16:03&lt;/DateCreated&gt; &lt;DateUpdated&gt;2017-02-17 14:17:32&lt;/DateUpdated&gt; &lt;AccountSid&gt;Exotel&lt;/AccountSid&gt; &lt;To&gt;0XXXXX20000&lt;/To&gt; &lt;From&gt;0XXXXX30240&lt;/From&gt; &lt;PhoneNumberSid&gt;0XXXXXX4890&lt;/PhoneNumberSid&gt; &lt;Status&gt;completed&lt;/Status&gt; &lt;StartTime&gt;2017-02-17 14:16:03&lt;/StartTime&gt; &lt;EndTime&gt;2017-02-17 14:16:20&lt;/EndTime&gt; &lt;Duration&gt;17&lt;/Duration&gt; &lt;Price&gt;0.750&lt;/Price&gt; &lt;Direction&gt;inbound&lt;/Direction&gt; &lt;AnsweredBy&gt;human&lt;/AnsweredBy&gt; &lt;ForwardedFrom&gt;&lt;/ForwardedFrom&gt; &lt;CallerName&gt;&lt;/CallerName&gt; &lt;Uri&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/b6cfaf5f5cef3ca0fc937749ef960e25&lt;/Uri&gt; &lt;RecordingUrl&gt;https://s3-ap-southeast-1.amazonaws.com/exotelrecordings/&lt;your_sid&gt;/b6cfaf5f5cef3ca0fc937749ef960e25.mp3&lt;/RecordingUrl&gt; &lt;/Call&gt; &lt;/TwilioResponse&gt;</pre> </div> </div> </div> <div class="alert alert-info" role="alert"> <p>Some of the parameters of a call (like Duration, Price, EndTime, etc.) are updated asynchronously after the call ends. So it might take some time after the call ends (~ 2 mins on an average) for these parameters to be populated correctly.</p> </div> <div class="wrapper-list"> <p>Description of parameters under 'Metadata' object mentioned in the above response:</p> <table class="table table-hover table-responsive table-bordered" style="width: 91.4655%; height: 144px;"> <tbody> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">Parameter Name</td> <td style="width: 73.4265%; height: 24px;">Type &amp; Value</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">Total</td> <td style="width: 73.4265%; height: 24px;">Number of call records matching the given query and filters at that point of time</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">PageSize</td> <td style="width: 73.4265%; height: 24px;">This indicates the number of records on that page</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">FirstPageUri</td> <td style="width: 73.4265%; height: 24px;">This indicates the URI of the first page as per the request. This can be used to to retrieve call records from the beginning of the page.</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">PrevPageUri</td> <td style="width: 73.4265%; height: 24px;">This indicates the URI of the previous page as per the request. This can be used to to retrieve previous set of call records.</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">NextPageUri</td> <td style="width: 73.4265%; height: 24px;">This indicates the URI of the next page as per the request. This can be used to to retrieve next set of call records.</td> </tr> </tbody> </table> <p><br /> Description of parameters under 'Calls' array object mentioned in the above response:</p> <table class="table table-hover table-responsive table-bordered" style="width: 100%; height: 728px;"> <tbody> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">Parameter Name</td> <td style="width: 73.4265%; height: 24px;">Type &amp; Value</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">Sid</td> <td style="width: 73.4265%; height: 24px;">string; an alpha-numeric unique identifier of the call</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">DateCreated</td> <td style="width: 73.4265%; height: 24px;">Date and time at which the user initiated the API</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">DateUpdated</td> <td style="width: 73.4265%; height: 24px;">Date and time at which the status of the call was last updated in our system</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">AccountSid</td> <td style="width: 73.4265%; height: 24px;">Your account SID</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">To</td> <td style="width: 73.4265%; height: 24px;">Your customer's phone number in E.164 format </td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">From</td> <td style="width: 73.4265%; height: 24px;">The phone number that will be called first in E.164 format</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">PhoneNumber</td> <td style="width: 73.4265%; height: 24px;">This is your ExoPhone/Exotel Virtual Number in E.164 format</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">PhoneNumberSid</td> <td style="width: 73.4265%; height: 24px;">This is the SID (unique ID)of the ExoPhone/Exotel Virtual Number. It can be same as the ExoPhone number or UUID based on when your number was configured.</td> </tr> <tr style="height: 240px;"> <td style="width: 25.6411%; height: 240px;">Status</td> <td style="width: 73.4265%; height: 240px;"> <p>Overall call status, which could be one of:</p> <ul> <li><strong><b>completed</b></strong> - The call was answered and has ended normally</li> <li><strong><b>failed</b></strong> - The call could not be completed as dialled, most likely because the phone number was non-existent</li> <li><strong><b>busy</b></strong> - The caller received a busy signal</li> <li><strong><b>no-answer</b></strong> - The call ended without being answered</li> </ul> </td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">StartTime</td> <td style="width: 73.4265%; height: 24px;">Time in format YYYY-MM-DD HH:mm:ss; Date and time when the call request was initiated to the operator</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">EndTime</td> <td style="width: 73.4265%; height: 24px;">Time in format YYYY-MM-DD HH:mm:ss; Date and time when the call was completed</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">Duration</td> <td style="width: 73.4265%; height: 24px;">Call duration in seconds</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">Price</td> <td style="width: 73.4265%; height: 24px;">Double; If present, this will be the amount (in INR or USD) you have been charged for the call</td> </tr> <tr style="height: 104px;"> <td style="width: 25.6411%; height: 104px;">Direction</td> <td style="width: 73.4265%; height: 104px;"> <ul> <li>inbound</li> <li>outbound-dial - Outbound calls from Exotel dashboard</li> <li>outbound-api - All other Outbound calls (API, campaign etc.)</li> </ul> </td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">AnsweredBy</td> <td style="width: 73.4265%; height: 24px;">human</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">Uri</td> <td style="width: 73.4265%; height: 24px;">Uri is the path of the CallSid</td> </tr> <tr style="height: 24px;"> <td style="width: 25.6411%; height: 24px;">RecordingUrl</td> <td style="width: 73.4265%; height: 24px;">Link to the call recording</td> </tr> </tbody> </table> <p>If additional information such as status of both the call legs are required, you will need to make an HTTP GET request as:</p> </div> <div class="well api-well"> <div class="col-sm"> <span class="get">GET</span> </div> <div class="col-sm" style="margin: auto 10px;"> <p class="copy-text"> <span>https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls?details=true</span> </p> </div> <div class="col-sm"> <li> <a type="button" id="apidocTrynowbtn" onclick="openConsolePage(event,'')" href="" class="api-try btn-block hidden" >Try it</a> </li> <!-- <input class="api-try btn-block <?php// echo esc_html($tryvalue); ?>" onclick="openConsolePage(event,'<?php// echo $tryProductUrl?>')" type="button" value="Try it"> --> </div> </div> <div class="wrapper-list"> <p class="p1">HTTP Response:</p> <ul class="ul1"> <li class="li1">On success, the HTTP response status code will be 200</li> <li class="li1">the HTTP body will contain an XML similar to the one below</li> </ul> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Response</li> <li role="presentation" class="active"><a href="#callagent-4-15-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">JSON</a></li> <li role="presentation" class=""><a href="#callagent-4-15-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">XML</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-4-15-1"> <pre class="prettyprint">{ "Metadata": { "Total": 1027, "PageSize": 1, "FirstPageUri": "/v1/Accounts/&lt;your_sid&gt;/Calls.json?PageSize=2&amp;DateCreated=gte%3A2020-01-01+00%3A00%3A00%3Blte%3A2020-01-03+00%3A00%3A00&amp;SortBy=DateCreated:desc&amp;details=true", "PrevPageUri": "/v1/Accounts/&lt;your_sid&gt;/Calls.json?PageSize=2&amp;DateCreated=gte%3A2020-01-01+00%3A00%3A00%3Blte%3A2020-01-03+00%3A00%3A00&amp;SortBy=DateCreated:desc&amp;details=true&amp;amp;Before=MTU3Nzk4NjAwNixhZmQ4MGJhNzI1MzA5YmU2MjM0MTA2YjY5ZGVmMTQxMg==", "NextPageUri": "/v1/Accounts/&lt;your_sid&gt;/Calls.json?PageSize=2&amp;DateCreated=gte%3A2020-01-01+00%3A00%3A00%3Blte%3A2020-01-03+00%3A00%3A00&amp;SortBy=DateCreated:desc&amp;details=true&amp;After=MTU3Nzk4NDQwNywwNmQ4ZmI0MDdlZWY5N2YxZmI0OTllNjZjOTI5MTQxMg==" }, "Calls": [ { "Sid": "b6cfaf5f5cef3ca0fc937749ef960e25", "ParentCallSid": "", "DateCreated": "2016-11-29 15:58:45", "DateUpdated": "2016-11-29 16:00:09", "AccountSid": "Exotel", "To": "0XXXXX20000", "From": "0XXXXX30240", "PhoneNumberSid": "0XXXXXX4890", "Status": "completed", "StartTime": "2016-11-29 15:59:10", "EndTime": "2016-11-29 15:59:57", "Duration": "47", "Price": "1.500", "Direction": "outbound-api", "AnsweredBy": "human", "ForwardedFrom": "", "CallerName": "", "Uri": "/v1/Accounts/&lt;your_sid&gt;/Calls/b6cfaf5f5cef3ca0fc937749ef960e25", "RecordingUrl": "https://s3-ap-southeast-1.amazonaws.com/exotelrecordings/&lt;your_sid&gt;/b6cfaf5f5cef3ca0fc937749ef960e25.mp3", "Details": { "ConversationDuration": 33, "Legs": [ { "Leg": { "Id": 1, "OnCallDuration": 43 } }, { "Leg": { "Id": 2, "OnCallDuration": 33 } } ], "Leg1Status": "completed", "Leg2Status": "no-answer" } } ] }</pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-4-15-2"> <pre class="prettyprint">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;TwilioResponse&gt; &lt;Metadata&gt; &lt;Total&gt;1027&lt;/Total&gt; &lt;PageSize&gt;1&lt;/PageSize&gt; &lt;FirstPageUri&gt;/v1/Accounts/Exotel/Calls?PageSize=100&amp;amp;SortBy=DateCreated:desc&amp;amp;Status=completed&amp;amp;details=true&amp;amp;NumbersMetadata=true&lt;/FirstPageUri&gt; &lt;PrevPageUri&gt;/v1/Accounts/Exotel/Calls?PageSize=100&amp;amp;SortBy=DateCreated:desc&amp;amp;Status=completed&amp;amp;details=true&amp;amp;NumbersMetadata=true&amp;amp;Before=MTU3ODUwMjgwMyxiNTM2MzgzNzZlZWMyYTUxNjVmZGVlZmU2OWQyMTQxOA==&lt;/PrevPageUri&gt; &lt;NextPageUri&gt;/v1/Accounts/Exotel/Calls?PageSize=100&amp;amp;SortBy=DateCreated:desc&amp;amp;Status=completed&amp;amp;details=true&amp;amp;NumbersMetadata=true&amp;amp;After=MTU3ODQ4NTE2OSwwNjYwMDJiOWE2MmZiN2IxMmE0YjljODAzNTZmMTQxOA==&lt;/NextPageUri&gt; &lt;/Metadata&gt; &lt;Call&gt; &lt;Sid&gt;b6cfaf5f5cef3ca0fc937749ef96d245&lt;/Sid&gt; &lt;ParentCallSid&gt;&lt;/ParentCallSid&gt; &lt;DateCreated&gt;2016-11-29 15:58:45&lt;/DateCreated&gt; &lt;DateUpdated&gt;2016-11-29 16:00:09&lt;/DateUpdated&gt; &lt;AccountSid&gt;Exotel&lt;/AccountSid&gt; &lt;To&gt;0XXXXX30240&lt;/To&gt; &lt;From&gt;0XXXXX85175&lt;/From&gt; &lt;PhoneNumberSid&gt;0XXXXXX4890&lt;/PhoneNumberSid&gt; &lt;Status&gt;completed&lt;/Status&gt; &lt;StartTime&gt;2016-11-29 15:59:10&lt;/StartTime&gt; &lt;EndTime&gt;2016-11-29 15:59:27&lt;/EndTime&gt; &lt;Duration&gt;17&lt;/Duration&gt; &lt;Price&gt;1.500&lt;/Price&gt; &lt;Direction&gt;outbound-api&lt;/Direction&gt; &lt;AnsweredBy&gt;human&lt;/AnsweredBy&gt; &lt;ForwardedFrom&gt;&lt;/ForwardedFrom&gt; &lt;CallerName&gt;&lt;/CallerName&gt; &lt;Uri&gt;/v1/Accounts/Exotel/Calls/b6cfaf5f5cef3ca0fc937749ef96d245&lt;/Uri&gt; &lt;RecordingUrl&gt;https://s3-ap-southeast-1.amazonaws.com/exotelrecordings/Exotel/b6cfaf5f5cef3ca0fc937749ef96d245.mp3&lt;/RecordingUrl&gt; &lt;Details&gt; &lt;ConversationDuration&gt;8&lt;/ConversationDuration&gt; &lt;Leg1Status&gt;completed&lt;/Leg1Status&gt; &lt;Leg2Status&gt;completed&lt;/Leg2Status&gt; &lt;Legs&gt; &lt;Leg&gt; &lt;Id&gt;1&lt;/Id&gt; &lt;OnCallDuration&gt;21&lt;/OnCallDuration&gt; &lt;/Leg&gt; &lt;Leg&gt; &lt;Id&gt;2&lt;/Id&gt; &lt;OnCallDuration&gt;8&lt;/OnCallDuration&gt; &lt;/Leg&gt; &lt;/Legs&gt; &lt;/Details&gt; &lt;/Call&gt; &lt;/TwilioResponse&gt;</pre> </div> </div> </div> <div class="wrapper-list"> <p>Description of parameters under "Details" mentioned in the above response:</p> <table class="table table-hover table-responsive table-bordered" style="width: 100%;"> <tbody> <tr> <td style="width: 22.1445%;">Parameter Name</td> <td style="width: 76.9231%;">Value</td> </tr> <tr> <td style="width: 22.1445%;">ConversationDuration</td> <td style="width: 76.9231%;">The duration for the From and To phone numbers on call in seconds</td> </tr> <tr> <td style="width: 22.1445%;">Leg1Status</td> <td style="width: 76.9231%;"> <p>Status of the first leg of the call. Can be one of</p> <ul> <li>completed - The call was answered and has ended normally</li> <li>busy - The caller received a busy signal</li> <li>failed - The call could not be completed as dialled, most likely because the phone number was non-existent</li> <li>no-answer - The call ended without being answered</li> <li>canceled - The call was canceled while queued or ringing</li> </ul> </td> </tr> <tr> <td style="width: 22.1445%;">Leg2Status</td> <td style="width: 76.9231%;"> <p>Status of the second leg of the call. Can be one of</p> <ul> <li>completed - The call was answered and has ended normally</li> <li>busy - The caller received a busy signal</li> <li>no-answer - The call ended without being answered</li> <li>failed - The call could not be completed as dialed, most likely because the phone number was non-existent</li> <li>canceled - The call was canceled while queued or ringing</li> <li>null (empty) - The call did not have a second leg</li> </ul> </td> </tr> <tr> <td style="width: 22.1445%;">Legs</td> <td style="width: 76.9231%;"> <p>Status of individual legs of the call. Contains the following information (per leg) in an array:</p> <ul> <li>Id - Indicates the leg. Can be 1 or 2.</li> <li>OnCallDuration - Indicates the duration that this leg was on a call.</li> </ul> </td> </tr> </tbody> </table> <p>The following are few examples in which API can be requested depending on the use-case:</p> </div> <div class="wrapper-list"> <p><strong>Calls filtered by DateCreated range with Leg-wise details and Page Size = 100</strong></p> </div> <div class="well api-well"> <div class="col-sm"> <span class="get">GET</span> </div> <div class="col-sm" style="margin: auto 10px;"> <p class="copy-text"> <span>https://&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls.json?DateCreated=gte:2019-12-03+00:00:00%3Blte:2019-12-04+00:00:00&amp;details=true&amp;PageSize=100</span> </p> </div> <div class="col-sm"> <li> <a type="button" id="apidocTrynowbtn" onclick="openConsolePage(event,'')" href="" class="api-try btn-block hidden" >Try it</a> </li> <!-- <input class="api-try btn-block <?php// echo esc_html($tryvalue); ?>" onclick="openConsolePage(event,'<?php// echo $tryProductUrl?>')" type="button" value="Try it"> --> </div> </div> <div class="wrapper-list"> <p>Get all Incoming calls received by an agent (To number) for a given date range</p> </div> <div class="well api-well"> <div class="col-sm"> <span class="get">GET</span> </div> <div class="col-sm" style="margin: auto 10px;"> <p class="copy-text"> <span>https://&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls.json?DateCreated=gte:2019-12-03+00:00:00%3Blte:2019-12-04+00:00:00&amp;To=%2B91xxxxxxxxxx</span> </p> </div> <div class="col-sm"> <li> <a type="button" id="apidocTrynowbtn" onclick="openConsolePage(event,'')" href="" class="api-try btn-block hidden" >Try it</a> </li> <!-- <input class="api-try btn-block <?php// echo esc_html($tryvalue); ?>" onclick="openConsolePage(event,'<?php// echo $tryProductUrl?>')" type="button" value="Try it"> --> </div> </div> <div class="wrapper-list"> <p><strong>Calls with Duration greater than 10 seconds and less than 60 seconds</strong></p> </div> <div class="well api-well"> <div class="col-sm"> <span class="get">GET</span> </div> <div class="col-sm" style="margin: auto 10px;"> <p class="copy-text"> <span>https://&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls.json?DateCreated=gte:2019-12-03+00:00:00%3Blte:2019-12-04+00:00:00&amp;Duration=gte:11s%3Blte:59s </span> </p> </div> <div class="col-sm"> <li> <a type="button" id="apidocTrynowbtn" onclick="openConsolePage(event,'')" href="" class="api-try btn-block hidden" >Try it</a> </li> <!-- <input class="api-try btn-block <?php// echo esc_html($tryvalue); ?>" onclick="openConsolePage(event,'<?php// echo $tryProductUrl?>')" type="button" value="Try it"> --> </div> </div> <div class="wrapper-list"> <p><strong>Calls which are failed and having ExoPhone (Virtual Phone Number) as +91xxxxxxxxxx</strong></p> </div> <div class="well api-well"> <div class="col-sm"> <span class="get">GET</span> </div> <div class="col-sm" style="margin: auto 10px;"> <p class="copy-text"> <span>https://&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls.json?DateCreated=gte:2019-12-03+00:00:00%3Blte:2019-12-04+00:00:00&amp;Status=failed&amp;PhoneNumber=%2B91xxxxxxxxxx </span> </p> </div> <div class="col-sm"> <li> <a type="button" id="apidocTrynowbtn" onclick="openConsolePage(event,'')" href="" class="api-try btn-block hidden" >Try it</a> </li> <!-- <input class="api-try btn-block <?php// echo esc_html($tryvalue); ?>" onclick="openConsolePage(event,'<?php// echo $tryProductUrl?>')" type="button" value="Try it"> --> </div> </div> <hr> </section> <section class="sectionAPIClass" id="metadata-phone"> <h1 >Number Metadata </h1> <div class="wrapper-list"> <p class="p1">This API provides the following metadata about a phone number:</p> <ul class="ul1"> <li class="li1">Telecom Circle</li> <li class="li1">Telecom Circle Name</li> <li class="li1">Number Type</li> <li class="li1">Whether the number belongs to DND or not</li> </ul> <p class="p1">To get the above information you need to make a HTTP GET request to</p> </div> <div class="well api-well"> <div class="col-sm"> <span class="get">GET</span> </div> <div class="col-sm" style="margin: auto 10px;"> <p class="copy-text"> <span>https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Numbers/~number~</span> </p> </div> <div class="col-sm"> <li> <a type="button" id="apidocTrynowbtn" onclick="openConsolePage(event,'https://developer.exotel.com/api-console/make-a-call-api#NumberMetadata')" href="https://developer.exotel.com/api-console/make-a-call-api#NumberMetadata" class="api-try btn-block show" >Try it</a> </li> <!-- <input class="api-try btn-block <?php// echo esc_html($tryvalue); ?>" onclick="openConsolePage(event,'<?php// echo $tryProductUrl?>')" type="button" value="Try it"> --> </div> </div> <div class="alert alert-info" role="alert"> <p>If you&#8217;d prefer response in JSON format, just append .json at the end of the HTTP GET request.</p> </div> <div class="wrapper-list"> <ul> <li>Replace <code>&lt;your_api_key&gt;</code> and <code>&lt;your_api_token&gt;</code> with the API key and token created by you.</li> <li>Replace <code>&lt;your_sid&gt;</code> with your “Account sid”</li> <li>Replace <code>&lt;subdomain&gt;</code> with the region of your account <ol> <li>&lt;subdomain&gt; of Singapore cluster is @api.exotel.com</li> <li>&lt;subdomain&gt; of Mumbai cluster is @api.in.exotel.com</li> </ol> </li> </ul> <p><code>&lt;your_api_key&gt;</code> ,<code> &lt;your_api_token&gt;</code> and <code>&lt;your_sid&gt;</code> are available in the API settings page of your <a href="https://my.exotel.com/apisettings/site#api-credentials">Exotel Dashboard</a></p> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Request</li> <li role="presentation" class="active"><a href="#callagent-5-5-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">cURL</a></li> <li role="presentation" class=""><a href="#callagent-5-5-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">NodeJS</a></li> <li role="presentation" class=""><a href="#callagent-5-5-3" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">PHP</a></li> <li role="presentation" class=""><a href="#callagent-5-5-4" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">Python</a></li> <li role="presentation" class=""><a href="#callagent-5-5-5" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">Ruby</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-5-5-1"> <pre class="prettyprint lang-bsh" class="prettyprint lang-bsh prettyprinted"><span class="pln">curl https</span><span class="pun">://&lt;</span><span class="pln">your_api_key</span><span class="pun">&gt;:&lt;</span><span class="pln">your_api_token</span><span class="pun">&gt;&lt;</span><span class="pln">subdomain</span><span class="pun">&gt;/</span><span class="pln">v1</span><span class="pun">/</span><span class="typ">Accounts</span><span class="pun">/&lt;</span><span class="pln">your_sid</span><span class="pun">&gt;/</span><span class="typ">Numbers</span><span class="pun">/</span><span class="pln">XXXXX30240 </span></pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-5-5-2"> <pre class="prettyprint">var request = require('request'); var options = { url: 'https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Numbers/XXXXX30240' }; function callback(error, response, body) { if (!error &amp;&amp; response.statusCode == 200) { console.log(body); } } request(options, callback); </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-5-5-3"> <pre class="prettyprint">&lt;?php include('vendor/rmccue/requests/library/Requests.php'); Requests::register_autoloader(); $headers = array(); $response = Requests::get('https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Numbers/XXXXX30240', $headers); </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-5-5-4"> <pre class="prettyprint">import requests requests.get('https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Numbers/XXXXX30240') </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-5-5-5"> <pre class="prettyprint">require 'net/http' require 'uri' uri = URI.parse("https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Numbers/XXXXX30240") response = Net::HTTP.get_response(uri) # response.code # response.body </pre> </div> </div> </div> <div class="wrapper-list"> <p class="p1">HTTP Response:</p> <ul class="ul1"> <li class="li1">On success, the HTTP response status code will be 200</li> <li class="li1">the HTTP body will contain an XML similar to the one below</li> </ul> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Response</li> <li role="presentation" class="active"><a href="#callagent-5-7-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">JSON</a></li> <li role="presentation" class=""><a href="#callagent-5-7-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">XML</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-5-7-1"> <pre class="prettyprint">{ "Numbers": { "PhoneNumber": "0XXXXX30240", "Circle": "GJ", "CircleName": "Gujarat Telecom Circle (includes Daman &amp; Diu, Dadra &amp; Nagar Haveli)", "Type": "Mobile", "Operator": "R", "OperatorName": "Reliance", "DND": "Yes" } }</pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-5-7-2"> <pre class="prettyprint">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;TwilioResponse&gt; &lt;Numbers&gt; &lt;PhoneNumber&gt;0XXXXX30240&lt;/PhoneNumber&gt; &lt;Circle&gt;GJ&lt;/Circle&gt; &lt;CircleName&gt;Gujarat Telecom Circle (includes Daman &amp;amp; Diu, Dadra &amp;amp; Nagar Haveli)&lt;/CircleName&gt; &lt;Type&gt;Mobile&lt;/Type&gt; &lt;Operator&gt;R&lt;/Operator&gt; &lt;OperatorName&gt;Reliance&lt;/OperatorName&gt; &lt;DND&gt;Yes&lt;/DND&gt; &lt;/Numbers&gt; &lt;/TwilioResponse&gt;</pre> </div> </div> </div> <div class="wrapper-list"> <p class="p1">Description of parameters mentioned in the above response:</p> <table class="table table-hover table-responsive table-bordered" style="width: 100%;"> <tbody> <tr> <td style="width: 16.0839%;">Parameter Name</td> <td style="width: 82.9837%;">Type &amp; Value</td> </tr> <tr> <td style="width: 16.0839%;">PhoneNumber</td> <td style="height: 24px; width: 82.9837%;">string; Reformatted phone number</td> </tr> <tr> <td style="width: 16.0839%;">Circle</td> <td style="width: 82.9837%;">Two character telecom circle code. Refer below table for more details</td> </tr> <tr style="height: 72px;"> <td style="height: 72px; width: 16.0839%;">CircleName</td> <td style="height: 72px; width: 82.9837%;">Human readable string of the Circle code. Ex: Haryana Telecom Circle (excludes Faridabad, Gurgaon &amp; Panchkula)</td> </tr> <tr style="height: 24px;"> <td style="height: 24px; width: 16.0839%;">Type</td> <td style="height: 24px; width: 82.9837%;">'Mobile' or 'Landline'</td> </tr> <tr style="height: 48px;"> <td style="height: 48px; width: 16.0839%;">Operator</td> <td style="height: 48px; width: 82.9837%;">Single or two character telecom operator code. Refer below table for more details</td> </tr> <tr style="height: 24px;"> <td style="height: 24px; width: 16.0839%;">OperatorName</td> <td style="height: 24px; width: 82.9837%;">Telecom operator to which the number belongs</td> </tr> <tr style="height: 104px;"> <td style="height: 104px; width: 16.0839%;">DND</td> <td style="height: 104px; width: 82.9837%;"> <ul> <li>Yes</li> <li>No</li> <li>Unavailable</li> </ul> </td> </tr> </tbody> </table> <p class="p1">Description of all the telecom circles in India:</p> <table class="table table-hover table-responsive table-bordered" style="width: 100%;"> <tbody> <tr> <td style="width: 13.5198%;">Circle Name</td> <td style="width: 85.5478%;">Value</td> </tr> <tr> <td style="width: 13.5198%;">AP</td> <td style="width: 85.5478%;">Andhra Pradesh Telecom Circle</td> </tr> <tr> <td style="width: 13.5198%;">AS</td> <td style="width: 85.5478%;">Assam Telecom Circle</td> </tr> <tr> <td style="width: 13.5198%;">BR</td> <td style="width: 85.5478%;">Bihar &amp; Jharkhand Telecom Circle</td> </tr> <tr> <td style="width: 13.5198%;">CH</td> <td style="width: 85.5478%;">Chennai Metro Telecom Circle (includes Chennai, MEPZ &amp; Mahabalipuram)</td> </tr> <tr> <td style="width: 13.5198%;">DL</td> <td style="width: 85.5478%;">Delhi Metro Telecom Circle (includes NCR, Faridabad, Ghaziabad, Gurgaon &amp; Noida)</td> </tr> <tr> <td style="width: 13.5198%;">GJ</td> <td style="width: 85.5478%;">Gujarat Telecom Circle (includes Daman &amp; Diu, Dadra &amp; Nagar Haveli)</td> </tr> <tr> <td style="width: 13.5198%;">HP</td> <td style="width: 85.5478%;">Himachal Pradesh Telecom Circle</td> </tr> <tr> <td style="width: 13.5198%;">HR</td> <td style="width: 85.5478%;">Haryana Telecom Circle (excludes Faridabad, Gurgaon &amp; Panchkula)</td> </tr> <tr> <td style="width: 13.5198%;">JK</td> <td style="width: 85.5478%;">Jammu &amp; Kashmir Telecom Circle</td> </tr> <tr> <td style="width: 13.5198%;">KL</td> <td style="width: 85.5478%;">Kerala Telecom Circle (includes Lakshadeep)</td> </tr> <tr> <td style="width: 13.5198%;">KA</td> <td style="width: 85.5478%;">Karnataka Telecom Circle</td> </tr> <tr> <td style="width: 13.5198%;">KO</td> <td style="width: 85.5478%;">Kolkata Metro Telecom Circle (includes parts of Haora, Hooghly, North &amp; South 24 Parganas and Nadia Districts)</td> </tr> <tr> <td style="width: 13.5198%;">MH</td> <td style="width: 85.5478%;">Maharashtra Telecom Circle (includes Goa but excludes Mumbai, Navi Mumbai &amp; Kalyan)</td> </tr> <tr> <td style="width: 13.5198%;">MP</td> <td style="width: 85.5478%;">Madhya Pradesh &amp; Chhattisgarh Telecom Circle</td> </tr> <tr> <td style="width: 13.5198%;">MU</td> <td style="width: 85.5478%;">Mumbai Metro Telecom Circle (includes Navi Mumbai &amp; Kalyan)</td> </tr> <tr> <td style="width: 13.5198%;">NE</td> <td style="width: 85.5478%;">North East India Telecom Circle (includes Arunachal Pradesh, Meghalaya, Mizoram, Nagaland, Manipur &amp; Tripura)</td> </tr> <tr> <td style="width: 13.5198%;">OR</td> <td style="width: 85.5478%;">Orissa Telecom Circle</td> </tr> <tr> <td style="width: 13.5198%;">PB</td> <td style="width: 85.5478%;">Punjab Telecom Circle (includes Chandigarh &amp; Panchkula)</td> </tr> <tr> <td style="width: 13.5198%;">RJ</td> <td style="width: 85.5478%;">Rajasthan Telecom Circle</td> </tr> <tr> <td style="width: 13.5198%;">TN</td> <td style="width: 85.5478%;">Tamil Nadu Telecom Circle (excludes CH Chennai, MEPZ, Mahabalipuram &amp; Minjur and includes Pondicherry except Yanam &amp; Mahe)</td> </tr> <tr> <td style="width: 13.5198%;">UE</td> <td style="width: 85.5478%;">Uttar Pradesh (East) Telecom Circle</td> </tr> <tr> <td style="width: 13.5198%;">UW</td> <td style="width: 85.5478%;">Uttar Pradesh (West) &amp; Uttarakhand Telecom Circle (excludes Ghaziabad &amp; Noida)</td> </tr> <tr> <td style="width: 13.5198%;">WB</td> <td style="width: 85.5478%;">West Bengal Telecom Circle (includes Andaman &amp; Nicobar,Sikkim excludes Calcutta Telecom District)</td> </tr> <tr> <td style="width: 13.5198%;">AN</td> <td style="width: 85.5478%;">Andaman &amp; Nicobar</td> </tr> <tr> <td style="width: 13.5198%;">BY</td> <td style="width: 85.5478%;">Mumbai Metro Telecom Circle (includes Navi Mumbai &amp; Kalyan)</td> </tr> <tr> <td style="width: 13.5198%;">HA</td> <td style="width: 85.5478%;">Haryana Telecom Circle (excludes Faridabad, Gurgaon &amp; Panchkula)</td> </tr> <tr> <td style="width: 13.5198%;">ND</td> <td style="width: 85.5478%;">Delhi Metro Telecom Circle (includes NCR, Faridabad, Ghaziabad, Gurgaon &amp; Noida)</td> </tr> <tr> <td style="width: 13.5198%;">UPE</td> <td style="width: 85.5478%;">Uttar Pradesh (East) Telecom Circle</td> </tr> <tr> <td style="width: 13.5198%;">UPW</td> <td style="width: 85.5478%;">Uttar Pradesh (West) &amp; Uttarakhand Telecom Circle (excludes Ghaziabad &amp; Noida)</td> </tr> </tbody> </table> <p class="p1">Description of Telecom operators in India:</p> <table class="table table-hover table-responsive table-bordered" style="width: 100%;"> <tbody> <tr> <td style="width: 19.3101%;">Operator Name</td> <td style="width: 79.0802%;">Value</td> </tr> <tr> <td style="width: 19.3101%;">AC</td> <td style="width: 79.0802%;">Aircel</td> </tr> <tr> <td style="width: 19.3101%;">A</td> <td style="width: 79.0802%;">Airtel</td> </tr> <tr> <td style="width: 19.3101%;">AL</td> <td style="width: 79.0802%;">Allianz</td> </tr> <tr> <td style="width: 19.3101%;">B</td> <td style="width: 79.0802%;">BSNL</td> </tr> <tr> <td style="width: 19.3101%;">D</td> <td style="width: 79.0802%;">Dishnet</td> </tr> <tr> <td style="width: 19.3101%;">E</td> <td style="width: 79.0802%;">Etisalat</td> </tr> <tr> <td style="width: 19.3101%;">H</td> <td style="width: 79.0802%;">HFCL</td> </tr> <tr> <td style="width: 19.3101%;">I</td> <td style="width: 79.0802%;">Idea</td> </tr> <tr> <td style="width: 19.3101%;">LO</td> <td style="width: 79.0802%;">Loop</td> </tr> <tr> <td style="width: 19.3101%;">MT</td> <td style="width: 79.0802%;">MTNL</td> </tr> <tr> <td style="width: 19.3101%;">P</td> <td style="width: 79.0802%;">Ping</td> </tr> <tr> <td style="width: 19.3101%;">R</td> <td style="width: 79.0802%;">Reliance</td> </tr> <tr> <td style="width: 19.3101%;">S</td> <td style="width: 79.0802%;">Sistema</td> </tr> <tr> <td style="width: 19.3101%;">ST</td> <td style="width: 79.0802%;">S Tel</td> </tr> <tr> <td style="width: 19.3101%;">T</td> <td style="width: 79.0802%;">Tata</td> </tr> <tr> <td style="width: 19.3101%;">U</td> <td style="width: 79.0802%;">Unitech</td> </tr> <tr> <td style="width: 19.3101%;">VI</td> <td style="width: 79.0802%;">Videocon</td> </tr> <tr> <td style="width: 19.3101%;">V</td> <td style="width: 79.0802%;">Vodafone</td> </tr> </tbody> </table> </div> <hr> </section> <section class="sectionAPIClass" id="call-details"> <h1 >Call Details </h1> <div class="wrapper-list"> <p class="p1">To get details of a call (including Status, Price, etc.), you will need to make a HTTP GET request to</p> </div> <div class="well api-well"> <div class="col-sm"> <span class="get">GET</span> </div> <div class="col-sm" style="margin: auto 10px;"> <p class="copy-text"> <span>https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/&lt;CallSid&gt;</span> </p> </div> <div class="col-sm"> <li> <a type="button" id="apidocTrynowbtn" onclick="openConsolePage(event,'https://developer.exotel.com/api-console/make-a-call-api#Calldetails')" href="https://developer.exotel.com/api-console/make-a-call-api#Calldetails" class="api-try btn-block show" >Try it</a> </li> <!-- <input class="api-try btn-block <?php// echo esc_html($tryvalue); ?>" onclick="openConsolePage(event,'<?php// echo $tryProductUrl?>')" type="button" value="Try it"> --> </div> </div> <div class="wrapper-list"> <p class="p1">Where <code>&lt;CallSid&gt;</code> is an alpha-numeric unique identifier generated for all the calls made via Exotel.</p> </div> <div class="alert alert-info" role="alert"> <p>If you&#8217;d prefer response in JSON format, just append .json at the end of the HTTP GET request.</p> </div> <div class="wrapper-list"> <ul class="ul1"> <li class="li1">Replace <code>&lt;your_api_key&gt;</code> and <code>&lt;your_api_token&gt;</code> with the API key and token created by you.</li> <li class="li1">Replace <code>&lt;your_sid&gt;</code> with your “Account sid”</li> <li class="li1">Replace <code>&lt;subdomain&gt;</code> with the region of your account<br /> <ol class="ul1"> <li class="li1">&lt;subdomain&gt; of Singapore cluster is @api.exotel.com</li> <li class="li1">&lt;subdomain&gt; of Mumbai cluster is @api.in.exotel.com</li> </ol> </li> </ul> <p class="p1"><code>&lt;your_api_key&gt;</code> , <code>&lt;your_api_token&gt;</code> and <code>&lt;your_sid&gt;</code> are available in the API settings page of your <a href="https://my.exotel.com/apisettings/site#api-credentials"><span class="s2">Exotel Dashboard</span></a></p> <p class="p1">In the case of an outbound call originated via the API, the Sid parameter is as returned in the XML/JSON response to your request. In the case of inbound calls, you can get the Sid by using the <a href="https://developer.exotel.com/applet/#passthru"><span class="s2">Passthru applet</span></a>.</p> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Request</li> <li role="presentation" class="active"><a href="#callagent-6-6-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">cURL</a></li> <li role="presentation" class=""><a href="#callagent-6-6-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">NodeJS</a></li> <li role="presentation" class=""><a href="#callagent-6-6-3" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">PHP</a></li> <li role="presentation" class=""><a href="#callagent-6-6-4" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">Python</a></li> <li role="presentation" class=""><a href="#callagent-6-6-5" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">Ruby</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-6-6-1"> <pre class="prettyprint lang-bsh" class="prettyprint lang-bsh prettyprinted"><span class="pln">curl https</span><span class="pun">://&lt;</span><span class="pln">your_api_key</span><span class="pun">&gt;:&lt;</span><span class="pln">your_api_token</span><span class="pun">&gt;&lt;</span><span class="pln">subdomain</span><span class="pun">&gt;/</span><span class="pln">v1</span><span class="pun">/</span><span class="typ">Accounts</span><span class="pun">/&lt;</span><span class="pln">your_sid</span><span class="pun">&gt;/</span><span class="typ">Calls</span><span class="pun">/</span><span class="pln">b6cfaf5f5cef3ca0fc937749ef960e25 </span></pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-6-6-2"> <pre class="prettyprint">var request = require('request'); var options = { url: 'https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/b6cfaf5f5cef3ca0fc937749ef960e25' }; function callback(error, response, body) { if (!error &amp;&amp; response.statusCode == 200) { console.log(body); } } request(options, callback); </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-6-6-3"> <pre class="prettyprint">&lt;?php include('vendor/rmccue/requests/library/Requests.php'); Requests::register_autoloader(); $headers = array(); $response = Requests::get('https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/b6cfaf5f5cef3ca0fc937749ef960e25', $headers); </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-6-6-4"> <pre class="prettyprint">import requests requests.get('https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/b6cfaf5f5cef3ca0fc937749ef960e25') </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-6-6-5"> <pre class="prettyprint">require 'net/http' require 'uri' uri = URI.parse("https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/b6cfaf5f5cef3ca0fc937749ef960e25") response = Net::HTTP.get_response(uri) # response.code # response.body </pre> </div> </div> </div> <div class="wrapper-list"> <p class="p1">HTTP Response:</p> <ul class="ul1"> <li class="li1">On success, the HTTP response status code will be 200</li> <li class="li1">the HTTP body will contain an XML similar to the one below</li> </ul> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Response</li> <li role="presentation" class="active"><a href="#callagent-6-8-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">JSON</a></li> <li role="presentation" class=""><a href="#callagent-6-8-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">XML</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-6-8-1"> <pre class="prettyprint">{ "Call": { "Sid": "b6cfaf5f5cef3ca0fc937749ef960e25", "ParentCallSid": "", "DateCreated": "2016-11-29 15:58:45", "DateUpdated": "2016-11-29 16:00:09", "AccountSid": "Exotel", "To": "0XXXXX20000", "From": "0XXXXX30240", "PhoneNumberSid": "0XXXXXX4890", "Status": "completed", "StartTime": "2016-11-29 15:59:10", "EndTime": "2016-11-29 15:59:27", "Duration": "17", "Price": "1.500", "Direction": "outbound-api", "AnsweredBy": "human", "ForwardedFrom": "", "CallerName": "", "Uri": "/v1/Accounts/&lt;your_sid&gt;/Calls/b6cfaf5f5cef3ca0fc937749ef960e25", "RecordingUrl": "https://s3-ap-southeast-1.amazonaws.com/exotelrecordings/&lt;your_sid&gt;/b6cfaf5f5cef3ca0fc937749ef960e25.mp3" } }</pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-6-8-2"> <pre class="prettyprint">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;TwilioResponse&gt; &lt;Call&gt; &lt;Sid&gt;b6cfaf5f5cef3ca0fc937749ef960e25&lt;/Sid&gt; &lt;ParentCallSid&gt;&lt;/ParentCallSid&gt; &lt;DateCreated&gt;2017-02-17 14:16:03&lt;/DateCreated&gt; &lt;DateUpdated&gt;2017-02-17 14:17:32&lt;/DateUpdated&gt; &lt;AccountSid&gt;Exotel&lt;/AccountSid&gt; &lt;To&gt;0XXXXX20000&lt;/To&gt; &lt;From&gt;0XXXXX30240&lt;/From&gt; &lt;PhoneNumberSid&gt;0XXXXXX4890&lt;/PhoneNumberSid&gt; &lt;Status&gt;completed&lt;/Status&gt; &lt;StartTime&gt;2017-02-17 14:16:03&lt;/StartTime&gt; &lt;EndTime&gt;2017-02-17 14:16:20&lt;/EndTime&gt; &lt;Duration&gt;17&lt;/Duration&gt; &lt;Price&gt;0.750&lt;/Price&gt; &lt;Direction&gt;inbound&lt;/Direction&gt; &lt;AnsweredBy&gt;human&lt;/AnsweredBy&gt; &lt;ForwardedFrom&gt;&lt;/ForwardedFrom&gt; &lt;CallerName&gt;&lt;/CallerName&gt; &lt;Uri&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/b6cfaf5f5cef3ca0fc937749ef960e25&lt;/Uri&gt; &lt;RecordingUrl&gt;https://s3-ap-southeast-1.amazonaws.com/exotelrecordings/&lt;your_sid&gt;/b6cfaf5f5cef3ca0fc937749ef960e25.mp3&lt;/RecordingUrl&gt; &lt;/Call&gt; &lt;/TwilioResponse&gt;</pre> </div> </div> </div> <div class="alert alert-info" role="alert"> <p>Some of the parameters of a call (like Duration, Price, EndTime, etc.) are updated asynchronously after the call ends. So it might take some time after the call ends (~ 2 mins on an average) for these parameters to be populated correctly.</p> </div> <div class="wrapper-list"> <p>Description of parameters mentioned in the above response:</p> <table class="table table-hover table-responsive table-bordered" style="width: 100%;"> <tbody> <tr> <td style="width: 25.6411%;">Parameter Name</td> <td style="width: 73.4265%;">Type &amp; Value</td> </tr> <tr> <td style="width: 25.6411%;">Sid</td> <td style="width: 73.4265%;">string; an alpha-numeric unique identifier of the call</td> </tr> <tr> <td style="width: 25.6411%;">DateCreated</td> <td style="width: 73.4265%;">Date and time at which the user initiated the API</td> </tr> <tr> <td style="width: 25.6411%;">DateUpdated</td> <td style="width: 73.4265%;">Date and time at which the status of the call was last updated in our system</td> </tr> <tr> <td style="width: 25.6411%;">AccountSid</td> <td style="width: 73.4265%;">Your account SID</td> </tr> <tr> <td style="width: 25.6411%;">To</td> <td style="width: 73.4265%;">Your customer's phone number</td> </tr> <tr> <td style="width: 25.6411%;">From</td> <td style="width: 73.4265%;">The phone number that will be called first</td> </tr> <tr> <td style="width: 25.6411%;">PhoneNumberSid</td> <td style="width: 73.4265%;">This is your ExoPhone/Exotel Virtual Number</td> </tr> <tr> <td style="width: 25.6411%;">Status</td> <td style="width: 73.4265%;"> <p>Overall call status, which could be one of:</p> <ul> <li><strong><b>queued</b></strong> - The call is ready and waiting in line before going out</li> <li><strong><b>ringing</b></strong> - The call is currently in-flight</li> <li><strong><b>in-progress</b></strong> - The call was answered and is currently in progress</li> <li><strong><b>completed</b></strong> - The call was answered and has ended normally</li> <li><strong><b>failed</b></strong> - The call could not be completed as dialled, most likely because the phone number was non-existent</li> <li><strong><b>busy</b></strong> - The caller received a busy signal</li> <li><strong><b>no-answer</b></strong> - The call ended without being answered</li> </ul> </td> </tr> <tr> <td style="width: 25.6411%;">StartTime</td> <td style="width: 73.4265%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time when the call request was initiated to the operator</td> </tr> <tr> <td style="width: 25.6411%;">EndTime</td> <td style="width: 73.4265%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time when the call was completed</td> </tr> <tr> <td style="width: 25.6411%;">Duration</td> <td style="width: 73.4265%;">Call duration in seconds</td> </tr> <tr> <td style="width: 25.6411%;">Price</td> <td style="width: 73.4265%;">Double; If present, this will be the amount (in INR or USD) you have been charged for the call</td> </tr> <tr> <td style="width: 25.6411%;">Direction</td> <td style="width: 73.4265%;"> <ul> <li>inbound</li> <li>outbound-dial - Outbound calls from Exotel dashboard</li> <li>outbound-api - All other Outbound calls (API, campaign etc.)</li> </ul> </td> </tr> <tr> <td style="width: 25.6411%;">AnsweredBy</td> <td style="width: 73.4265%;">human</td> </tr> <tr> <td style="width: 25.6411%;">Uri</td> <td style="width: 73.4265%;">Uri is the path of the CallSid</td> </tr> <tr> <td style="width: 25.6411%;">RecordingUrl</td> <td style="width: 73.4265%;">Link to the call recording</td> </tr> </tbody> </table> <p>If status of both the call legs are required incase of an outbound call, you will need to make an HTTP GET request to</p> </div> <div class="well api-well"> <div class="col-sm"> <span class="get">GET</span> </div> <div class="col-sm" style="margin: auto 10px;"> <p class="copy-text"> <span>https://&lt;your_api_key&gt;:&lt;your_api_token&gt;&lt;subdomain&gt;/v1/Accounts/&lt;your_sid&gt;/Calls/&lt;CallSid&gt;?details=true</span> </p> </div> <div class="col-sm"> <li> <a type="button" id="apidocTrynowbtn" onclick="openConsolePage(event,'')" href="" class="api-try btn-block hidden" >Try it</a> </li> <!-- <input class="api-try btn-block <?php// echo esc_html($tryvalue); ?>" onclick="openConsolePage(event,'<?php// echo $tryProductUrl?>')" type="button" value="Try it"> --> </div> </div> <div class="wrapper-list"> <p class="p1">HTTP Response:</p> <ul class="ul1"> <li class="li1">On success, the HTTP response status code will be 200</li> <li class="li1">the HTTP body will contain an XML similar to the one below</li> </ul> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Response</li> <li role="presentation" class="active"><a href="#callagent-6-13-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">JSON</a></li> <li role="presentation" class=""><a href="#callagent-6-13-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">XML</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-6-13-1"> <pre class="prettyprint">{ "Call": { "Sid": "b6cfaf5f5cef3ca0fc937749ef96d245", "ParentCallSid": "", "DateCreated": "2016-11-29 15:58:45", "DateUpdated": "2016-11-29 16:00:09", "AccountSid": "Exotel", "To": "0XXXXX30240", "From": "0XXXXX85175", "PhoneNumberSid": "0XXXXXX4890", "Status": "completed", "StartTime": "2016-11-29 15:59:10", "EndTime": "2016-11-29 15:59:27", "Duration": "17", "Price": "1.500", "Direction": "outbound-api", "AnsweredBy": "human", "ForwardedFrom": "", "CallerName": "", "Uri": "/v1/Accounts/Exotel/Calls/b6cfaf5f5cef3ca0fc937749ef96d245", "RecordingUrl": "https://s3-ap-southeast-1.amazonaws.com/exotelrecordings/Exotel/b6cfaf5f5cef3ca0fc937749ef96d245.mp3", "Details": { "ConversationDuration": 8, "Leg1Status": "completed", "Leg2Status": "completed" "Legs": [ { "Leg": { "Id": "1", "OnCallDuration": 21 } }, { "Leg": { "Id": "2", "OnCallDuration": 8 } } ] } } } </pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-6-13-2"> <pre class="prettyprint">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;TwilioResponse&gt; &lt;Call&gt; &lt;Sid&gt;b6cfaf5f5cef3ca0fc937749ef96d245&lt;/Sid&gt; &lt;ParentCallSid&gt;&lt;/ParentCallSid&gt; &lt;DateCreated&gt;2016-11-29 15:58:45&lt;/DateCreated&gt; &lt;DateUpdated&gt;2016-11-29 16:00:09&lt;/DateUpdated&gt; &lt;AccountSid&gt;Exotel&lt;/AccountSid&gt; &lt;To&gt;0XXXXX30240&lt;/To&gt; &lt;From&gt;0XXXXX85175&lt;/From&gt; &lt;PhoneNumberSid&gt;0XXXXXX4890&lt;/PhoneNumberSid&gt; &lt;Status&gt;completed&lt;/Status&gt; &lt;StartTime&gt;2016-11-29 15:59:10&lt;/StartTime&gt; &lt;EndTime&gt;2016-11-29 15:59:27&lt;/EndTime&gt; &lt;Duration&gt;17&lt;/Duration&gt; &lt;Price&gt;1.500&lt;/Price&gt; &lt;Direction&gt;outbound-api&lt;/Direction&gt; &lt;AnsweredBy&gt;human&lt;/AnsweredBy&gt; &lt;ForwardedFrom&gt;&lt;/ForwardedFrom&gt; &lt;CallerName&gt;&lt;/CallerName&gt; &lt;Uri&gt;/v1/Accounts/Exotel/Calls/b6cfaf5f5cef3ca0fc937749ef96d245&lt;/Uri&gt; &lt;RecordingUrl&gt;https://s3-ap-southeast-1.amazonaws.com/exotelrecordings/Exotel/b6cfaf5f5cef3ca0fc937749ef96d245.mp3&lt;/RecordingUrl&gt; &lt;Details&gt; &lt;ConversationDuration&gt;8&lt;/ConversationDuration&gt; &lt;Leg1Status&gt;completed&lt;/Leg1Status&gt; &lt;Leg2Status&gt;completed&lt;/Leg2Status&gt; &lt;Legs&gt; &lt;Leg&gt; &lt;Id&gt;1&lt;/Id&gt; &lt;OnCallDuration&gt;21&lt;/OnCallDuration&gt; &lt;/Leg&gt; &lt;Leg&gt; &lt;Id&gt;2&lt;/Id&gt; &lt;OnCallDuration&gt;8&lt;/OnCallDuration&gt; &lt;/Leg&gt; &lt;/Legs&gt; &lt;/Details&gt; &lt;/Call&gt; &lt;/TwilioResponse&gt;</pre> </div> </div> </div> <div class="wrapper-list"> <p>Description of parameters mentioned in the above response:</p> <table class="table table-hover table-responsive table-bordered" style="width: 100%;"> <tbody> <tr> <td style="width: 22.1445%;">Parameter Name</td> <td style="width: 76.9231%;">Value</td> </tr> <tr> <td style="width: 22.1445%;">ConversationDuration</td> <td style="width: 76.9231%;">The duration for the From and To phone numbers on call in seconds</td> </tr> <tr> <td style="width: 22.1445%;">Leg1Status</td> <td style="width: 76.9231%;"> <p>Status of the first leg of the call. Can be one of</p> <ul> <li>queued - The call is ready and waiting in line before going out</li> <li>ringing - The call is currently in-flight</li> <li>in-progress - The call was answered and is currently in progress</li> <li>completed - The call was answered and has ended normally</li> <li>busy - The caller received a busy signal</li> <li>failed - The call could not be completed as dialled, most likely because the phone number was non-existent</li> <li>no-answer - The call ended without being answered</li> <li>canceled - The call was canceled while queued or ringing</li> </ul> </td> </tr> <tr> <td style="width: 22.1445%;">Leg2Status</td> <td style="width: 76.9231%;"> <p>Status of the second leg of the call. Can be one of</p> <ul> <li>completed - The call was answered and has ended normally</li> <li>busy - The caller received a busy signal</li> <li>no-answer - The call ended without being answered</li> <li>failed - The call could not be completed as dialed, most likely because the phone number was non-existent</li> <li>canceled - The call was canceled while queued or ringing</li> <li>null (empty) - The call did not have a second leg</li> </ul> </td> </tr> <tr> <td style="width: 22.1445%;">Legs</td> <td style="width: 76.9231%;"> <p>Status of individual legs of the call. Contains the following information (per leg):</p> <ul> <li>Id - Indicates the leg. Can be 1 or 2.</li> <li>OnCallDuration - Indicates the duration that this leg was on a call (see below for more information on how this is calculated).</li> </ul> </td> </tr> </tbody> </table> <p>The following diagram illustrates how the call duration is calculated for a call and its constituent legs.</p> </div> <img class="image-responsive center-block fix-img" width="85%" height="100%" src="https://developer.exotel.com/wp-content/uploads/2019/10/RecordingDuration-1.svg" alt="" width="100%"> <hr> </section> <section class="sectionAPIClass" id="statuscallback"> <h1 >StatusCallback </h1> <div class="alert alert-info" role="alert"> <p>StatusCallBack delivery may <span class="gmail_default">be delayed or have failures </span>due to <span class="gmail_default">multiple </span>reasons like &#8211; network connectivity, customer web hook uptime, server failures, etc. Customers are advised to<span class="gmail_default"> implement </span>fallback to <a href="https://developer.exotel.com/api/make-a-call-api#call-details">call details API</a> f<span class="gmail_default">or</span> fetch<span class="gmail_default">ing</span> the call status.  </p> </div> <div class="wrapper-list"> <div class="wrapper-list"> <p>Exotel will perform an asynchronous HTTP request to the StatusCallback URL you have specified in your request (if any) once the call completes. List of parameters which will be sent as part of StatusCallback:</p> </div> <div class="wrapper-list"> <table class="table table-hover table-responsive table-bordered" class="table table-hover table-responsive table-bordered" style="width: 100%;"> <tbody> <tr> <td style="width: 17.1296%;">Parameter Name</td> <td style="width: 81.9444%;">Type &amp; Value</td> </tr> <tr> <td style="width: 17.1296%;">CallSid</td> <td style="width: 81.9444%;">string; an alpha-numeric unique identifier of the call</td> </tr> <tr> <td style="width: 17.1296%;">DateUpdated</td> <td style="width: 81.9444%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time at which the status of the call was last updated in our system</td> </tr> <tr> <td style="width: 17.1296%;">Status</td> <td style="width: 81.9444%;">Overall call status, which could be one of: 'completed', 'failed', 'busy' or 'no-answer'</td> </tr> <tr> <td style="width: 17.1296%;">RecordingUrl</td> <td style="width: 81.9444%;">Link to the call recording if present.</td> </tr> </tbody> </table> <p>List of additional fields which will be sent if 'terminal' and/or ‘answered’ event is subscribed using 'StatusCallbackEvents' in the request:</p> <table class="table table-hover table-responsive table-bordered" class="table table-hover table-responsive table-bordered" style="width: 100%;"> <tbody> <tr> <td style="width: 22.3379%;">Parameter Name</td> <td style="width: 76.7362%;">Type &amp; Value</td> </tr> <tr> <td style="width: 22.3379%;">EventType</td> <td style="width: 76.7362%;"> <p>String; This will be the type of event for which 'StatusCallback' is triggered for and subscribed using 'StatusCallbackEvents'.</p> <p>Currently, only ‘terminal’ and ‘answered’ as an event is supported which is triggered once the call is over. However, more events can be added in the future.</p> </td> </tr> <tr> <td style="width: 22.3379%;">DateCreated</td> <td style="width: 76.7362%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time at which the user initiated the API</td> </tr> <tr> <td style="width: 22.3379%;">To</td> <td style="width: 76.7362%;">Your customer's phone number as set in the API request. This number will be connected after `From`.</td> </tr> <tr> <td style="width: 22.3379%;">From</td> <td style="width: 76.7362%;">The phone number that was attempted to be called first.</td> </tr> <tr> <td style="width: 22.3379%;">PhoneNumberSid</td> <td style="width: 76.7362%;">This is your ExoPhone's unique identifier.</td> </tr> <tr> <td style="width: 22.3379%;">StartTime</td> <td style="width: 76.7362%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time when the call request was initiated to the operator</td> </tr> <tr> <td style="width: 22.3379%;">EndTime</td> <td style="width: 76.7362%;">Time in format YYYY-MM-DD HH:mm:ss; Date and time when the call was completed</td> </tr> <tr> <td style="width: 22.3379%;">ConversationDuration</td> <td style="width: 76.7362%;">The duration for the time `From` and `To` phone numbers were on call in seconds.</td> </tr> <tr> <td style="width: 22.3379%;">Direction</td> <td style="width: 76.7362%;"> <p>Can be:</p> <ul> <li>inbound - Incoming call</li> <li>outbound-dial - Outbound calls from Exotel dashboard</li> <li>outbound-api - All other Outbound calls (API, campaign etc.)</li> </ul> </td> </tr> <tr> <td style="width: 22.3379%;">CustomField</td> <td style="width: 76.7362%;">The value that was passed in the CustomField parameter of the API (if set during the request) will be populated here.</td> </tr> <tr> <td style="width: 22.3379%;">Legs</td> <td style="width: 76.7362%;"> <p>An array which will denote detailed information about each leg attempt involved in the call.</p> <ul> <li>Legs[i]: `i` denotes the index of the number in order it is attempted. If there are multiple numbers attempted, array’s length will be equal to total attempts. In case of outgoing call connecting two numbers, `i` will be have possible values of 0 and 1. 0th index will represent 'From' leg and 1st index will be represent 'To' leg.</li> <li>OnCallDuration: Indicates the duration that this leg was on a call. This value could be 0 if the call was not picked up by the respective leg.</li> <li>Status: This denotes the terminal status of the particular leg of the call. Can be: <ul> <li>completed - The call was answered by the leg.</li> <li>busy - A busy signal was returned by the leg.</li> <li>failed - The call could not be completed as dialled, most likely because the phone number was non-existent.</li> <li>no-answer - The call ended without being answered.</li> <li>canceled - The call was canceled while queued or ringing.</li> <li>null (empty) - The call to that leg was not even attempted.</li> </ul> </li> </ul> <p>For understanding more about leg-wise call status, refer <a href="https://support.exotel.com/support/solutions/articles/27323-call-status">here</a>.</p> <p>Sample:<br /> Legs[0][Status]= “completed”<br /> Legs[0][OnCallDuration]= 29</p> </td> </tr> </tbody> </table> </div> <div class="alert alert-info" role="alert"> </div> </div> <div class="alert alert-info" role="alert"> <p>Additional StatusCallback fields are currently only supported if both ‘From’ and ‘To’ are set. StatusCallbackEvents parameter is not applicable for <a class="" href="https://developer.exotel.com/api/make-a-call-api#call-customer">this</a> case i.e. if ‘VoiceUrl’ is used. However, <a href="https://developer.exotel.com/applet/#passthru" target="_BLANK">passthru applet</a> can be utilised if ‘VoiceUrl’ is used.</p> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Example Request (using StatusCallback)</li> <li role="presentation" class="active"><a href="#callagent-7-4-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">cURL</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-7-4-1"> <pre class="prettyprint lang-bsh" class="prettyprint lang-bsh prettyprinted"><span class="pln">curl </span><span class="pun">-</span><span class="pln">XPOST https</span><span class="pun">://&lt;</span><span class="pln">your_api_key</span><span class="pun">&gt;:&lt;</span><span class="pln">your_api_token</span><span class="pun">&gt;&lt;</span><span class="pln">subdomain</span><span class="pun">&gt;/</span><span class="pln">v1</span><span class="pun">/</span><span class="typ">Accounts</span><span class="pun">/&lt;</span><span class="pln">your_sid</span><span class="pun">&gt;/</span><span class="typ">Calls</span><span class="pun">/</span><span class="pln">connect \ </span><span class="pun">-</span><span class="pln">d </span><span class="str">"From=+91941374XXXX"</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">d </span><span class="str">"To=+91886799XXXX"</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">d </span><span class="str">"CallerId=0113083XXXX"</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">d </span><span class="str">"StatusCallback=http://your-application.com/exotel-callback"</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">d </span><span class="str">"StatusCallbackEvents[0]=terminal"</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">d </span><span class="str">"StatusCallbackContentType=application/json"</span></pre> </div> </div> </div> <div> <ul class="nav nav-pills" role="tablist"> <li class="request">Sample StatusCallback payload for 'terminal' event</li> <li role="presentation" class="active"><a href="#callagent-7-5-1" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">application/json</a></li> <li role="presentation" class=""><a href="#callagent-7-5-2" aria-controls="curl" role="tab" data-toggle="tab" aria-expanded="true">multipart/form-data</a></li> </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane copy-text active" id="callagent-7-5-1"> <pre class="prettyprint" class="prettyprint prettyprinted"><span class="pun">{</span> <span class="str">"CallSid"</span><span class="pun">:</span> <span class="str">"492205107c5fb48f4ac25d1f77759339"</span><span class="pun">,</span> <span class="str">"EventType"</span><span class="pun">:</span> <span class="str">"terminal"</span><span class="pun">,</span> <span class="str">"DateCreated"</span><span class="pun">:</span> <span class="str">"2019-04-08 03:17:59"</span><span class="pun">,</span> <span class="str">"DateUpdated"</span><span class="pun">:</span> <span class="str">"2019-04-08 03:18:35"</span><span class="pun">,</span> <span class="str">"Status"</span><span class="pun">:</span> <span class="str">"no-answer"</span><span class="pun">,</span> <span class="str">"To"</span><span class="pun">:</span> <span class="str">"+91886799XXXX"</span><span class="pun">,</span> <span class="str">"From"</span><span class="pun">:</span> <span class="str">"+91941374XXXX"</span><span class="pun">,</span> <span class="str">"PhoneNumberSid"</span><span class="pun">:</span> <span class="str">"0113083XXXX"</span><span class="pun">,</span> <span class="str">"StartTime"</span><span class="pun">:</span> <span class="str">"2019-04-08 03:17:59"</span><span class="pun">,</span> <span class="str">"EndTime"</span><span class="pun">:</span> <span class="str">"2019-04-08 03:18:36"</span><span class="pun">,</span> <span class="str">"Direction"</span><span class="pun">:</span> <span class="str">"outbound-api"</span><span class="pun">,</span> <span class="str">"RecordingUrl"</span><span class="pun">:</span> <span class="str">"https://s3-ap-southeast-1.amazonaws.com/exotelrecordings/&lt;your_sid&gt;/492205107c5fb48f4ac25d1f77759339.mp3"</span><span class="pun">,</span> <span class="str">"ConversationDuration"</span><span class="pun">:</span> <span class="lit">32</span><span class="pun">,</span> <span class="str">"Legs"</span><span class="pun">:</span> <span class="pun">[</span> <span class="pun">{</span> <span class="str">"OnCallDuration"</span><span class="pun">:</span> <span class="lit">41</span><span class="pun">,</span> <span class="str">"Status"</span><span class="pun">:</span> <span class="str">"completed"</span> <span class="pun">},</span> <span class="pun">{</span> <span class="str">"OnCallDuration"</span><span class="pun">:</span> <span class="lit">32</span><span class="pun">,</span> <span class="str">"Status"</span><span class="pun">:</span> <span class="str">"completed"</span> <span class="pun">}</span> <span class="pun">]</span> <span class="pun">}</span></pre> </div> <div role="tabpanel" class="tab-pane copy-text " id="callagent-7-5-2"> <pre class="prettyprint" class="prettyprint prettyprinted"><span class="typ">CallSid</span><span class="pun">:</span> <span class="lit">492205107c5fb48f4ac25d1f77759339</span> <span class="typ">EventType</span><span class="pun">:</span><span class="pln"> terminal </span><span class="typ">From</span><span class="pun">:</span> <span class="pun">+</span><span class="lit">91941374XXXX</span> <span class="typ">To</span><span class="pun">:</span> <span class="pun">+</span><span class="lit">91886799XXXX</span> <span class="typ">PhoneNumberSid</span><span class="pun">:</span> <span class="lit">0113083XXXX</span> <span class="typ">Status</span><span class="pun">:</span> <span class="kwd">no</span><span class="pun">-</span><span class="pln">answer </span><span class="typ">Direction</span><span class="pun">:</span><span class="pln"> outbound</span><span class="pun">-</span><span class="pln">api </span><span class="typ">DateCreated</span><span class="pun">:</span> <span class="lit">2019</span><span class="pun">-</span><span class="lit">04</span><span class="pun">-</span><span class="lit">08</span> <span class="lit">03</span><span class="pun">:</span><span class="lit">10</span><span class="pun">:</span><span class="lit">55</span> <span class="typ">DateUpdated</span><span class="pun">:</span> <span class="lit">2019</span><span class="pun">-</span><span class="lit">04</span><span class="pun">-</span><span class="lit">08</span> <span class="lit">03</span><span class="pun">:</span><span class="lit">11</span><span class="pun">:</span><span class="lit">28</span> <span class="typ">StartTime</span><span class="pun">:</span> <span class="lit">2019</span><span class="pun">-</span><span class="lit">04</span><span class="pun">-</span><span class="lit">08</span> <span class="lit">03</span><span class="pun">:</span><span class="lit">10</span><span class="pun">:</span><span class="lit">55</span> <span class="typ">EndTime</span><span class="pun">:</span> <span class="lit">2019</span><span class="pun">-</span><span class="lit">04</span><span class="pun">-</span><span class="lit">08</span> <span class="lit">03</span><span class="pun">:</span><span class="lit">11</span><span class="pun">:</span><span class="lit">30</span> <span class="typ">RecordingUrl</span><span class="pun">:</span> <span class="typ">ConversationDuration</span><span class="pun">:</span> <span class="lit">0</span> <span class="typ">Legs</span><span class="pun">[</span><span class="lit">0</span><span class="pun">][</span><span class="typ">Status</span><span class="pun">]:</span> <span class="kwd">no</span><span class="pun">-</span><span class="pln">answer </span><span class="typ">Legs</span><span class="pun">[</span><span class="lit">0</span><span class="pun">][</span><span class="typ">OnCallDuration</span><span class="pun">]:</span> <span class="lit">0</span> <span class="typ">Legs</span><span class="pun">[</span><span class="lit">1</span><span class="pun">][</span><span class="typ">Status</span><span class="pun">]:</span> <span class="typ">Legs</span><span class="pun">[</span><span class="lit">1</span><span class="pun">][</span><span class="typ">OnCallDuration</span><span class="pun">]:</span> <span class="lit">0</span></pre> </div> </div> </div> <hr> </section> </div> </div> <div class="row"> <footer id="footer"> <div class="container"> <div class="row"> <div class="col-sm-3"><img class="footer-logo" src="https://developer.exotel.com/wp-content/uploads/2019/10/exotel-footer-logo-2.svg" alt=""> </div> <div class="col-sm-6"> <ul class="list-inline footer-links"> <li><a href="https://exotel.com/about-us/">About Exotel</a></li> <li><a href="https://exotel.com/careers/">Careers</a></li> <li><a href="https://exotel.com/privacy-policy/">Privacy Policy</a></li> <li><a href="https://exotel.com/terms-of-service/">Terms of Service</a></li> <li><a href="http://support.exotel.in/support/home">Support</a></li> <li><a href="https://exotel.com/contact/">Contact</a></li> </ul> </div> <div class="col-sm-3 copyrights"> &copy 2024Exotel Telecom Pvt. Ltd.</div> </div> </div> </footer> </div> <script src="https://cdn-in.pagesense.io/js/exotel/c6a655fb28364a0d82a2e6874dbec9c0.js"></script> <!-- Google Tag Manager (noscript) snippet added by Site Kit --> <noscript> <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TSLF3FD" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> <!-- End Google Tag Manager (noscript) snippet added by Site Kit --> <script type='text/javascript' src='https://developer.exotel.com/wp-includes/js/dist/vendor/regenerator-runtime.min.js?ver=0.13.7' id='regenerator-runtime-js'></script> <script type='text/javascript' src='https://developer.exotel.com/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=3.15.0' id='wp-polyfill-js'></script> <script type='text/javascript' id='contact-form-7-js-extra'> /* <![CDATA[ */ var wpcf7 = {"api":{"root":"https:\/\/developer.exotel.com\/wp-json\/","namespace":"contact-form-7\/v1"},"cached":"1"}; var wpcf7 = {"api":{"root":"https:\/\/developer.exotel.com\/wp-json\/","namespace":"contact-form-7\/v1"},"cached":"1"}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.exotel.com/wp-content/plugins/contact-form-7/includes/js/index.js?ver=5.5.3' id='contact-form-7-js'></script> <script type='text/javascript' src='https://developer.exotel.com/wp-includes/js/jquery/ui/core.min.js?ver=1.12.1' id='jquery-ui-core-js'></script> <script type='text/javascript' src='https://developer.exotel.com/wp-includes/js/jquery/ui/datepicker.min.js?ver=1.12.1' id='jquery-ui-datepicker-js'></script> <script type='text/javascript' id='jquery-ui-datepicker-js-after'> jQuery(document).ready(function(jQuery){jQuery.datepicker.setDefaults({"closeText":"Close","currentText":"Today","monthNames":["January","February","March","April","May","June","July","August","September","October","November","December"],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"nextText":"Next","prevText":"Previous","dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dayNamesMin":["S","M","T","W","T","F","S"],"dateFormat":"MM d, yy","firstDay":1,"isRTL":false});}); jQuery(document).ready(function(jQuery){jQuery.datepicker.setDefaults({"closeText":"Close","currentText":"Today","monthNames":["January","February","March","April","May","June","July","August","September","October","November","December"],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"nextText":"Next","prevText":"Previous","dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dayNamesMin":["S","M","T","W","T","F","S"],"dateFormat":"MM d, yy","firstDay":1,"isRTL":false});}); </script> <script type='text/javascript' src='https://developer.exotel.com/wp-content/themes/exotel/assets/js/scripts.js?ver=5.8.10' id='script-js'></script> <script type='text/javascript' src='https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js?ver=5.8.10' id='prettify-js'></script> <script type='text/javascript' src='https://developer.exotel.com/wp-includes/js/clipboard.min.js?ver=5.8.10' id='clipboard-js'></script> <script type='text/javascript' src='https://developer.exotel.com/wp-content/themes/exotel/assets/js/doc/custom.js?ver=5.8.10' id='custom-js'></script> <script type='text/javascript' src='https://developer.exotel.com/wp-content/themes/exotel/script.js?ver=5.8.10' id='des_script-js'></script> <script> window.fwSettings={ 'widget_id':3000000035 }; !function(){if("function"!=typeof window.FreshworksWidget){var n=function(){n.q.push(arguments)};n.q=[],window.FreshworksWidget=n}}() // collapase accordins var colhold=""; function funcollapse(x){ $(".coll-in").hide(); $(".icond").show(); $(".iconu").hide(); console.log(x) if(colhold==x){ // $(x).hide(); document.getElementById(x+"icond").style.display = ""; document.getElementById(x +"iconu").style.display = "none"; $(x).removeClass('collapsed'); document.getElementById(x).style.display = "none"; colhold=""; }else { // console.log(x+"icon") $(x).addClass('collapsed'); document.getElementById(x+"icond").style.display = "none"; document.getElementById(x +"iconu").style.display = ""; document.getElementById(x).style.display = ""; colhold=x; } // console.log(x,colhold) } </script> <script type='text/javascript' src='https://widget.freshworks.com/widgets/3000000035.js' async defer></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10