question

$$ANON_USER$$ avatar image
$$ANON_USER$$ asked

Recording webhook for calls made in webrtc

I'm creating an app click to call for csr to call leads. After the call is made, I want to get the recording and upload it to the CRM and delete it in telnyx. How do i do that?

outgoing-calls
2 comments
10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

klane@telnyx.com avatar image klane@telnyx.com ♦♦ commented ·

Thanks for your message. It is important to understand the processes and commands. I believe I have found your request made via one of our forms with a little more info so I will leave it here for reference:

"I want to switch from Twilio to Telnyx. I want to build click-to-call in the browser WebRTC call. CSR clicks on icon in browser, the call is made to customer, after the call, it calls on recording webhook with custom variables, so I know where which customer to attach that recording to, and then delete the recording off of Telnyx. How do I do that?"

0 Likes 0 ·
klane@telnyx.com avatar image klane@telnyx.com ♦♦ commented ·

I am having our Dev team look into it now.

0 Likes 0 ·

1 Answer

·
vidhan avatar image
vidhan answered

Hi!
Start a call via WebRTC, and as it begins, make a request via Call Control to start the recording for that specific call id
Following are the steps to record a call -

  1. Initial setup steps

  2. Start the call recording

  3. Stop call recording

You will receive a URL in the call.recording.saved webhook like this-

 {
   "data": {
     "event_type": "call.recording.saved",
     "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
     "occurred_at": "2018-02-02T22:25:27.521992Z",
     "payload": {
       "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ",
       "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1",
       "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1",
       "channels": "single",
       "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
       "connection_id": "7267xxxxxxxxxxxxxx",
       "public_recording_urls": {
         "mp3": "http://example.com/recording.mp3",
         "wav": "http://example.com/recording.wav"
       },
       "recording_ended_at": "2018-02-02T22:20:27.521992Z",
       "recording_started_at": "2018-02-02T22:20:27.521992Z",
       "recording_urls": {
         "mp3": "http://example.com/recording.mp3",
         "wav": "http://example.com/recording.wav"
       }
     },
     "record_type": "event"
   }
 }

You can get the recording from above mentioned URL and save it in your CRM.

For deleting the recording, there are following ways -

  1. v1 API endpoint for deleting recordings
  2. Recordings can also be deleted in the portal UI.

10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Manage Your Content