# Problem with SIP trunk

**URL:** <https://community.asterisk.org/t/problem-with-sip-trunk/11645>\
**Category:** Asterisk Support\
**Created:** [January 14, 2007, 6:11pm UTC](https://community.asterisk.org/t/problem-with-sip-trunk/11645 "2007-01-14T18:11:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shock](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@shock](https://community.asterisk.org/u/shock)\
**Post date:** [January 14, 2007, 6:11pm UTC](https://community.asterisk.org/t/problem-with-sip-trunk/11645/1 "2007-01-14T18:11:48Z")

</div>

Hi,

I’m newbie in asterisk domain, but I have problem to create SIP trunk. First I tried to connect my SIP account with X-lite and it worked perfectly.

X-Lite configuration:

username: myusername  
pass: maypassword  
Auth username: myusername  
Domain proxy: enable  
and  
Stun server: [stun.myISP.net](http://stun.myISP.net)

And then I created (with asterisk-GUI) SIP trunk (of course I shut down X-Lite)

[trunk\_1]  
secret = mypass  
provider =  
trunkstyle = customvoip  
username = myusername  
trunkname = Custom  
callerid =  
hasexten = no  
hassip = yes  
hasiax = no  
registeriax = no  
registersip = yes  
host = [voip.myISP.net](http://voip.myISP.net)  
dialformat = ${EXTEN:1}  
context = DID\_trunk\_1  
group =  
insecure =  
fromuser =  
fromdomain =

In Asterisk CLI mode I got next error:

[Jan 14 19:00:30] NOTICE[18302]: chan\_sip.c:7085 sip\_reg\_timeout: – Registration for 'myusername@voip.myISP.net’ timed out, trying again (Attempt #2)

I think the reason for this error is the fact that I didn’t enter the stun server, because I don’t know how to do that.

---

<div class="post-metadata">

**Author:** ![AndrewZ](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@AndrewZ](https://community.asterisk.org/u/AndrewZ)\
**Post date:** [January 14, 2007, 6:21pm UTC](https://community.asterisk.org/t/problem-with-sip-trunk/11645/2 "2007-01-14T18:21:25Z")

</div>

working example:

```auto

[trunk_1]
secret = MyPassword
provider =
trunkstyle = customvoip
username = MyName
trunkname = incoming from MyProvider
callerid =
hasexten = no
hassip = yes
hasiax = no
registeriax =
registersip = yes
host = MyProvider.com
dialformat = ${EXTEN:1}
context = incoming
group =
insecure = invite
fromuser = MyName
fromdomain = MyProvider.com
disallow=all
allow = ulaw
allow = alaw
allow = g729
nat = yes
qualify = yes
canreinvite = no
```

---

<div class="post-metadata">

**Author:** ![shock](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@shock](https://community.asterisk.org/u/shock)\
**Post date:** [January 14, 2007, 6:39pm UTC](https://community.asterisk.org/t/problem-with-sip-trunk/11645/3 "2007-01-14T18:39:16Z")

</div>

Where I put [stun.myISP.net](http://stun.myISP.net)? In fromdomain?

---

<div class="post-metadata">

**Author:** ![AndrewZ](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@AndrewZ](https://community.asterisk.org/u/AndrewZ)\
**Post date:** [January 14, 2007, 6:44pm UTC](https://community.asterisk.org/t/problem-with-sip-trunk/11645/4 "2007-01-14T18:44:15Z")

</div>

> [@shock](#):
>
> Where I put [stun.myISP.net](http://stun.myISP.net)? In fromdomain?

of course NO, because in fromdomain you should put your ‘from’ domain 😉

There is no support for STUN yet. Forget about it for a while. Just put your provider’s proxy address and domain in the corresponding fields:  
host = put the proxy address here  
fromdomain = put the domain name here

---

<div class="post-metadata">

**Author:** ![shock](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@shock](https://community.asterisk.org/u/shock)\
**Post date:** [January 14, 2007, 6:58pm UTC](https://community.asterisk.org/t/problem-with-sip-trunk/11645/5 "2007-01-14T18:58:15Z")

</div>

AndrewZ:

I tried your solution but it didn’t work. ☹

---

<div class="post-metadata">

**Author:** ![AndrewZ](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@AndrewZ](https://community.asterisk.org/u/AndrewZ)\
**Post date:** [January 14, 2007, 7:22pm UTC](https://community.asterisk.org/t/problem-with-sip-trunk/11645/6 "2007-01-14T19:22:04Z")

</div>

you may post the Asterisk debug message here or you can PM it to me keeping all the details and real names.
