get_call_history

A get_call_history request will return a call's participants, start/stop times, duration and final status.


Parameter
Purpose
dnumber
Name field identifying the call's destination number
dnumber_no Number field identifying the call's destination number
snumber Text field identifying the call's sender name
snumber_no Numeric field identifying the call's sender number
start Unix start time
end Unix end time
totaltime Total time of call in seconds. Note: "Unix time" is a standard for measuring time based on the number of seconds that have passed since the start of Thursday, 1 January 1970.
direction The call's direction. Possible values include 'in' or 'out'
status The call's final status. Possible values include 'answer', 'cancel' or leave blank for any status.


  • dnumber (the “destination number”) will usually be the same as dnumber_no, because the system does not have a description or caller_name for outgoing calls.  
  • The Snumber is the caller name (that is, the internal extension number description initiating the call) and snumber_no is its seven digit telephone ID.
  • Inside the response, expect to receive one of the following statuses.  'noanswer', 'cancel', 'answer', 'congestion', 'busy'.


Sample Request - The dnumber ID can be made up of either text or a number
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:TelebroadWebServices">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:get_call_history soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <username xsi:type="xsd:string">usernamehere</username>
         <password xsi:type="xsd:string">passwordhere</password>
         <dnumber xsi:type="xsd:int">2125551234</dnumber>
     <direction xsi:type="xsd:int">in</direction>
      </urn:get_call_history>
   </soapenv:Body>
</soapenv:Envelope>



Sample Response of Incoming Call. Note that, in this example, the call was not delivered to the phone directly, but through a Hunt Group.
<item xsi:type="tns:call_history_item">
               <start xsi:type="xsd:int">1385493711</start>
               <end xsi:type="xsd:int">1385493726</end>
               <status xsi:type="xsd:string">cancel</status>
               <direction xsi:type="xsd:string">in</direction>
               <totaltime xsi:type="xsd:int">15</totaltime>
               <dnumber xsi:type="xsd:string">General hunt group</dnumber>
               <dnumber_no xsi:type="xsd:string">3</dnumber_no>
               <snumber xsi:type="xsd:string">WALGREEN DRUG S</snumber>
               <snumber_no xsi:type="xsd:string">19549750553</snumber_no>
            </item>



Sample Response of Outgoing Call
<item xsi:type="tns:call_history_item">
               <start xsi:type="xsd:int">1385493575</start>
               <end xsi:type="xsd:int">1385493580</end>
               <status xsi:type="xsd:string">cancel</status>
               <direction xsi:type="xsd:string">out</direction>
               <totaltime xsi:type="xsd:int">5</totaltime>
               <dnumber xsi:type="xsd:string">17187820675</dnumber>
               <dnumber_no xsi:type="xsd:string">17187820675</dnumber_no>
               <snumber xsi:type="xsd:string">1014 Rita</snumber>
               <snumber_no xsi:type="xsd:string">2253862</snumber_no>
            </item>


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.