Voice Service Call Log
  • 15 Sep 2022
  • 2 Minutes to read
  • Dark
    Light

Voice Service Call Log

  • Dark
    Light

Article summary

Voice Service Call Log

VoiceBot Call Log JSON Format

VoiceBot Call Log is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the Voicebot Call Log.
fromstringPhone number or SIP URI.
tostringPhone number or SIP URI.
voicebotIdguidId of the Voicebot.
transferredTimedatetimeonly happens when a call is transferred.
statusenumAllowed values are completed, transferred.
startTimedatetimeStart Time.
callDurationintegerCall duration, expressed in seconds
transferredTostringId of the Voicebot Call Log.
recordingFileURLstringThe recording file will be compressed into MP3 format to save space, and uploaded to the S3 storage server of AWS, and the URL will be saved in the field.
transcriptTextRecord[]JSON format. The text record list of this call, including the content, the start time, and the speaker of each sentence.

VoiceBot Text Record Json Format

VoiceBot Call Log is represented as simple flat JSON objects with the following keys:

NameTypeDescription
roleenumThe role that generated this record.Allowed values are voiceBot, visitor, system
namestringThe name of role Voice Bot or user phonenumber or user sipuri
textstringRecord content. when type is text,it represents text record content;when type is dtmf,it represents dtmf input;when type is audio, it represents audio name.
timetimestart time.
typeenumAllowed values are recordingStarted, recordingPaused, recordingResumed, recordingStoppedtextdtmf,audio.

Get the list of Voice Call Log

GET voiceservice/voiceCallLogs

  • Parameters:

Request body
The request body contains data with the follow structure:

NameTypeRequiredDefaultDescription
channelenumyestype of the channel, including Twilio, SIP
channelIdentifierstringyesThe Unique ID corresponding to voicebotId,such as phone number,SIP URI
  • Response:

An array of Voice Call Log

  • Example

Sample Request:

curl https://api11.comm100.io/v4/voiceservice/voiceCallLogs \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "voiceCallLogs": [
     {
          "id": "eefe4538-bec3-47ef-89ea-879b59a16941",
          "from": "+184640930943",
          "to": "+184640930967",
          "voicebotId": "q3f5b438-xw31-44af-b729-64swaf3d0b56",
          "transferredTime": "",
          "status": "completed",
          "startTime": "2021-05-06T08:29:00.973Z",
          "callDuration": 10,
          "transferredTo":"",
          "recordingFileURL":"https://aws.amazone.com/eefe4538-bec3-47ef-89ea-879b59a16941.wav",
          "transcript": [{"role":"voiceBot","name":"Voice Bot","time":"00:00:02.3423523","text":"Hello, this is echo bot. I\"ll repeat what you say. You can start talking now.","type":"text"},
                            {"role":"visitor","name":"visitor","time":"00:00:05.3423523","text":"hello","type":"text"},
                            {"role":"voiceBot","name":"Voice Bot","time":"00:00:05.3423523","text":"hello","type":"text"},
                            {"role":"visitor","name":"+18448586997","time":"00:00:11.3423523","text":"nice to meet you","type":"text"},
                            {"role":"voiceBot","name":"Voice Bot","time":"00:00:11.3423523","text":"nice to meet you","type":"text"},
                            {"role":"visitor","name":"+18448586997","time":"00:00:15.3423523","text":"goodbye","type":"text"},
                            {"role":"voiceBot","name":"Voice Bot","time":"00:00:15.3423523","text":"goodbye","type":"text"},
                            {"role":"system","name":"","time":"00:00:15.3423523","text":"","type":"recordingStarted"},
                            {"role":"system","name":"","time":"00:00:15.3423523","text":"","type":"recordingPaused"},
                            {"role":"system","name":"","time":"00:00:15.3423523","text":"","type":"recordingResumed"},
                            {"role":"system","name":"","time":"00:00:15.3423523","text":"","type":"recordingStopped"},
                            {"role":"visitor","name":"+18448586997","time":"00:00:15.3423523","text":"1234","type":"dtmf"}],
          "isSentimentAnalysisEnabled": "true",
          "veryNegativeMessages": 2,
          "negativeMessages":10,   
      }
  ],
  "nextPage": null,
  "previousPage": null,
  "total": 1
} 

Get a single Voice Call Log

GET voiceservice/voiceCallLogs/{id}

  • Parameters:

Path parameters

NameTypeRequiredDescription
idstringOriginal Call ID
  • Response:

VoiceBot Call Log

  • Example

Sample Request:

curl https://api11.comm100.io/v4/voiceservice/voiceCallLogs/eefe4538-bec3-47ef-89ea-879b59a16941 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

     {
          "id": "eefe4538-bec3-47ef-89ea-879b59a16941",
          "from": "+184640930943",
          "to": "+184640930967",
          "voicebotId": "q3f5b438-xw31-44af-b729-64swaf3d0b56",
          "transferredTime": "",
          "status": "completed",
          "startTime": "2021-05-06T08:29:00.973Z",
          "callDuration": 10,
          "transferredTo":"",
          "recordingFileURL":"https://aws.amazone.com/eefe4538-bec3-47ef-89ea-879b59a16941.wav",
          "transcript": [{"role":"voiceBot","name":"Voice Bot","time":"00:00:02.3423523","text":"Hello, this is echo bot. I\"ll repeat what you say. You can start talking now.","type":"text"},
                            {"role":"visitor","name":"visitor","time":"00:00:05.3423523","text":"hello","type":"text"},
                            {"role":"voiceBot","name":"Voice Bot","time":"00:00:05.3423523","text":"hello","type":"text"},
                            {"role":"visitor","name":"+18448586997","time":"00:00:11.3423523","text":"nice to meet you","type":"text"},
                            {"role":"voiceBot","name":"Voice Bot","time":"00:00:11.3423523","text":"nice to meet you","type":"text"},
                            {"role":"visitor","name":"+18448586997","time":"00:00:15.3423523","text":"goodbye","type":"text"},
                            {"role":"voiceBot","name":"Voice Bot","time":"00:00:15.3423523","text":"goodbye","type":"text"},
                            {"role":"system","name":"","time":"00:00:15.3423523","text":"","type":"recordingStarted"},
                            {"role":"system","name":"","time":"00:00:15.3423523","text":"","type":"recordingPaused"},
                            {"role":"system","name":"","time":"00:00:15.3423523","text":"","type":"recordingResumed"},
                            {"role":"system","name":"","time":"00:00:15.3423523","text":"","type":"recordingStopped"},
                            {"role":"visitor","name":"+18448586997","time":"00:00:15.3423523","text":"1234","type":"dtmf"}],
          "isSentimentAnalysisEnabled": "true",
          "veryNegativeMessages": 2,
          "negativeMessages":10,   
      }
© 2021 | Comm100

Was this article helpful?

What's Next