diff --git a/public/website/docs.html b/public/website/docs.html index 7a81444..326c269 100644 --- a/public/website/docs.html +++ b/public/website/docs.html @@ -13,6 +13,8 @@ href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/line-numbers/prism-line-numbers.min.css" /> + @@ -85,6 +87,9 @@

Documentation

  • Invite customers to use your CPaaS
  • +
  • + Connect Somleng with Retell AI +
  • @@ -126,6 +131,7 @@

    Documentation

    class="fa fa-external-link"> +
    @@ -947,8 +953,6 @@

    🎉 Congratulations!

    -
    -

    Connect Somleng to Amazon Chime @@ -1308,393 +1312,393 @@

    client.calls .create({ to: to, from: from, twiml: twiml }) .then(call => console.log(call.sid)); -

    -

    - You should receive a phone call to your real phone number delivered through the SIP Trunk connected - to Chime. Pick up the call and listen to the message. You should hear what you have entered in the - TwiML instructions above. -

    - -

    - - Note: Instead of running this code, you could also re-run the Verification Flow as show in the - previous tutorial. - You should receive the verification code on your real phone number delivered through Chime. - -

    - +

    + You should receive a phone call to your real phone number delivered through the SIP Trunk connected + to Chime. Pick up the call and listen to the message. You should hear what you have entered in the + TwiML instructions above. +

    -
    -

    - 5. Test a call to an international number -

    +

    + + Note: Instead of running this code, you could also re-run the Verification Flow as show in the + previous tutorial. + You should receive the verification code on your real phone number delivered through Chime. + +

    +
    -

    - In this step you'll test a call to an international number (with a prefix different from your own - number), which should be routed to your local softphone. -

    +
    +

    + 5. Test a call to an international number +

    -

    - In order to complete this step, simply update the to parameter to a - phone number which - does not match the international prefix of your own number. This will result in the SIP - trunk from the - previous tutorial - being selected and - therefore the call should be routed to your local softphone. -

    +

    + In this step you'll test a call to an international number (with a prefix different from your own + number), which should be routed to your local softphone. +

    -

    - Go ahead and run the code again from the previous - step. Remember to replace the to parameter and keep the rest the - same. -

    +

    + In order to complete this step, simply update the to parameter to a + phone number which + does not match the international prefix of your own number. This will result in the SIP + trunk from the + previous tutorial + being selected and + therefore the call should be routed to your local softphone. +

    -

    - You should receive a phone call to your real phone number delivered through the SIP Trunk connected - to your local softphone. Pick up the call and listen to the message. You should hear what you have - entered in the - TwiML instructions from the previous step. -

    -
    - +

    + Go ahead and run the code again from the previous + step. Remember to replace the to parameter and keep the rest the + same. +

    -
    -
    🎉 Congratulations!
    +

    + You should receive a phone call to your real phone number delivered through the SIP Trunk connected + to your local softphone. Pick up the call and listen to the message. You should hear what you have + entered in the + TwiML instructions from the previous step. +

    +
    -

    - Congratulations! You have successfully completed the tutorial and connected Somleng to Chime. -

    +
    +
    🎉 Congratulations!
    -

    - What we learned: -

    +

    + Congratulations! You have successfully completed the tutorial and connected Somleng to Chime. +

    -
      -
    1. - How to connect Somleng to Amazon Chime. -
    2. +

      + What we learned: +

      -
    3. - A Phone number must be assigned to a customer account in order to use it in the Phone Calls API . -
    4. +
        +
      1. + How to connect Somleng to Amazon Chime. +
      2. -
      3. - Multiple SIP Trunks can be configured to handle routing based on the destination phone number. -
      4. +
      5. + A Phone number must be assigned to a customer account in order to use it in the Phone Calls API . +
      6. -
      7. - The Phone Calls API is different from the Verification API - . It can be used to create outbound calls and control the - call via TwiML - instructions . -
      8. -
      -
    +
  • + Multiple SIP Trunks can be configured to handle routing based on the destination phone number. +
  • -
    -

    - Invite customers to use your CPaaS -

    +
  • + The Phone Calls API is different from the Verification + API + . It can be used to create outbound calls and control the + call via TwiML + instructions . +
  • + +
    + -

    - So far, you've learned how to - build your own phone verification service, and optionally - connected it to - Amazon Chime. You have essentially built your own branded, Communications Platform as a Service - or CPaaS. -

    +
    +

    + Invite customers to use your CPaaS +

    -

    - In this tutorial you'll learn how to invite your own customers to use your new CPaaS. Your - customers will - be able to - integrate phone verifications and programmable voice and messaging into their own - applications, while - you remain in complete control over their access. -

    +

    + So far, you've learned how to + build your own phone verification service, and optionally + connected it to + Amazon Chime. You have essentially built your own branded, Communications Platform as a Service + or CPaaS. +

    -
    -

    - Prerequisites -

    +

    + In this tutorial you'll learn how to invite your own customers to use your new CPaaS. Your + customers will + be able to + integrate phone verifications and programmable voice and messaging into their own + applications, while + you remain in complete control over their access. +

    -
      -
    1. - Complete the Build your own Phone Verification Service - tutorial. -
    2. -
    3. - Optionally complete the Connect Somleng to Amazon Chime - tutorial. -
    4. -
    -
    +
    +

    + Prerequisites +

    -
    -

    - Overview -

    +
      +
    1. + Complete the Build your own Phone Verification Service + tutorial. +
    2. +
    3. + Optionally complete the Connect Somleng to Amazon Chime + tutorial. +
    4. +
    +
    -

    - Below is an overview of the steps that we'll cover in this tutorial: -

    + +

    + Below is an overview of the steps that we'll cover in this tutorial: +

    - -

    - In this step, you'll update your carrier settings and add a logo. In this tutorial we're using an - imaginary company called Rocket Communications. -

    +
    +

    + 1. Update your carrier settings. +

    -

    - Perform the following steps: -

    +

    + In this step, you'll update your carrier settings and add a logo. In this tutorial we're using an + imaginary company called Rocket Communications. +

    -
      -
    1. - Click on Carrier Settings from the main menu. -
    2. -
    3. - Upload your company's logo. -
    4. -
    5. - Optionally update other details about your company. -
    6. -
    7. - Press Update Carrier Settings. -
    8. -
    +

    + Perform the following steps: +

    - -
    +
      +
    1. + Click on Carrier Settings from the main menu. +
    2. +
    3. + Upload your company's logo. +
    4. +
    5. + Optionally update other details about your company. +
    6. +
    7. + Press Update Carrier Settings. +
    8. +
    -
    -

    - 2. Create a new Account for your customer. -

    + +
    -

    - In this step you create a new account for your customer. There are two types of accounts on Somleng - namely: Carrier Managed and Customer Managed. - As the name suggests, Customer Managed accounts are managed by the carrier's - customer, who will get access to the Dashboard and can manage their own Account SID and Auth Token. - Here we'll create a customer account for our imaginary customer Elvie Padberg from - Klocko - Block, but feel free to use your own customer details. -

    +
    +

    + 2. Create a new Account for your customer. +

    -

    - Perform the following steps: -

    +

    + In this step you create a new account for your customer. There are two types of accounts on Somleng + namely: Carrier Managed and Customer Managed. + As the name suggests, Customer Managed accounts are managed by the carrier's + customer, who will get access to the Dashboard and can manage their own Account SID and Auth Token. + Here we'll create a customer account for our imaginary customer Elvie Padberg from + Klocko + Block, but feel free to use your own customer details. +

    -
      -
    1. - Under the Accounts menu, click the - icon to create a new account. -
    2. +

      + Perform the following steps: +

      -
    3. - Give the account a name. -
    4. +
        +
      1. + Under the Accounts menu, click the + icon to create a new account. +
      2. -
      3. - Under Owner, enter the customer's name and email address.
        - - Note: You cannot invite yourself as your own customer. You must use a different email address - than the one you used to sign up for Somleng. However, in order to complete this tutorial you'll - need to choose an email that - you have access to, so you can explore the dashboard from the customer's perspective. If you - only have one email address you can use the following trick: - your-email+customer-email@your-domain.tld. For example, if your - real email address is bob@example.com and your customer's name is Elive - Padberg, enter bob+elvie.padberg@example.com. - -
      4. +
      5. + Give the account a name. +
      6. -
      7. - Choose a premium TTS voice (such as Polly.Joanna) from the default TTS Voice - dropdown. - This will be used to determine the TTS provider (Basic or Polly) when - sending phone calls. -
      8. +
      9. + Under Owner, enter the customer's name and email address.
        + + Note: You cannot invite yourself as your own customer. You must use a different email address + than the one you used to sign up for Somleng. However, in order to complete this tutorial you'll + need to choose an email that + you have access to, so you can explore the dashboard from the customer's perspective. If you + only have one email address you can use the following trick: + your-email+customer-email@your-domain.tld. For example, if your + real email address is bob@example.com and your customer's name is Elive + Padberg, enter bob+elvie.padberg@example.com. + +
      10. -
      11. - Press Create Account. -
      12. -
      +
    5. + Choose a premium TTS voice (such as Polly.Joanna) from the default TTS Voice + dropdown. + This will be used to determine the TTS provider (Basic or Polly) when + sending phone calls. +
    6. - -
    +
  • + Press Create Account. +
  • + -
    -

    - 3. Log in to the Dashboard as if you are the customer. -

    + +
    -

    - In this step, you'll log in to the Dashboard as if you are the customer. To do this you'll - first need to log out of your carrier account, then click the customer invitation link from your - email. -

    +
    +

    + 3. Log in to the Dashboard as if you are the customer. +

    -

    - - Note: In a real-world scenario you would never log in to the customer's account. The goal of this - step is to understand the customer's experience. - -

    +

    + In this step, you'll log in to the Dashboard as if you are the customer. To do this you'll + first need to log out of your carrier account, then click the customer invitation link from your + email. +

    -

    - Perform the following steps: -

    +

    + + Note: In a real-world scenario you would never log in to the customer's account. The goal of this + step is to understand the customer's experience. + +

    -
      -
    1. - Click on your avatar in the top right corner and select - Logout from the dropdown. -
    2. +

      + Perform the following steps: +

      -
    3. - Check your email. You should have received a customer invitation email when completing the - previous step. -
    4. +
        +
      1. + Click on your avatar in the top right corner and select + Logout from the dropdown. +
      2. -
      3. - Follow the link in the email and set your password. -
      4. +
      5. + Check your email. You should have received a customer invitation email when completing the + previous step. +
      6. -
      7. - Setup two factor authentication (2FA). -
      8. -
      +
    5. + Follow the link in the email and set your password. +
    6. -

      - You should now be viewing the dashboard from the customer's perspective. -

      +
    7. + Setup two factor authentication (2FA). +
    8. +
    - - -
    +

    + You should now be viewing the dashboard from the customer's perspective. +

    -
    -

    - 4. Explore the Dashboard and API docs from the customer's perspective. -

    + + +
    -

    - In this step, feel free to click around and explore the Dashboard from the customer's perspective. -

    +
    +

    + 4. Explore the Dashboard and API docs from the customer's perspective. +

    -

    - Notice the following: -

    +

    + In this step, feel free to click around and explore the Dashboard from the customer's perspective. +

    -
      -
    • - Your company's logo appears in the top left of the Dashboard. -
    • -
    • The customer can manage their own Account SID and Auth Token.
    • -
    • The customer cannot view or manage any carrier resources such as SIP Trunks, SMS Gateways etc. -
    • -
    • The customer can only see resources (e.g. Phone Calls, Messages etc) that belong to their - account.
    • -
    • - The API docs are branded with your company's name and logo. -
    • -
    +

    + Notice the following: +

    - - -
    + -
    -

    - 5. Use the API and Dashboard from the customer's perspective. -

    + + +
    -

    - In this step, you'll explore using the Verify API from the customer's perspective. -

    +
    +

    + 5. Use the API and Dashboard from the customer's perspective. +

    -

    - Perform the following steps: -

    +

    + In this step, you'll explore using the Verify API from the customer's perspective. +

    -
      -
    1. - Under the Verify menu, select Services. -
    2. +

      + Perform the following steps: +

      -
    3. - Click the icon to create a new verification service. -
    4. +
        +
      1. + Under the Verify menu, select Services. +
      2. -
      3. - Give your verification service a friendly name. -
      4. +
      5. + Click the icon to create a new verification service. +
      6. -
      7. - Press Create Verification service. -
      8. -
      +
    5. + Give your verification service a friendly name. +
    6. -

      - Make sure your softphone is still registered with the SIP trunk that you created in the - first tutorial. - -

      +
    7. + Press Create Verification service. +
    8. +
    -

    - Then, run the code below substituting the following: -

    +

    + Make sure your softphone is still registered with the SIP trunk that you created in the + first tutorial. + +

    -
      -
    • - Set accountSid and authToken from the - values shown on the Account Settings page. -
    • -
    • - Set verificationServiceSid from the verification service you just - created. -
    • -
    +

    + Then, run the code below substituting the following: +

    + +
      +
    • + Set accountSid and authToken from the + values shown on the Account Settings page. +
    • +
    • + Set verificationServiceSid from the verification service you just + created. +
    • +
    -
    // To run this code, download the Somleng.js helper library from:
    +                  
    // To run this code, download the Somleng.js helper library from:
     // https://www.somleng.org/docs/twilio_api/#helper-libraries
     
     // Then, find your Account SID and Auth Token from the Somleng console
    @@ -1714,116 +1718,331 @@ 

    .create({to: to, channel: channel}) .then(verification => console.log(verification.sid));

    -

    - You can now view the verification from the customer's perspective from the Verify - menu on the Dashboard. -

    +

    + You can now view the verification from the customer's perspective from the Verify + menu on the Dashboard. +

    -

    - If you completed the - first tutorial, - and your softphone is still connected, then you should receive the verification call. -

    +

    + If you completed the + first tutorial, + and your softphone is still connected, then you should receive the verification call. +

    + +

    + Note: In this step we demonstrated that your customers can use the Verify API, which is + connected to your SIP infrastructure. In a real-world scenario you would connect your SIP trunk to + a VoIP Gateway, Amazon Chime or your own SIP Infrastructure. +

    + + + + +
    +

    + 6. Control API Access for your customer. +

    + +

    + To finish up this tutorial, we'll show you how to control your customer's access from the Carrier + Dashboard. + To do this you'll first need to log out of your customer's account, and login again to your + carrier account. +

    + +

    + Perform the following steps: +

    + +
      +
    1. + Click on your customer's avatar in the top right corner and select + Logout from the dropdown. +
    2. + +
    3. + Log in to your carrier account. +
    4. + +
    5. + Under the Accounts menu, click the SID of the Account belonging to your + customer. +
    6. + +
    7. Click the button.
    8. + +
    9. + Notice that most of the fields are disabled, but you can toggle the Enabled + switch. +
    10. + +
    11. + Press Update Account to save your changes. +
    12. +
    + +

    + Note: Disabling the account, will prevent your customer from accessing the API, but your + customer will still have access to the Dashboard in order for them to view their data. +

    + + +
    + +
    +

    🎉 Congratulations!

    + +

    + Congratulations! You have successfully completed this tutorial and invited your first customer to + use your CPaaS. +

    + +

    + What we learned: +

    + +
      +
    1. + Customer managed accounts (as opposed to Carrier managed accounts) are used by your customers. + When you create a customer managed account, + you specify an owner's name and email address. The owner will then receive an invitation email + and + can then sign-in to the dashboard and + manage their own Account. +
    2. + +
    3. + When your customer signs in to the Dashboard, he will see your company's branding and logo both + on + the Dashboard and in the API Docs. +
    4. + +
    5. + The customer can use the API and helper libraries in his own applications. +
    6. + +
    7. + The customer can only see the data (phone calls, messages, verifications etc) that belongs to + him. +
    8. + +
    9. + You can control the customer's API access from the carrier dashboard. +
    10. +
    +
    +
    +
    + +
    +

    + Connect Somleng with Retell AI +

    - Note: In this step we demonstrated that your customers can use the Verify API, which is - connected to your SIP infrastructure. In a real-world scenario you would connect your SIP trunk to - a VoIP Gateway, Amazon Chime or your own SIP Infrastructure. + In this tutorial you'll learn how connect Somleng with Retell AI to power your + call + operations with + Voice AI without Twilio. In order to handle call terminations, we'll be using Amazon + Chime, + but + you can replace Chime with your own voice termination provider or infrastructure.

    - - - -
    +

    - 6. Control API Access for your customer. + Prerequisites

    -

    - To finish up this tutorial, we'll show you how to control your customer's access from the Carrier - Dashboard. - To do this you'll first need to log out of your customer's account, and login again to your - carrier account. -

    +
      +
    1. + Complete the Verify tutorial. +
    2. +
    3. + Complete the Chime tutorial. +
    4. +
    5. + Sign up for a free Retell AI + trial account. +
    6. +
    7. + Install Node.js and ngrok . +
    8. +
    +
    + +
    +

    + Overview +

    - Perform the following steps: + Below is an overview of the steps that we'll cover in this tutorial:

    -
      +
      1. - Click on your customer's avatar in the top right corner and select - Logout from the dropdown. + Obtain your Retell AI credentials. +
      2. +
      3. + Run the retell_server.js + application. +
      4. +
      5. + Confirm you have completed the previous + tutorials.
      6. -
      7. - Log in to your carrier account. + Talk with the AI.
      8. +
      +
    + +
    +

    + 1. Obtain your Retell AI credentials +

    + +
    1. - Under the Accounts menu, click the SID of the Account belonging to your - customer. + Login to your Retell AI account, select API Keys from the menu and copy your API + key. + +
    2. +
    3. + Select Agents from the menu, select and Agent and copy the Agent + ID as shown below. + +
    4. +
    + +
    -
  • Click the button.
  • +
    +

    + 2. Run the retell_server.js application +

    +
    1. - Notice that most of the fields are disabled, but you can toggle the Enabled - switch. + Download retell_server.js and package.json + from the + Somleng SWITCH testing repository
    2. +
    3. + Install the required packages with npm +
      npm install
      +
    4. - Press Update Account to save your changes. + Run retell_server.js replacing RETELL_AI_API_KEY and + RETELL_AI_AGENT_ID with the values from Step 1. After running this command you should see the server running on + localhost:3000. +
      node retell_server.js --api_key RETELL_AI_API_KEY --agent_id RETELL_AI_AGENT_ID --port 3000
      +
    5. +
    6. + In another terminal window run the following command to expose the server to the internet. +
      ngrok http 3000
      +
    7. +
    8. + Note the forwarding URL: It should look something like this: + https://eb3c-229-14-127-42.ngrok-free.app
    +
    + +
    +

    + 3. Confirm you have completed the previous tutorials +

    - Note: Disabling the account, will prevent your customer from accessing the API, but your - customer will still have access to the Dashboard in order for them to view their data. + Ensure you have completed the Verify + and Chime tutorials. You will need + to have configured a Somleng customer account, a SIP trunk which is connected to Chime, and a phone + number to continue.

    - -
    -
    -
    -

    🎉 Congratulations!

    +
    +

    + 4. Talk with the AI +

    -

    - Congratulations! You have successfully completed this tutorial and invited your first customer to - use your CPaaS. -

    +

    + In this step we'll create an outbound call to your number. After you answer the call, Somleng will + request TwiML instructions from the ngrok URL obtained from + Step 2. Ngrok will forward the request to the retell_server.js application which + will connect your call to Retell AI. +

    +

    + Run the following code: +

    -

    - What we learned: -

    +
    // To run this code, download the Somleng.js helper library from:
    +// https://www.somleng.org/docs/twilio_api/#helper-libraries
     
    -                
      -
    1. - Customer managed accounts (as opposed to Carrier managed accounts) are used by your customers. - When you create a customer managed account, - you specify an owner's name and email address. The owner will then receive an invitation email and - can then sign-in to the dashboard and - manage their own Account. -
    2. +// Then, find your Account SID and Auth Token from the Somleng console +// and set the following environment variables. +// const accountSid = process.env.SOMLENG_ACCOUNT_SID; +// const authToken = process.env.SOMLENG_AUTH_TOKEN; -
    3. - When your customer signs in to the Dashboard, he will see your company's branding and logo both on - the Dashboard and in the API Docs. -
    4. +const accountSid = "change-me"; // Replace with the accountSid obtained when completing the Verify tutorial. +const authToken = "change-me"; // Replace with the authToken obtained when completing the Verify tutorial. +const to = "change-me"; // A phone number which will receive the call. +const from = "change-me"; // This should exactly match the number obtained from the Chime tutorial. +const url = "change-me"; // Replace with the ngrok URL obtained from step 2. -
    5. - The customer can use the API and helper libraries in his own applications. -
    6. +const client = require('somleng')(accountSid, authToken); -
    7. - The customer can only see the data (phone calls, messages, verifications etc) that belongs to him. -
    8. +client.calls + .create({ to: to, from: from, url: `${url}/connect` }) + .then(call => console.log(call.sid));
    +

    +
    -
  • - You can control the customer's API access from the carrier dashboard. -
  • - +
    +
    🎉 Congratulations!
    + +

    + Congratulations! You have successfully completed the tutorial and connected Somleng with Retell AI. +

    + +

    + What we learned: +

    + +
      +
    1. + Retell AI works with Somleng out of the box. This makes it possible to replace Twilio with Somleng + for your existing workflows. +
    2. + +
    3. + You can replace Chime with your own infrastructure or voice termination provider. +
    4. + +
    5. + You can also replace Retell AI with Vocode to have a complete solution + built on open source software. +
    6. + +
    +
    @@ -1848,7 +2067,8 @@

    You must sign in to the dashboard via your subdomain to use Somleng. The sign in URL is https://your-subdomain.app.somleng.org/users/sign_in. - If you have setup a custom domain + If you have setup a custom + domain all users may access the dashboard through your custom domain as well. @@ -1870,18 +2090,21 @@

    Here you will find various settings for your carrier. Under General, you'll see your company's name, subdomain, website, country and logo. - Under Developer, you'll see your Carrier API + Under Developer, you'll see your Carrier + API Key, as well as your webhook URL and signing secret for verifying webhooks . - If you've setup a custom domain this + If you've setup a custom domain + this will appear under the Custom Domain section.

    To update your carrier settings:

    1. - Sign in to the Dashboard and from the side-navigation, click Carrier Settings. + Sign in to the Dashboard and from the side-navigation, click Carrier + Settings.
    2. Click the icon to edit your settings. @@ -1907,7 +2130,8 @@

      Typically a carrier would create an account for each of their customers. - BYOC entities and independent entities on the other hand might create an account for each customer + BYOC entities and independent entities on the other hand might create an account for each + customer or project or just create one global account for their own usage.

      @@ -1936,9 +2160,11 @@

      Customer Managed Customer managed accounts are managed by the carrier's customers directly. - These types of accounts can be created via the dashboard by specifying an account owner when + These types of accounts can be created via the dashboard by specifying an account owner + when creating the account. - After providing the account owner's name and email address, the owner will be invited to the + After providing the account owner's name and email address, the owner will be invited to + the dashboard and can manage their own account. The customer will also have access to their Account SID and Auth Token. The carrier can still disable and enable customer accounts from the Dashboard. @@ -2017,7 +2243,8 @@

    - Once the phone number has been created, you can configure it. To configure a phone number via the + Once the phone number has been created, you can configure it. To configure a phone number via + the Dashboard:

    1. @@ -2037,7 +2264,8 @@

      be executed when an inbound call is received by Somleng.

    2. - Optionally configure a Status Callback URL and Status Callback Method which will be used to + Optionally configure a Status Callback URL and Status Callback Method which will be used + to deliver status updates for inbound calls to this number.
    3. @@ -2046,7 +2274,8 @@

      Optionally configure the phone number to handle inbound messages.
      • - Under Messaging, specify a SMS URL and SMS Method. This will configure your + Under Messaging, specify a SMS URL and SMS Method. This will configure + your phone number for inbound messaging. The SMS URL should return valid TwiML for Programmable SMS
      • Optionally configure a - Messaging Service. This is useful if you want + Messaging Service. This is useful if you + want to apply a set of configuration to multiple phone numbers, instead of configuring each phone number individually. @@ -2128,7 +2358,8 @@
        Optional The visibility of the phone number - One of either private, public, or disabled defaults + One of either private, public, or disabled + defaults to public for phone numbers with a price or private for phone numbers without one. true @@ -2139,7 +2370,8 @@
        country Optional The country of the phone number - Optional ISO 3166-1 alpha-2 country code. If not provided, will try to resolve from the + Optional ISO 3166-1 alpha-2 country code. If not provided, will try to resolve from + the phone number CA @@ -2187,7 +2419,9 @@
        latitude Optional - The latitude of this phone number's location. Applicable only for phone numbers from the US + The latitude of this phone number's location. Applicable only for phone numbers from + the + US and Canada. Latitude 43.6008 @@ -2195,7 +2429,9 @@
        longitude Optional - The longitude of this phone number's location. Applicable only for phone numbers from the US + The longitude of this phone number's location. Applicable only for phone numbers from + the + US and Canada. Longitude -79.5053 @@ -2256,7 +2492,8 @@
        and outbound dialing as calls originated by Somleng.

        - When you create a SIP Trunk you first choose the authentication mode. There are two authentication + When you create a SIP Trunk you first choose the authentication mode. There are two + authentication modes available described below:

        @@ -2271,7 +2508,8 @@

        IP Address - Choose this mode if you have a public static IP address and are not behind + Choose this mode if you have a public static IP address and are not + behind a NAT. This mode is best suited for carriers and BYOC entities. @@ -2313,7 +2551,8 @@
        This IP address is used to authenticate the carrier when inbound calls are received.
      • - You must connect to our public gateway via one of the IP addresses listed below: + You must connect to our public gateway via one of the IP addresses listed + below:
        • 15.197.218.231 @@ -2332,12 +2571,14 @@

          - When you configure a SIP trunk for outbound dialing via IP address + When you configure a SIP trunk for outbound dialing via IP + address authentication the following rules apply:

          1. - You must provide a host to connect to. You can specify your host as either a fully + You must provide a host to connect to. You can specify your host as either a + fully qualified domain name (FQDN) or IP address.
          2. @@ -2448,7 +2689,8 @@

            - Text To Speech (TTS), also known as speech synthesis, is a process in which text is converted into + Text To Speech (TTS), also known as speech synthesis, is a process in which text is converted + into a human-sounding voice.

            @@ -2459,14 +2701,15 @@
            For example, when Somleng executes the following TwiML during a call, the caller hears "Hello world!" - The synthesized voice the caller hears is the default voice and language of the Somleng Account + The synthesized voice the caller hears is the default voice and language of the Somleng + Account (configured in the Account Settings).

            <Response>
            -  <Say>Hello world!</Say>
            +<Say>Hello world!</Say>
             </Response>
             

            @@ -2481,18 +2724,21 @@

            <Response>
            -  <Say language="en-US" voice="Polly.Joanna">Hello. I am Joanna and I speak American English!</Say>
            +<Say language="en-US" voice="Polly.Joanna">Hello. I am Joanna and I speak American English!</Say>
             </Response>
             

    - The language attribute of <Say> also allows you to override the default voice that + The language attribute of <Say> also allows you to override the default voice + that is configured for the Somleng Account. - For example, if the account's default TTS voice is Polly.Joanna (Female, en-US), but wish - to use German for a specific call, set the language attribute to de-DE in + For example, if the account's default TTS voice is Polly.Joanna (Female, en-US), but + wish + to use German for a specific call, set the language attribute to de-DE + in your TwiML. This will choose another voice from the Polly provider which supports German. @@ -2500,7 +2746,7 @@

    <Response>
    -  <Say language="de-DE">Hallo. Ich spreche Deutsch!</Say>
    +<Say language="de-DE">Hallo. Ich spreche Deutsch!</Say>
     </Response>
     

    @@ -2516,7 +2762,8 @@

    You can also use Premium voices which are generated using the latest technology and innovation in synthesized speech, - providing the most human-like, expressive and natural-sounding text-to-speech voices possible, with + providing the most human-like, expressive and natural-sounding text-to-speech voices possible, + with higher quality than Standard voices. The voices in this tier are currently provided by Amazon (Amazon Polly Neural).

    @@ -2528,7 +2775,7 @@

    <Response>
    -  <Say voice="Polly.Danielle-Neural">Hello. I am Danielle!</Say>
    +<Say voice="Polly.Danielle-Neural">Hello. I am Danielle!</Say>
     </Response>
     

    @@ -2555,10 +2802,12 @@
    When you configure an SMS gateway on the Dashboard, you receive a Device Token which uniquely identifies your SMS Gateway. You'll then need to install the - Somleng SMS Gateway + Somleng SMS + Gateway App on your on-premise or cloud infrastructure. - Normally, you'll only need to configure a single SMS Gateway, however if you require multiple SMS + Normally, you'll only need to configure a single SMS Gateway, however if you require multiple + SMS gateways, you'll need to run an instance of the for each one. Once the app is running on your local infrastructure and connected to Somleng, the SMS Gateway will show Connected on the Dashboard. @@ -2568,7 +2817,8 @@
    To configure an SMS Gateway:
    1. - Sign in to the Dashboard and from the side-navigation, click SMS Gateways under + Sign in to the Dashboard and from the side-navigation, click SMS Gateways + under Messaging.
    2. @@ -2607,14 +2857,16 @@

      For example let's assume your GSM Gateway has 4 available channels. - Now, let's assume you insert 2 SIM cards belong to a carrier called "Smart", 1 SIM card belonging + Now, let's assume you insert 2 SIM cards belong to a carrier called "Smart", 1 SIM card + belonging to a carrier called "Metfone", and another SIM card belonging to a carrier called "Cellcard".

      - Channel groups allow you to specify which messages will be routed through the "Smart" SIM cards, + Channel groups allow you to specify which messages will be routed through the "Smart" SIM + cards, which messages will be routed through the "Metfone" SIM cards and which messages will be routed through the "Cellcard" SIM cards. @@ -2638,12 +2890,14 @@

      Assign the channel group to an SMS Gateway.
    3. - Specify a comma separated list of prefixes (including the country code) for the Channel Group. + Specify a comma separated list of prefixes (including the country code) for the Channel + Group. This list is used to match the channel group by the destination number of an outbound message.
    4. - Select the channels that you want to associate with the channel group. The available channels + Select the channels that you want to associate with the channel group. The available + channels are derived from the maximum number of channels you specified on your SMS Gateway. @@ -2677,11 +2931,13 @@
      To configure an Messaging Service:
      1. - Sign in to the Dashboard and from the side-navigation, click Messaging Services + Sign in to the Dashboard and from the side-navigation, click Messaging + Services under Messaging.
      2. - Click the icon to create a new Messaging Service. + Click the icon to create a new Messaging + Service.
      3. Enter a name for your Messaging Service. @@ -2690,20 +2946,24 @@
        Choose Next.
      4. - Add phone numbers to your Messaging Service by selecting them from the Sender Pool. Note these + Add phone numbers to your Messaging Service by selecting them from the Sender Pool. Note + these phone numbers must already be assigned to the account you selected above.
      5. - Choose the default behavior for inbound messages received by the numbers in the pool. You can + Choose the default behavior for inbound messages received by the numbers in the pool. You + can either:
        • - Defer to sender's webhook (Default). This will fallback to configuration for the individual + Defer to sender's webhook (Default). This will fallback to configuration for the + individual phone number.
        • - Drop the message. Your application will ignore inbound messages. You won't be charged for + Drop the message. Your application will ignore inbound messages. You won't be charged + for them and they won't show up on the dashboard. @@ -2714,7 +2974,8 @@
      6. - If you chose Send a webhook in the previous step you must enter a Inbound Request URL + If you chose Send a webhook in the previous step you must enter a Inbound Request + URL and Inbound request method to request for incoming messages.
      7. @@ -2722,7 +2983,8 @@
        Optionally configure a Status Callback URL for all outbound messages in the sender pool.
      8. - Configure Smart encoding for outbound messages. If this is turned on Smart encoding will apply + Configure Smart encoding for outbound messages. If this is turned on Smart encoding will + apply to all outbound messages in the number pool.
      9. @@ -2857,29 +3119,29 @@

        # somleng_proxy.tf
        -module "somleng_proxy_dashboard" {
        +  module "somleng_proxy_dashboard" {
           source = "github.com/somleng/terraform-aws-cloudfront-reverse-proxy"
         
           host = "your-domain.example.com" # Replace this with your custom domain
           origin = "your-domain.app.somleng.org" # Replace this with your Somleng subdomain
           origin_custom_headers = [
        -    {
        -      "name" = "X-Forwarded-Host",
        -      "value" = "your-domain.example.com" # Replace with your custom domain
        -    }
        +  {
        +  "name" = "X-Forwarded-Host",
        +  "value" = "your-domain.example.com" # Replace with your custom domain
        +  }
           ]
         
           allowed_origin_request_headers = [
        -    "X-CSRF-Token",
        -    "X-Requested-With"
        +  "X-CSRF-Token",
        +  "X-Requested-With"
           ]
         
           zone_id = aws_route53_zone.example_com.zone_id # Optional. Leave blank if not using route53.
           certificate_arn = "existing-certificate-arn" # Optional. Leave blank to create a new certificate.
        -}
        +  }
         
        -# Optionally configure a custom API endpoint
        -module "somleng_proxy_api" {
        +  # Optionally configure a custom API endpoint
        +  module "somleng_proxy_api" {
           source = "github.com/somleng/terraform-aws-cloudfront-reverse-proxy"
         
           host = "your-api-domain.example.com" # Replace this with your custom API domain
        @@ -2889,12 +3151,13 @@ 

        zone_id = aws_route53_zone.example_com.zone_id # Optional. Leave blank if not using route53. certificate_arn = "existing-certificate-arn" # Optional. Leave blank to create a new certificate. -}

        + }

        The terraform configuration above will configure two AWS cloudfront distributions (one for the dashboard and one for the API) - and optionally create SSL certificates managed by AWS Certificate Manager. If you're using route53 + and optionally create SSL certificates managed by AWS Certificate Manager. If you're using + route53 to manage your domain, the module will also create records pointing your custom domain to the AWS cloudfront @@ -2903,7 +3166,8 @@

        - Note: The second module, somleng_proxy_api is optional and only + Note: The second module, somleng_proxy_api is optional and + only required if you want to configure a custom API endpoint. @@ -2980,7 +3244,8 @@

        Set 'Viewer protocol policy' to Redirect HTTP to HTTPS
      10. - Set 'Allowed HTTP methods' to GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE + Set 'Allowed HTTP methods' to GET, HEAD, OPTIONS, PUT, POST, PATCH, + DELETE
      11. Set 'Restrict viewer access' to No @@ -3163,7 +3428,8 @@

        - Repeat the exact same process above to create a distribution for your custom API + Repeat the exact same process above to create a distribution for your custom + API domain, with the following modifications:

          @@ -3185,7 +3451,8 @@

          Skip this step if you prefer to use AWS Cloudfront (recommended) instead. + class="link">AWS Cloudfront + (recommended) instead.

          @@ -3195,30 +3462,30 @@

             server {
          -    listen 443;
          -    server_name dashboard.example.com; # replace this with your dashboard domain
          +  listen 443;
          +  server_name dashboard.example.com; # replace this with your dashboard domain
           
          -    ssl_certificate /path/to/your/fullchain.pem;
          -    ssl_certificate_key /path/to/your/privatekey.pem;
          +  ssl_certificate /path/to/your/fullchain.pem;
          +  ssl_certificate_key /path/to/your/privatekey.pem;
           
          -    location / {
          -      proxy_set_header X-Forwarded-Host dashboard.example.com; # replace this with your dashboard domain
          -      proxy_pass "https://your-subdomain.app.somleng.org:443";
          -    }
          +  location / {
          +  proxy_set_header X-Forwarded-Host dashboard.example.com; # replace this with your dashboard domain
          +  proxy_pass "https://your-subdomain.app.somleng.org:443";
          +  }
             }
           
             # Optionally configure a custom API endpoint
             # Note: DO NOT set X-Forwarded-Host for your custom API endpoint
             server {
          -    listen 443;
          -    server_name api.example.com; # replace this with your api domain
          +  listen 443;
          +  server_name api.example.com; # replace this with your api domain
           
          -    ssl_certificate /path/to/your/fullchain.pem;
          -    ssl_certificate_key /path/to/your/privatekey.pem;
          +  ssl_certificate /path/to/your/fullchain.pem;
          +  ssl_certificate_key /path/to/your/privatekey.pem;
           
          -    location / {
          -      proxy_pass "https://api.somleng.org:443";
          -    }
          +  location / {
          +  proxy_pass "https://api.somleng.org:443";
          +  }
             }

          @@ -3256,7 +3523,8 @@

          1. - Sign in to the Dashboard and from the side-navigation, click Carrier Settings. + Sign in to the Dashboard and from the side-navigation, click Carrier + Settings.
          2. Click the icon to edit your settings. @@ -3270,7 +3538,8 @@

          - After configuring the custom dashboard host, customer transactional emails (such as forgot + After configuring the custom dashboard host, customer transactional emails (such as + forgot password, account invitations, etc) will link to your-domain.example.com. Carrier user transaction emails are still linked to your-subdomain.app.somleng.org. @@ -3284,7 +3553,8 @@

          - Note: The API is always available at api.somleng.org regardless of whether you set + Note: The API is always available at api.somleng.org regardless of whether you + set a custom API host or not.

          @@ -3303,7 +3573,8 @@

          to use Somleng with their own VoIP gateway - which provides access the PSTN, thereby removing the need for a commercial agreement with a carrier. + which provides access the PSTN, thereby removing the need for a commercial agreement with a + carrier.

          @@ -3321,7 +3592,8 @@

          - The independent entity can also use Somleng to offer 3rd party access to the PSTN in their country + The independent entity can also use Somleng to offer 3rd party access to the PSTN in their + country via their VoIP gateway.

          @@ -3340,7 +3612,8 @@

          you can configure a softphone such as Telephone . - This will allow you to create outbound calls through Somleng which should reach your softphone. + This will allow you to create outbound calls through Somleng which should reach your + softphone.

          @@ -3383,7 +3656,8 @@

          Other VoIP gateways may work as well but have not been tested. If you want to use Somleng with a different gateway please - open an + open + an issue .

          @@ -3411,7 +3685,8 @@

          Under General, select Client credentials for the authentication mode.
        • - Set Max channels to the number of channels (or SIM cards) your have available + Set Max channels to the number of channels (or SIM cards) your have + available on your VoIP Gateway.
        • @@ -3421,7 +3696,8 @@

          code you use later when you create a phone number.
        • - Under Outbound Dialing optionally configure Route prefixes, Dial string + Under Outbound Dialing optionally configure Route prefixes, Dial + string prefix and select National dialing where appropriate.
        • @@ -3445,7 +3721,8 @@

          - Create a new Account to obtain your Account SID and + Create a new Account to obtain your Account SID + and Auth Token for outbound dialing.

          @@ -3489,7 +3766,8 @@

          - Create a new Phone Number and configure it for inbound + Create a new Phone Number and configure it for + inbound dialing.

          @@ -3545,7 +3823,8 @@

          After you have completed the previous steps, you can now configure you VoIP gateway - to connect to Somleng. Below is the configuration instructions for the following VoIP gateways: + to connect to Somleng. Below is the configuration instructions for the following VoIP + gateways:

          • @@ -3643,10 +3922,12 @@

            - The next step is to configure the GoIP gateway to register with Somleng. There are 3 different + The next step is to configure the GoIP gateway to register with Somleng. There are 3 + different modes of configuration depending on your circumstances. Please refer to the - GoIP User + GoIP + User Manual for more information about the different configuration modes and the channel selection algorithms. @@ -3667,7 +3948,8 @@

            Somleng.
            - This mode is best if you only have one group of SIM cards and you want to route evenly + This mode is best if you only have one group of SIM cards and you want to route + evenly between all of them. @@ -3675,23 +3957,27 @@
            Config by Line - Use this mode to associate a single channel on your GoIP gateway to a single SIP Trunk on + Use this mode to associate a single channel on your GoIP gateway to a single SIP Trunk + on Somleng.
            - Note: This mode requires you so set a Routing Prefix for each channel. + Note: This mode requires you so set a Routing Prefix for each + channel. Config by Group - Use this mode to associate a group of channels on your GoIP gateway to a single SIP trunk + Use this mode to associate a group of channels on your GoIP gateway to a single SIP + trunk on Somleng.
            - This mode is useful if you want to route to a different group of SIM cards based on the + This mode is useful if you want to route to a different group of SIM cards based on + the number prefix. See Advanced Routing Configuration for more info. @@ -3706,16 +3992,19 @@
            From the side-navigation, click Configurations -> Basic VoIP.
          • - Choose your preferred configuration mode as described above from Config Mode. + Choose your preferred configuration mode as described above from Config + Mode.
          • - Copy the Username from the Client Credentials section from + Copy the Username from the Client Credentials section + from Step 1 and paste it in the Authentication ID field.
          • - Copy the Password from the Client Credentials section from + Copy the Password from the Client Credentials section + from Step 1 and paste it in the Password field. @@ -3727,9 +4016,11 @@
            and paste it in the SIP Registrar Server field.
          • - Optionally fill in Routing Prefix to control the channel selection algorithm. + Optionally fill in Routing Prefix to control the channel selection + algorithm. Please refer to the - GoIP User + GoIP + User Manual for more details.
          • @@ -3740,7 +4031,8 @@

            - Note: If you choose Config by Line or Config by Group you'll + Note: If you choose Config by Line or Config by Group + you'll need to repeat the instructions above for each channel or group.

            @@ -3864,9 +4156,11 @@

            - Let's say you have a GoIP-8 with 3 groups of SIM Cards from 3 different mobile operators. Assume + Let's say you have a GoIP-8 with 3 groups of SIM Cards from 3 different mobile operators. + Assume you have 4 SIM cards from Telco A, - 3 SIM cards from Telco B, and 1 SIM Card from Telco C and you want to route calls from Telco A + 3 SIM cards from Telco B, and 1 SIM Card from Telco C and you want to route calls from Telco + A to group 1, Telco B to group 2 and Telco C to group 3 according to the table below. @@ -3917,22 +4211,27 @@

          • Configure 3 separate SIP Trunks (one for each Telco) as per the instructions in - Step 1 of + Step + 1 + of the Client Configuration Guide.

            For each SIP trunk specify:

            • - Max channels. This should equal the number of SIM cards installed for the + Max channels. This should equal the number of SIM cards installed for + the telco.
            • - Route prefixes. A comma separated list of route prefixes for the telco. + Route prefixes. A comma separated list of route prefixes for the + telco. Must include the country code.
            • - Dial string prefix. A unique numeric identifier for the group prepended + Dial string prefix. A unique numeric identifier for the group + prepended to the dial string. This will be used by GoIP to identify the channel group.
            • @@ -3949,7 +4248,8 @@
            • - Configure Basic VoIP configuration for each group created above, as per the instructions in + Configure Basic VoIP configuration for each group created above, as per the instructions + in Step 2 of the GoIP Configuration Guide. @@ -3963,7 +4263,8 @@

              generated from the previous step.
            • - Password. This should match the Password generated from + Password. This should match the Password generated + from the previous step.
            • @@ -3971,7 +4272,8 @@
              obtained from the previous step.
            • - Routing Prefix: This should match the Dial string prefix + Routing Prefix: This should match the Dial string + prefix configured above.
            @@ -3985,7 +4287,9 @@

            - For each channel, specify a Dial Plan to remove the routing prefix setup in + For each channel, specify a Dial Plan to remove the routing prefix + setup + in the previous step. This removes the prefix before calling out.

            @@ -4059,7 +4363,8 @@

            - independent entities connect to Somleng via Somleng's SMS Gateway App installed on-premise, or on + independent entities connect to Somleng via Somleng's SMS Gateway App installed on-premise, or + on the cloud infrastructure managed by the independent entity. @@ -4088,11 +4393,14 @@

          • - Create an Account + Create an + Account
          • - Create and configure a + Create and + configure + a Phone Number
          • @@ -4103,7 +4411,8 @@

          • - Send an Outbound + Send an + Outbound Message
          • @@ -4131,7 +4440,8 @@

            1. - Sign in to the Dashboard and from the side-navigation, click SMS Gateways under + Sign in to the Dashboard and from the side-navigation, click SMS Gateways + under Messaging.
            2. @@ -4151,7 +4461,8 @@

              - After you create your SMS Gateway you'll see your Device Token on the next screen. You'll + After you create your SMS Gateway you'll see your Device Token on the next screen. + You'll need this later in Step 4 @@ -4206,7 +4517,8 @@

              - Create a new Phone Number and configure it for inbound + Create a new Phone Number and configure it for + inbound messaging.

              @@ -4243,7 +4555,8 @@

              Under Messaging enter an SMS URL that returns valid TwiML for Programmable SMS . - This will configure the phone number to handle inbound messages. You can use the following URL: + This will configure the phone number to handle inbound messages. You can use the following + URL: https://tinyurl.com/demo-sms which returns valid TwiML.

            3. @@ -4256,7 +4569,8 @@

            - After you have configured your phone number you can review the configuration on the next screen: + After you have configured your phone number you can review the configuration on the next + screen:

            @@ -4269,23 +4583,27 @@

            The - Somleng SMS Gateway + Somleng SMS + Gateway App . is as a gateway between Somleng and your SMS infrastructure.

            - Detailed instructions on how to install, configure and deploy the app can be found on the Somleng + Detailed instructions on how to install, configure and deploy the app can be found on the + Somleng SMS Gateway - Github repository . + Github + repository + . You'll need the Device Token from Step 1. to connect the SMS Gateway App to Somleng.

            - Once the SMS Gateway app is configured and successfully connected to Somleng, you should see the + Once the SMS Gateway app is configured and successfully connected to Somleng, you should see + the connection status show Connected the Dashboard.

            @@ -4303,10 +4621,12 @@

            Account API to test sending an outbound SMS. - Replacing the ACCOUNT-SID and AUTH-TOKEN with the information + Replacing the ACCOUNT-SID and AUTH-TOKEN with the + information from the account you created in - Step 2 you can use + Step 2 you can + use the following code to send an SMS: @@ -4363,7 +4683,8 @@

            - If you need more control over which channels outbound SMS are delivered though, you can configure + If you need more control over which channels outbound SMS are delivered though, you can + configure one or more Channel Groups.

            @@ -4372,7 +4693,8 @@

            Instead of configuring each phone number individually, like we did in Step 3, you can configure a - Messaging Service with shared configuration + Messaging Service with shared + configuration and apply it to multiple phone numbers.

            @@ -4403,7 +4725,8 @@

          • Install Docker and git on your local machine. + target="_blank">git on your local + machine.

      @@ -4495,18 +4818,21 @@

      You should be now able to log in to the Somleng dashboard at http://my-carrier.app.lvh.me:3000 with the + target="_blank">http://my-carrier.app.lvh.me:3000 with + the credentials from the output of the previous step.

      - Note: You'll need to setup two factor authentication (2FA) after the first time you sign in to the + Note: You'll need to setup two factor authentication (2FA) after the first time you sign in to + the Dashboard. You can use the - Authenticator browser extension + Authenticator browser + extension + if you don't already have another 2FA application.

      @@ -4524,17 +4850,21 @@

      In IP address authentication mode SIP and RTP from Somleng is sent through a NAT Gateway. - This means that the ports specified in the SDP in the SIP Invite from Somleng are unreachable which + This means that the ports specified in the SDP in the SIP Invite from Somleng are unreachable + which normally causes one-way audio issues. To work-around this problem, it is required that you enable Symmetric Latching and NAT traversal in your configuration.

      - Symmetric RTP means that the IP address and port pair used by an outbound RTP flow is reused for the + Symmetric RTP means that the IP address and port pair used by an outbound RTP flow is reused for + the inbound flow. - The IP address and port are learned when the initial RTP flow is received on your device. The flow's - source address and port are latched onto and used as the destination for the RTP sourced by the other + The IP address and port are learned when the initial RTP flow is received on your device. The + flow's + source address and port are latched onto and used as the destination for the RTP sourced by the + other side of the call. The IP address and port in the c line and m line respectively in the SDP message are ignored.

      @@ -4551,19 +4881,21 @@

      + - - - - - - - - + + + + + + + + + diff --git a/public/website/images/retell-ai-tutorial-retell-agent-id.png b/public/website/images/retell-ai-tutorial-retell-agent-id.png new file mode 100644 index 0000000..58a5fbd Binary files /dev/null and b/public/website/images/retell-ai-tutorial-retell-agent-id.png differ diff --git a/public/website/images/retell-ai-tutorial-retell-api-key.png b/public/website/images/retell-ai-tutorial-retell-api-key.png new file mode 100644 index 0000000..1dd0dd1 Binary files /dev/null and b/public/website/images/retell-ai-tutorial-retell-api-key.png differ