VoiceBot Call Log
  • 15 Sep 2022
  • 4 Minutes to read
  • Dark
    Light

VoiceBot Call Log

  • Dark
    Light

Article summary

VoiceBot 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 VoiceBot Call Log

GET voicebot/voicebotCallLogs

  • Parameters:

No Parameters

  • Response:

An array of VoiceBot Call Log

  • Example

Sample Request:

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

Response:

HTTP/1.1 200 OK

{
  "voicebotCallLogs": [
      {
          "id": "eefe4538-bec3-47ef-89ea-879b59a16941",
          "from": "",
          "to": "",
          "voicebotId": "",
          "transferredTime": "",
          "status": "",
          "startTime": "",
          "callDuration": 1,
          "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"}],
      }
  ],
  "nextPage": null,
  "previousPage": null,
  "total": 1
} 

Get a single VoiceBot Call Log

GET voicebot/voicebotCallLogs/{id}

  • Parameters:

No Parameters

  • Response:

VoiceBot Call Log

  • Example

Sample Request:

curl https://api11.comm100.io/v4/voicebot/voicebotCallLogs/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": "",
  "to": "",
  "voicebotId": "",
  "transferredTime": "",
  "status": "",
  "startTime": "",
  "callDuration": 1,
  "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"}]
} 

Create a new VoiceBot Call Log

POST voicebot/voicebotCallLogs

  • Parameters:

NameTypeinRequiredDescription
fromstringbodyyesPhone number or SIP URI.
tostringbodyyesPhone number or SIP URI.
voicebotIdguidbodynoId of the Voicebot.
transferredTimedatetimebodynoonly happens when a call is transferred.
statusenumbodynoAllowed values are completed, transferred.
startTimedatetimebodynoStart Time.
callDurationintegerbodynoCall duration, expressed in seconds
transferredTostringbodynoId of the Voicebot Call Log.
  • Response:

VoiceBot Call Log

  • Example

Sample Request:

curl https://api11.comm100.io/v4/voicebot/voicebotCallLogs \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"from":"","to":"","voicebotId":"","transferredTime":"","status":"","startTime":"","callDuration":1,"transferredTo":""}' 

Response:

HTTP/1.1 201 Created

{
  "id": "eefe4538-bec3-47ef-89ea-879b59a16941",
  "from": "",
  "to": "",
  "voicebotId": "",
  "transferredTime": "",
  "status": "",
  "startTime": "",
  "callDuration": 1,
  "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"}]
} 

Update the VoiceBot Call Log

PUT voicebot/voicebotCallLogs/{id}

  • Parameters:

NameTypeinRequiredDescription
fromstringbodyyesPhone number or SIP URI.
tostringbodyyesPhone number or SIP URI.
voicebotIdguidbodynoId of the Voicebot.
transferredTimedatetimebodynoonly happens when a call is transferred.
statusenumbodynoAllowed values are completed, transferred.
startTimedatetimebodynoStart Time.
callDurationintegerbodynoCall duration, expressed in seconds
transferredTostringbodynoId of the Voicebot Call Log.
  • Response:

VoiceBot Call Log

  • Example

Sample Request:

curl https://api11.comm100.io/v4/voicebot/voicebotCallLogs/eefe4538-bec3-47ef-89ea-879b59a16941 \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"from":"","to":"","voicebotId":"","transferredTime":"","status":"","startTime":"","callDuration":1,"transferredTo":""}' 

Response:

HTTP/1.1 200 OK

{
  "id": "eefe4538-bec3-47ef-89ea-879b59a16941",
  "from": "",
  "to": "",
  "voicebotId": "",
  "transferredTime": "",
  "status": "",
  "startTime": "",
  "callDuration": 1,
  "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"}],
} 

Remove the VoiceBot Call Log

DELETE voicebot/voicebotCallLogs/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

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

Response:

HTTP/1.1 204 No Content

© 2021 | Comm100

Was this article helpful?

What's Next