Multiple VOIP providers wont register properly - DNS errors

Hi All,

I’m trying to use two VOIP providers at the same time - Callcentric and I can get both to register and work properly separately, but when I try both at the same time, I get DNS errors “failed to resolve ‘’” This is true even if I remove all references to ‘tampa’ and replace them with actual IP addresses. For some reason, the two of them don’t want to play together. If I do enough ‘core reloads’ the .ms will resolve, but then fails.

I also enabled dnsmgr and it seemed to help a little, but not much.

Has anybody had any success getting these two to register properly at the same time?

My asterisk-1.8 server is outside the NAT. Also, when they are both going at the same time, an incoming .ms call gets “Sending Fake Auth” in the console and the caller gets a busy signal. If I comment out callcentric from sip.conf, the .ms call comes in just fine with no errors.

I deleted the ‘register’ line for callcentric since I don’t get incoming calls from them and just have a single ‘register’ for .ms. Could this have anything to do with it?

I have callcentric and running flawless in my Asterisk. but you should contact the tech support dept

And start by copy/pasting some sip.conf files and debugs :wink:

I sent this to the support staff, but they couldn’t figure it out. We believe is has something to do with a port conflict. I currently only have 5060 open in my firewall (+RTP), but when I do SIP SHOW PEERS it will frequently show the service registered under a different port. When we changed the .ms register command port to 5080, it worked briefly and SIP SHOW PEERS said they were both registered as 5060.

I am suspecting some kind of NAT/port issue. Ultimately, I want everything working on 5060. Again, I’m running asterisk 1.8 outside the NAT and directly on the net.

I’m getting a lot of this stuff in my log file:

[May 6 18:14:27] ERROR[929] netsock2.c: getaddrinfo(“”, “(null)”, …): Name or service not known
[May 6 18:14:27] WARNING[929] acl.c: Unable to lookup ‘
[May 6 18:14:27] NOTICE[929] chan_sip.c: Peer ‘voipms’ is now Reachable. (41ms / 2000ms)
[May 6 18:16:18] NOTICE[13316] dnsmgr.c: Managed DNS entries will be refreshed every 3600 seconds.
[May 6 18:17:28] WARNING[13573] app_dial.c: Unable to create channel of type ‘SIP’ (cause 20 - Unknown)
[May 6 18:22:41] ERROR[929] netsock2.c: getaddrinfo(“”, “(null)”, …): Name or service not known
[May 6 18:22:41] WARNING[929] acl.c: Unable to lookup ‘
[May 6 18:22:42] NOTICE[929] chan_sip.c: Peer ‘CCDennis’ is now Reachable. (65ms / 2000ms)

The “Unable to lookup ‘’” makes it sound like a DNS issue, but when I changed it to a direct IP, I got the same ‘tampa…’ error.

From my SIP.CONF file:

rtpkeepalive = 30
disallow=all ; First disallow all codecs
allow=ulaw ; Allow codecs in order of preference

; register =>

register =>

[CCDennis] ; callcentric outgoing
disallowed_methods=UPDATE ;;;
directmedia=no ;;;
videosupport=no ;;;

The port in the register needs to match that in the [voipms] section!

nat=yes is more about the remote side being inside NAT and you not. You don’t seem to have at least one of externip, externaddr, or stunaddr, which means you are either relying on the router to solve your SIP NAT problems or you are relying on the ITSPs to use workarounds. It is normally recoommended that router support for SIP NAT is turned off, as it causes more problems than it solves.

Thanks David and all,

I did not use externip because I was told that was for servers that were behind a NAT and I’m directly on the net. I added externhost, but there was no change.

I did add “port=5060” to both MS and CC peers. And I changed the MS register line to use 5060 and not 5080. Supposedly, if you leave out the port number, its supposed to default to 5060, but that doesn’t seem to be the case.

Anyhow, it seems to be working right now. But its fooled me before. I just have to watch it and see if it continues to stay registered and incoming DIDs still work.

My firewall explicitly allows 5060, but not 5080. Before, it would randomly choose 5080 and I think that caused a problem. Even now, sip show peers says the two are registered on 5060 and sip show registry says MS is registered on 5080.

Spoke too soon. The MS is failing intermittently. Usually if I do a core reload it will fix it. But what happens if I’m not there to do a reload?

well until you find a definitive solution you can use a cron job for the asterisk reload. And as i said previously. You might contact the tech support . I have been facing issue with their service on my asterisk box and suddenly without make any change it works.

I don’t think cron would be a good solution because if its registered OK and the cron reloads, it could fail on that reload.

At this point, I don’t think its a dns issue. I think its something else, but I don’t know what.

I may try the ms support folks again, but they weren’t able to help the last time.

If you are directly on a public address, you don’t need localnet and you definitely don’t need nat=yes for the ITSPs. You might need some nat= settings if you have NAT between the Asterisk box and the internal phones, but only for the sip.conf sections for those phones.

Completely missing the port number is normally the right thing. Specifying a non-standard (5080 <> 5060!) port on register, but not in the main section, is unlikely to work.

That’s how I have it set up now. With explicit ports in both the register and the peer groups. The callcentric has no register because its outgoing only. The problem still exists randomly. I still get:

netsock2.c: getaddrinfo(“”, “(null)”, …): Name or service not known
acl.c: Unable to lookup ‘

While I still don’t think its really a DNS issue, the “null” in the error bothers me and that usually means some variable is undefined.

I have NAT globally set to YES because I have extensions at other locations and they are behind a NAT. Inside the MS and CC peer groups, NAT is explicitly set to NO. I’m wondering if I should set it to NEVER.

One thing that seems to exacerbate the problem is when I make a minor mod to another conf file - such as extensions.conf.

I have a long time running and callcentric together, i had some issue only with the and is due to technical problem in their computing platform

I was able to get it to work a little better by explicitly stating the port numbers. However, it still seems to be randomly failing with the DNS lookups. While its rare for callcentric to generate the error, does it pretty regularly. And now that I have a externhost=MYURL in there its starting to fail to look that up as well. So far, it doesn’t seem to do it when restarting asterisk as a whole, but it seems to do it primarily when I do a CORE RELOAD.