# Telefonanlage

Als Telefonanlage empfehlen wir die Anbieter [Placetel](https://www.placetel.de/), [3CX](https://www.3cx.com/) oder [Sipgate](https://www.sipgate.de/).

Bei einer Integration zwischen Propstack und einer Telefonanlage geht es prinzipiell um 2 Funktionen, die man haben möchte: "Contact Lookup" und "Call Journaling".

### Contact Lookup

Bei einem **Contact Lookup** fragt die Telefonanlage beim CRM an, wer der Anrufer ist und wenn ein Kontakt mit der angegeben Telefonnummer gefunden wurde, werden die Infos (z.B. Name und Firma) aus Propstack in der Telefonanlage angezeigt.

Für Kunden, die Snom-Telefone im Büro nutzen haben wir eine spezielle Integration dafür, die auf folgender Seite im Detail beschrieben wird:

{% content-ref url="/pages/-LXKG6t4ERtRQlvXoNTl" %}
[Snom Integration](/reference/snom-integration.md)
{% endcontent-ref %}

### Call Journaling

Beim **Call Journaling** informiert die Telefonanlage Propstack über eingehende oder ausgehende Telefonate, damit diese als Aktivität beim Kontakt automatisch verbucht wird.

Für Sipgate-Kunden gibt es folgenden Hilfe-Artikel, der beschreibt, wie man in der Sipgate-Konsole Call Journaling einstellt: <http://help.propstack.de/de/articles/2607973-sipgate>

### 3CX

{% file src="/files/KIufB5NHbAdoLYRpI8qg" %}
3cx.xml
{% endfile %}

In 3CX kann beide Funktionen in ihrem [CRM Template Wizard](https://www.3cx.com/docs/crm-integration/) einstellen. Dafür installiert man sich deren "3CX CRM Template Generator" und durchläuft dann mehrere Schritte für die Integration. Das [Video-Tutorial](https://www.youtube.com/watch?v=gEZOsfcWPto) von 3CX kann dabei sehr hilfreich sein.

#### **Schritt 1: Authentication**

Als Method `API Key` auswählen und einen API Key aus Propstack eintragen. Der API Key für 3CX muss vorher in Propstack angelegt werden.

#### **Schritt 2: Contact Lookup Einstellungen**

API URL (GET): \
`https://api.propstack.de/v1/contacts?with_meta=1&phone_number=[Number]`

Contact ID: `data.id`\
First Name: `data.first_name`\
Last Name: `data.last_name`\
Company Name: `data.company`\
Email (optional): `data.email`\
Business Phone: `data.office_phone`\
Mobile Phone: `data.home_cell`\
Mobile Phone 2: `data.home_phone`

#### **Schritt 3: Contact Creation**

überspringen

#### **Schritt 4: Call Journaling Einstellungen**

API URL (POST): `https://api.propstack.de/v1/calls/3cx`&#x20;

Request Encoding: `JSON`

Request data for inbound answered calls:\
`{ "duration": "[Duration]", "direction": "in", "from": "[Number]", "to": "[Agent]" }`

Request data for outbound answered calls:\
`{ "duration": "[Duration]", "direction": "out", "from": "[Agent]", "to": "[Number]" }`

Request data for inbound missed calls:\
`{ "duration": "[Duration]", "direction": "in", "from": "[Number]", "to": "[Agent]", "hangup_cause": "notAnswered" }`

Request data for outbound not answered calls:\
`{ "duration": "[Duration]", "direction": "out", "from": "[Agent]", "to": "[Number]", "hangup_cause": "notAnswered" }`

###

### Allgemeine API

## Telefonat-Aktivitäten erstellen

<mark style="color:blue;">`GET`</mark> `https://api.propstack.de/v1/calls/phone`

Telefonate mit Kunden als Aktivität verbuchen.\
Es wird nur eine Aktivität angelegt, wenn ein Kontakt anhand der Telefonnummer gefunden werden konnte.

#### Query Parameters

| Name                                        | Type   | Description                                                                                                       |
| ------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------- |
| type                                        | string | Grund des Auflegens. Bei normalen Telefonaten leer lassen. Wenn Anruf nicht angenommen wurde `noAnswer` übergeben |
| duration                                    | string | Die Dauer des Anrufs in Sekunden, Format: mm:ss                                                                   |
| to<mark style="color:red;">\*</mark>        | string | Nummer des Angerufenen                                                                                            |
| from<mark style="color:red;">\*</mark>      | string | Nummer des Anrufers                                                                                               |
| direction<mark style="color:red;">\*</mark> | string | `in` für eingehende Anrufe, `out` für ausgehende Anrufe                                                           |
| event<mark style="color:red;">\*</mark>     | string | eines von `incoming-call`, `outgoing-call` oder `hangup`                                                          |
| note                                        | string | Eine Notiz, die als Inhalt der Aktivität gespeichert wird                                                         |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.propstack.de/integrationen/telefonanlage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
