====== Altegio and Cloud PBX Integration Instructions======
1. In your Altegio account in the upper left corner please find **Locations** and **Chains**. Select the network for which you want to set up integration and go to the **Telephony** section. Copy the telephony token.
{{::аltegio_setup_1.png?nolink}}
2. Open a new browser tab and go to your Cloud PBX personal account. In the **Settings** section, select **CRM Integration** and find the Altegio widget. Click **Connect**.
{{::аltegio_setup_2.png?nolink}}
3. In the window that opens paste the token copied from Altegio into the corresponding field. Click **Connect**.
{{::аltegio_setup_3.png?nolink&500}}
4. In your Cloud PBX personal account you will see the "Settings have been saved" message. After that the options of the installed integration will open. To finish the setup, click **Close** at the bottom of the screen.
{{::аltegio_setup_4.png?nolink}}
5. A checkmark and a gear icon will appear in the list of possible integrations in the Altegio widget. This means that the integration has been successfully installed.
{{::аltegio_setup_5.png?nolink}}
6. Go to Altegio. After the setup is completed, additional sections will appear in the **Telephony** menu in your Altegio personal account: **Integration**, **Routing**, **Routes** and **Calls**. The integration status will change to **Connected**.
{{::аltegio_setup_6.png?nolink}}
7. Go to the **Routes** section and make sure that **Route for all users** is selected, which is where the call will go. To view and change the settings, click the **Edit** button.
{{::аltegio_setup_7.png?nolink}}
8. By default, all the call history for the route will be saved in the Chain call history. You can select where exactly to save the call history for the route:
* **Call history of the chain and all locations** — the call pop-up window will appear in all branches of the chain. The call will be visible in all branches in the **Overview — Calls** section.
* **Call history of the chain and notified locations** — the call pop-up window will appear in the branches that will be selected for this route.
{{::аltegio_setup_8.png?nolink}}
9. After setting up the route, link it to the phone number / telephony subscriber ID where calls should be received. To do this, go to the **Routing** section. You will see the message: "The chain don't have routing rules yet" Click the **Add a rule** button.
{{::аltegio_setup_9.png?nolink|}}
Routing determines which route should work for an incoming call to a specific phone number or SIP account.
10. In the field that appears, specify the type, identifier and route of the call (by default, it will be **Route for all users**).
In the **Identifier** field specify:
* either a **phone number** to which customer calls should go, in the 490000000000 format (without a plus, brackets, hyphens, spaces and other symbols);
* or a **telephone subscriber identifier** if in the operator's personal account there is an automatic replacement of the phone number with a specific employee’s extension number.
{{::аltegio_setup_10.png?nolink|}}
Any error in the number (extra symbols, spaces, etc.) will result in calls not being processed. Also, calls will not be forwarded if the phone numbers are blocked in Cloud PBX.
To add a new rule, click the button in the upper right corner. An empty line will be added at the bottom of the list. Enter the phone number and route there.
{{::аltegio_setup_11.png?nolink|}}
11. Click **Save**. If you did everything correctly, Altegio will show you the "Settings have been saved" message. If you accidentally click **Save** again, the system will warn you that you cannot use combinations with this phone number again, i.e. one phone number can only be used in one route.
**Done!** Now you have access to all [[altegio|Altegio integration capabilities]].
==== If Telephony Still Doesn’t Work ====
If after the setup no calls appear in the CRM, the following mistakes may have been made:
* Extra symbols in phone numbers.
* The phone numbers in Altegio routing and in the Cloud PBX personal account do not match.