Skip to main content

Connect to a SIP connection to get Speech to Text and AI Insights

Connect to a call#

The following code example shows how you can connect the Telephony API to your cell phone (or any other type of phone number). Making a phone call is also the quickest way to test Symbl’s Telephony API. It can make an outbound call to a phone number using SIP endpoints that can be accessed over the internet using a SIP URI.

Code Example#

info

The Symbl SDK (Node.js) snippet must be run using Node.js, while the Native Javascript snippet can be run in your web browser.

curl -k -X POST "https://api.symbl.ai/v1/endpoint:connect" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $AUTH_TOKEN" \
-d $'{
"operation": "start",
"endpoint": {
"type": "sip",
"uri": "sip:555@your_sip_domain", // SIP URI to dial in
"audioConfig": { // Optionally any audio configuration
"sampleRate": 16000,
"encoding": "PCMU",
"sampleSize": "16"
}
},
"actions": [{
"invokeOn": "stop",
"name": "sendSummaryEmail",
"parameters": {
"emails": [
"'$EMAIL_ADDRESS'"
]
}
}],
"data" : {
"session": {
"name" : "My Meeting"
}
}
}'

Testing#

Open up your shell terminal and copy and paste the command. Replace the placeholder values with the proper values and hit enter.

Running this code should connect our API to your phone call. Once the call is completed you will receive an email that details the conversation and provides you with a transcription and Insights about the call.

info

If you have any questions or concerns about our API, you can join our Support Slack or send us an email at developer@symbl.ai