# IP Trunk Registrations = 0

**URL:** <https://community.asterisk.org/t/ip-trunk-registrations-0/32059>\
**Category:** Asterisk Support\
**Created:** [July 27, 2010, 12:16pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059 "2010-07-27T12:16:00Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 27, 2010, 12:16pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/1 "2010-07-27T12:16:00Z")

</div>

Hi!  
I’m trying to configure my AsteriskNOW 1.6, but have a problem.  
I’ve made 2 extensions:

[1020]  
deny=0.0.0.0/0.0.0.0  
secret=\*\*\*\*\*\*  
dtmfmode=rfc2833  
canreinvite=no  
context=from-internal  
host=dynamic  
type=friend  
nat=yes  
port=5060  
qualify =yes   
callgroup=  
pickupgroup=   
disallow=   
allow=  
dial =SIP/1020  
accountcode=  
mailbox=1020@device  
permit=0.0.0.0/0.0.0.0  
callerid=device \<1020\>  
call-limit=50

Extension [1030] configured same way.  
Made also Trunk:

[2call]  
username=48616107744  
type=friend  
secret=\*\*\*\*\*\*\*\*  
qualify=yes  
insecure=very  
[host=sip.2call.pl](http://host=sip.2call.pl)  
dtmfmode=rfc2833  
context=from-2call  
allow=all  
fromuser=48616107744

Registration string: [48616107744@sip.2call.pl](mailto:48616107744@sip.2call.pl)  
I can make internal calls but can’t make any Outbound calls.  
In my FreePBX Statistics there is:

IP Phones Online=1  
IP Trunks Online=1  
IP Trunk Registrations=0 ??

After command: sip show registry there is State: No Authentication??  
When I write: sip show peers 1020,1030 and 2call are OK.  
Changing Registry string at many ways and it doesn’t work.  
Dial pattern is correct.  
Can anyone help me?

---

<div class="post-metadata">

**Author:** ![MrFidget](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@MrFidget](https://community.asterisk.org/u/MrFidget)\
**Post date:** [July 27, 2010, 12:40pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/2 "2010-07-27T12:40:21Z")

</div>

register =\> [username:password@sip.registrar.net](mailto:username:password@sip.registrar.net)/destination-extension

You forgot the password in the registration

Try that and let us know if that fixes it  
Cheers  
Chris.

ps Asterisk NOW has its own forum. See Sticky

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 27, 2010, 12:52pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/3 "2010-07-27T12:52:24Z")

</div>

Changed to [48616107744:mypassword@sip.2call.pl](mailto:48616107744:mypassword@sip.2call.pl)/48616107744, [48616107744:mypassword@sip.2call.pl](mailto:48616107744:mypassword@sip.2call.pl) and many other, but it doesn’t work ☹

---

<div class="post-metadata">

**Author:** ![MrFidget](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@MrFidget](https://community.asterisk.org/u/MrFidget)\
**Post date:** [July 27, 2010, 1:13pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/4 "2010-07-27T13:13:02Z")

</div>

you may not need the /numberthingy at the end of the rego. If you don’t, it will fall into extension s

Re the rest of the rego:

- Make sure you have the correct username and pasword. If you can call out, then thats probably right
- Check that you have the right port. Some provders are using 5061 and 5062. Rare, but not unheard of. Port goes after the hostname separated by a colon. eg register =\> uname:pwd@my.other.net:2222
- Do a sip show registry to see if you are still getting an authentication issue.

Let me know how you go  
Cheers  
Chris

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 27, 2010, 1:47pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/5 "2010-07-27T13:47:16Z")

</div>

Username and password are good for sure.  
Port is correct (asked provider) and opened. Changed Registration string as you said but still nothing.

---

<div class="post-metadata">

**Author:** ![MrFidget](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@MrFidget](https://community.asterisk.org/u/MrFidget)\
**Post date:** [July 27, 2010, 1:51pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/6 "2010-07-27T13:51:18Z")

</div>

manually check whats there in /etc/asterisk/sip\_registraions.conf (at least thats where I think it is in FreePBX)

one other thing. Are you behinnd NAT ?? nat=yes etc ?? Did you try that \>\> may help

Chris

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 27, 2010, 3:58pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/7 "2010-07-27T15:58:20Z")

</div>

In sip\_registrations.conf there is exactly what I write as Registration string and changes automaticaly.  
I was traing with nat=yes and without, doesn’t work.

---

<div class="post-metadata">

**Author:** ![MrFidget](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@MrFidget](https://community.asterisk.org/u/MrFidget)\
**Post date:** [July 27, 2010, 9:32pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/8 "2010-07-27T21:32:56Z")

</div>

Some ITSPs dont use register, they just have a fixed IP.  
Did you set qualify=yes ??

What do you get when you do a “sip show peers” from the CLI ??  
Chris

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 28, 2010, 7:03am UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/9 "2010-07-28T07:03:39Z")

</div>

I changed sip adresses to IP and it works 😄 Now i can make external calls tbut can’t get incomming calls and i’m trying to solve this. Thanks for trying to help me.

---

<div class="post-metadata">

**Author:** ![MrFidget](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@MrFidget](https://community.asterisk.org/u/MrFidget)\
**Post date:** [July 28, 2010, 8:08am UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/10 "2010-07-28T08:08:53Z")

</div>

For incoming, check the CLI and see what happens. If the SIP connection hits your box, you should get a message to that effect telling you what the problem is. Usually i cant find the context or cant find the extension.

Some ITSPs have a test call thingy on their website which can tell you what error you are getting…sometimes. Best check the CLI first.

Re IP to host name, check your /etc/resolve.conf (i think) which will have your DNS servers listed. You can test the DNS lookups with nslookup. You’ll need this working to make voicemail to email work.

glad to be of some help anyway.  
Cheers  
Chris

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 28, 2010, 8:29am UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/11 "2010-07-28T08:29:04Z")

</div>

When i’m trying to call i hear that number doesn’t exist. CLI shows nothing then.

---

<div class="post-metadata">

**Author:** ![MrFidget](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@MrFidget](https://community.asterisk.org/u/MrFidget)\
**Post date:** [July 28, 2010, 11:34am UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/12 "2010-07-28T11:34:47Z")

</div>

/usr/sbin/asterisk -rvvvvvvvvvvvvvvv

Hold the v key down. I think verbosity stops at 9, but it doesnt kill things if you do more.  
if you do a sip show peers, and a sip show registry, what do you get ??

What context have you set for the SIP trunk ?? (from-incoming i think…should be on Elastix / FreePBX from memory)

What does the tech support for your SIP provider say ?  
Can thay see that you are registered on their server ?

No context to go to, or no extension in that context, your SIP trunk wont work and will probably say disconnected.

Also, if you’re behind NAT, you can set externip and localnet in your sip.conf

You may also need fromuser and fromdomain set in your sip trunk.

Some more stuff to try.

Good luck  
Cheers  
Chris

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 28, 2010, 12:24pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/13 "2010-07-28T12:24:26Z")

</div>

sip show peers:  
Name/username Host Dyn Nat ACL Port Status  
1020/1020 10.0.0.107 D N A 5060 OK(9ms)  
2call/48616107744 82.177.59.140 5060 OK(11ms)

Where 10.0.0.107 is my computers with Zoiper IP and 82.177.59.140 is IP of my providers sip server.

sip show registry:  
82.177.59.140:5060 N 48616107744 105 Registered  
1 SIP registrations.

USER context: from-incoming  
USER details:  
context=from-incoming  
host=82.177.59.140  
secret=\*\*\*\*\*\*\*  
type=user  
insecure=invite

How can i set externip and localnet in my sip.conf using FreePBX?  
I don’t know how can i edit this on my Asterisk.

I’m registered on providers server but Asterisk can’t find this number (404 Not found).  
From: 509036592 sip:509036592@82.177.59.140  
To: sip:48616107744@82.177.59.140

---

<div class="post-metadata">

**Author:** ![mudslide567](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@mudslide567](https://community.asterisk.org/u/mudslide567)\
**Post date:** [July 28, 2010, 1:04pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/14 "2010-07-28T13:04:07Z")

</div>

if you are using freePBX you might want to use their forum. but to answer your one question regarding those SIP settings, go to the tools tab and click on SIP settings. If you are no showing a link to SIP Settings, you may have to update your FreePBX to make sure you have the SIP settings module.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 28, 2010, 1:09pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/15 "2010-07-28T13:09:55Z")

</div>

FreePBX forum isn’t as good as this 😛 I can’t see any SIP settings in Tools tab. I can’t do an update: “Warning: Cannot connect to online repository ([mirror.freepbx.org](http://mirror.freepbx.org)). Online modules are not available.”

---

<div class="post-metadata">

**Author:** ![mudslide567](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@mudslide567](https://community.asterisk.org/u/mudslide567)\
**Post date:** [July 28, 2010, 2:13pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/16 "2010-07-28T14:13:50Z")

</div>

i can connect to the freePBX mirrors just fine so you must have a network or name resolution issue. Maybe that is the bigger problem why you cannot make calls outside.

When you can connect make sure you are connected to the extended repositories to pull in the module called “Asterisk SIP Settings”. Once you have that module, it will guide you through all the correct settings for your setup including the localnet, externalip , bindaddr etc. [Then you can look in the sip\_general\_additional.conf file to see what it did and learn how it all actually works].

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 28, 2010, 2:57pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/17 "2010-07-28T14:57:00Z")

</div>

I can make outband calls eg. zoiper -\> mobile phone/regular phone. I can make calls like zoiper -\> zoiper. I can’t receive external calls mobile phone/regular phone -\> zoiper and only teh i hear that nimber doesn’t exist.

---

<div class="post-metadata">

**Author:** ![mudslide567](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@mudslide567](https://community.asterisk.org/u/mudslide567)\
**Post date:** [July 28, 2010, 6:24pm UTC](https://community.asterisk.org/t/ip-trunk-registrations-0/32059/18 "2010-07-28T18:24:53Z")

</div>

if you cannot get the SIP Settings module for freePBX, you can do set things manually… freePBX will have a file call sip\_general\_custom.conf

in that you can put the following:

nat=yes  
[externip=xxx.xxx.xxx.xxx](http://externip=xxx.xxx.xxx.xxx) ; you EXTERNAL IP ADDRESS  
localnet=10.0.0.0/255.0.0.0 or whatever your local networks is

that should help.
