# How do I configure Asterisk for sipgate?

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 information 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 information 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 %}

#### Switch the tone dialing method

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


---

# 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://help.sipgate.de/cloud-telefonanlage/en/connections-and-integrations/asteriske/wie-konfiguriere-ich-asterisk-fuer-sipgate.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.
