# How Do I configure asterisk with sipgate?

These are the settings for the basic configuration of asterisk for sipgate.

For general asterisk configuration instructions with sipgate **SIP Trunking** accounts please click [here](https://teamhelp.sipgate.co.uk/hc/en-gb/articles/207414635) instead.

{% hint style="info" %}
**Note:** Please replace "your SIPID with SIP-ID and "PASSWD" with SIP-Password respectively.
{% endhint %}

Please enter the following in sip.conf:

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

```ini
register => SIP-ID:SIP-Password@sipgate.co.uk/SIP-ID

[sipgate]
type=peer
secret=PASSWORD
insecure=invite
username=SIP-ID
defaultuser=SIP-ID
fromuser=SIP-ID
context=sipgate_in
fromdomain=sipgate.co.uk
host=sipgate.co.uk
outboundproxy=sipgate.co.uk
qualify=yes
disallow=all
allow=alaw
dtmfmode=rfc2833
```

{% endcode %}

Please enter the following in extensions.conf:

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

```ini
[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/${EXTEN}@sipgate,30,trg)
exten => _X.,3,Hangup
```

{% endcode %}


---

# 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://teamhelp.sipgate.co.uk/integrations-and-connections/asterisk/how-do-i-configure-asterisk-with-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.
