> For the complete documentation index, see [llms.txt](https://help.sipgate.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sipgate.de/cloud-telefonanlage/en/connections-and-integrations/asteriske/wie-konfiguriere-ich-asterisk-fuer-sipgate.md).

# How do I configure Asterisk for sipgate?

Configuration guide for Asterisk with sipgate - sip.conf and extensions.conf settings at a glance.

Here you will find an overview of the settings for the basic configuration of Asterisk for sipgate.

{% hint style="info" %}
**Important:** Replace each **SIPID** with your **SIP ID** and **PASSWD** with your **SIP password**.
{% endhint %}

Please insert the following into the **sip.conf** :

{% code title="sip.conf" %}

```ini
[general]
context=fromInternet
nat=yes
transport=udp
sipdebug=no
allowguest=no
alwaysauthreject=yes

register ➔ SIP-ID@sipgate.de:SIP-Password@sipgate.de/SIP-ID

[sipgate_incomming]
type=friend
context=sipgate_in
host=sipgate.de[sipgate_outgoing_account1]
type=friend
username=SIP-ID
fromuser=SIP-ID
fromdomain=sipgate.de
secret=SIP-Password
host=sipgate.de
nat=yes
insecure=invite
qualify=yes
dtmfmode=rfc2833
disallow=all
allow=ulaw,alaw
outboundproxy=sipgate.de
```

{% endcode %}

Please insert the following into the **extensions.conf** :

{% code title="extensions.conf" %}

```ini
[fromInternet]
; this context should remain empty for security reasons

[sipgate_in]
exten => SIP-ID,1,Dial(SIP/extension) <-- instead of extension, you should define the corresponding peer
exten => SIP-ID,n,Hangup

[sipgate_out]
exten => _X.,1,Set(CALLERID(num)=SIP-ID)
exten => _X.,2,Dial(SIP/sipgate_outgoing_account1/${EXTEN},30,trg)

exten => _X.,3,Hangup
```

{% endcode %}

#### Switching the DTMF method

To update the DTMF method in Asterisk, change in the line **'dtmfmode'** the value from 'info' to **'rfc2833'**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.sipgate.de/cloud-telefonanlage/en/connections-and-integrations/asteriske/wie-konfiguriere-ich-asterisk-fuer-sipgate.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
