Skip to main content

Connect to a PSTN 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 using PSTN (Currently, only US phone numbers work). 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 a traditional public switched telephony network (PSTN).

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" : "pstn",
"phoneNumber": "'$PHONE_NUMBER'" #
},
"actions": [{
"invokeOn": "stop",
"name": "sendSummaryEmail",
"parameters": {
"emails": [
"'$EMAIL_ADDRESS'"
]
}
}],
"data" : {
"session": {
"name" : "My Meeting"
}
}
}'

Testing#

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

If successful you should receive a response in the console.

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