|
| 1 | +--- |
| 2 | +title: Retell |
| 3 | +--- |
| 4 | + |
| 5 | +The Retell hosted app allows you to connect a call to retell from any SIP provider, it also supports Retell transferring the call via SIP refer or a new outbound leg. |
| 6 | + |
| 7 | +It can be used for both inbound and outbound calls, with outbounds calls you would initiate the call by making a REST API request to the [Create Call endpoint](https://docs.jambonz.org/reference/rest-call-control/calls/create-call) |
| 8 | + |
| 9 | +# Requirements |
| 10 | +Before setting up the hosted application you will need: |
| 11 | +- A Jambonz Account, |
| 12 | +- A Retell account, |
| 13 | +- A SIP carrier configured in your jambonz account for connecting to the PSTN. |
| 14 | +- A Phone number configured in your jambonz account for the above carrier. |
| 15 | + |
| 16 | +# Get started |
| 17 | + |
| 18 | +## SIP client |
| 19 | + |
| 20 | +You will need to create a new Client in your jambonz account in order for retell to make outbound calls, on the Clients tab of the jambonz UI click the + icon and then create a new username and password, |
| 21 | +make a note of the username and password you created and then click **save** |
| 22 | +<Frame> |
| 23 | + <img src="../../assets/images/sip-client-retell.png" alt="Create a client"/> |
| 24 | +</Frame> |
| 25 | + |
| 26 | +When you are returned to the client list screen you should also see a SIP Realm at the top of the page, make a note of this too |
| 27 | +<Frame> |
| 28 | + <img src="../../assets/images/sip-client-list.png" alt="Create a client"/> |
| 29 | +</Frame> |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +## Application |
| 34 | + |
| 35 | +Login to your jambonz account, goto applications and click the + icon to create a new application. |
| 36 | + |
| 37 | +Enter the name of your application, this can be anything, we suggest starting out with `retell` |
| 38 | +Enter the Calling Webhook below, the same value should be automatically copied to the Call Status Webhook. |
| 39 | +```txt Calling Webhook |
| 40 | +wss://retell.jambonz.app |
| 41 | +``` |
| 42 | + |
| 43 | +<Frame> |
| 44 | + <img src="../../assets/images/application-webhook-retell.png" alt="Setting the calling webhook"/> |
| 45 | +</Frame> |
| 46 | + |
| 47 | +When you enter the webhook some new fields will then appear beneath that as shown below, these are the Application Environment variables |
| 48 | +for this hosted application. We'll go through how you should configure these next. |
| 49 | + |
| 50 | + |
| 51 | +## Configuration |
| 52 | + |
| 53 | +### RETELL_TRUNK_NAME |
| 54 | +You can leave this as the default of `retell-hosted` on jambonz.cloud as there is a shared carrier already created with the correct settings. |
| 55 | + |
| 56 | +### RETELL_SIP_CLIENT_USERNAME |
| 57 | +Set this to the name of the SIP client you created earler on for retell to connect to. |
| 58 | + |
| 59 | +### PSTN_TRUNK_NAME |
| 60 | +The name of your SIP carrier in Jambonz that you want retell to use for outbound calls. |
| 61 | + |
| 62 | +### DEFAULT_COUNTRY |
| 63 | +If you experience issues with your carrier sending the destination number in local format set this to the ISO-3166 country code of your number and the application will |
| 64 | +rewrite the number into the proper International e.164 format expected by Retell. The code is 2 characters for example `us` or `gb` [Full List](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) |
| 65 | + |
| 66 | +### OVERIDE_FROM_USER |
| 67 | +When making calls from Retell to then PSTN your carrier may want you to use a custom value in the From header, if so set this here. Sipgate is one such carrier. |
| 68 | + |
| 69 | + |
| 70 | +## Other Configuration |
| 71 | +The other parameters can be left as default. |
| 72 | + |
| 73 | +Now link your phone number to this application on the phone numbers page. |
| 74 | +<Frame> |
| 75 | + <img src="../../assets/images/phone-number-link-retell.png" alt="Link phone number to retell applicaiton"/> |
| 76 | +</Frame> |
| 77 | + |
| 78 | + |
| 79 | +## Retell Configuration |
| 80 | + |
| 81 | +Now you can login to your Retell account and add a new phone number, select `Connect to your number via SIP Trunking` and then enter; |
| 82 | + |
| 83 | +Your PSTN number from your carrier (note this needs to be in e.164 format eg +12125551212) |
| 84 | +The sip realm you noted earlier as the Termination URI |
| 85 | +In the SIP Trunk User Name enter the user of the client you created |
| 86 | +In the SIP Trunk Password enter the password of the client you created. |
| 87 | + |
| 88 | +<Frame> |
| 89 | + <img src="../../assets/images/retell-create-number.png" alt="Configure phone number in retell"/> |
| 90 | +</Frame> |
| 91 | + |
| 92 | + |
| 93 | +Now you can associate that number with your retell agent and process calls. |
| 94 | + |
| 95 | + |
| 96 | +# Help & support |
| 97 | +If you experience any issues with using the Hosted application via Jambonz.cloud then please email support@jambonz.org and include a call_sid for an example call that shows the issue along with the date & time of the call. |
| 98 | + |
| 99 | +Please also mention that you are using the Retell Hosted application. |
| 100 | + |
| 101 | +You can view the code for this application on our [GitHub](https://github.com/jambonz/retell-hosted) |
| 102 | + |
| 103 | + |
0 commit comments